Skip to content

Conversation

@whoisterencelee
Copy link

Instead of using read/write, the content API should be used unless the data is more than 1MB, because the number of http requests get reduced from 3 to just 1, and allows multi-user commits which tracks the document SHA (prevents update with a old SHA).

A few changes to allow 4 things:

  1. fix for issue Fix the contents function on the repository API. #101
    getting Content(branch, path, cb, sync, 'json') will get a json with file obj sha, which is closer to what http://developer.github.com/v3/repos/contents/#get-contents is describing, with option 'json' will give the same behaviour as before, getting the file raw content

  2. added a repo.req function to allow access to request, which is useful if anyone wants to make custom API calls

  3. allow request status==0 which is returned from XHR request made from a locally loaded page

  4. getCommits should use pagination

@whoisterencelee whoisterencelee changed the title Whoisterencelee content API update and some other features Apr 1, 2014
@aendra-rininsland
Copy link
Member

@whoisterencelee Would you mind solving the merge conflicts and rebasing if you still would like this added? It seems like a worthwhile PR and I'd like to add it to 0.10.8 if possible. Apologies for the delay!

@aendra-rininsland
Copy link
Member

Actually, reviewing this a bit more, it's effectively duplicating existing PRs. Closing as duplicate.

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

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants