这是indexloc提供的服务,不要输入任何密码
Skip to content
This repository was archived by the owner on Aug 23, 2024. It is now read-only.

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

Merged
merged 3 commits into from
Jan 4, 2014

Conversation

hellovai
Copy link
Contributor

@hellovai 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
Copy link
Owner

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

@hellovai
Copy link
Contributor Author

hellovai commented Jan 4, 2014

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

pksunkara added a commit that referenced this pull request Jan 4, 2014
added create, update, and delete for repo contents
@pksunkara pksunkara merged commit 4b4e78e into pksunkara:master Jan 4, 2014
@SleepyBandit
Copy link

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
Copy link
Contributor Author

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
Copy link

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
Copy link
Contributor Author

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 subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants