I found that i needed to create a file sometimes for my project and figured that others may also find this useful. I think i followed the correct formats.
added create, update, and delete for repo contents
The updateContents and deleteContents should check the returned status for 200. Not 201.
fixing 201 to 200 for statuscodes for updateContents and deleteContents
Went ahead and fixed it. Made a mistake in the forked branch
any idea why updateContents doesn't work properly for me? I keep being told the file doesn't match the SHA but I'm pulling it directly from the items history
It should work as expected. Been a while since I saw the code, perhaps the API changed? can you provide the exact line of code you're using so I can attempt to replicate the error?
I think I'm just calling the wrong SHA number. I've gotten another wrapper library to work it appears, but the SHA number isn't the same as what I see via the browser. I'm having to fetch it first via code, and then use it. Is there an easy method to fetch the SHA for a file within a branch for this library?
Oh yes, so the easiest way is to actually get the SHA with another separate call where you list the branch details. I don't remember any easier way than this