added create, update, and delete for repo contents #85

Merged
merged 3 commits into from Jan 4, 2014

Projects

None yet

3 participants

@hellovai
Contributor
hellovai commented Jan 4, 2014

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.

@pksunkara
Owner

The updateContents and deleteContents should check the returned status for 200. Not 201.

@hellovai
Contributor
hellovai commented Jan 4, 2014

Went ahead and fixed it. Made a mistake in the forked branch

@pksunkara pksunkara merged commit 4b4e78e into pksunkara:master Jan 4, 2014
@SleepyBandit

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

@hellovai
Contributor

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?

@SleepyBandit

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?

@hellovai
Contributor

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment