Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

README-information is old. #12

Closed
sassembla opened this issue Jul 23, 2012 · 18 comments
Closed

README-information is old. #12

sassembla opened this issue Jul 23, 2012 · 18 comments

Comments

@sassembla
Copy link

Now,

var repo = github.getRepo(reponame);

this is, maybe

var repo = github.getRepo(username, reponame);

@mattpass
Copy link
Collaborator

The manual also mentions repo.list() - that doesn't seem to be in github.js?

Showing a list of files in a repo would be v useful but I can't see this or any other function to create this list? :/

@michael
Copy link
Collaborator

michael commented Jul 23, 2012

Fixed it.

@mattpass did you test the Gists API? I'm just going to add documentation for it and include it in the 0.7.0 release.

@michael michael closed this as completed Jul 23, 2012
@michael michael reopened this Jul 23, 2012
@mattpass
Copy link
Collaborator

No, haven't tried it with gists. Will try tomorrow if I get chance.

@mattpass
Copy link
Collaborator

Don't forget to remove including jQuery dependency from 'setup' section of README, tis no longer needed.

@michael
Copy link
Collaborator

michael commented Jul 23, 2012

@mattpass can you hop on the #_substance channel in freebase.. got some questions.. (refining the api a bit atm)

@mattpass
Copy link
Collaborator

Sorry, don't use that but you're welcome to tweet me @mattpass or email matt@mattpass.com

@michael
Copy link
Collaborator

michael commented Jul 23, 2012

I'll push my changes and you can review.. stripping down the gists api a bit. Btw.. github gists api is really nice... we should cover gists by prose somehow..

@mattpass
Copy link
Collaborator

Sure OK, will test the whole gists API in the morning and let you know how it goes.

@michael
Copy link
Collaborator

michael commented Jul 23, 2012

i'm already doing some testing. not sure how far i get.

·····························································
http://substance.io · http://quasipartikel.at
·····························································

On Monday, July 23, 2012 at 3:22 PM, mattpass wrote:

Sure OK, will test the whole gists API in the morning and let you know how it goes.


Reply to this email directly or view it on GitHub:
#12 (comment)

@michael
Copy link
Collaborator

michael commented Jul 24, 2012

I stripped down the API a bit... we just need gist.update() I think.. so we don't obscure the native JSON-API which is well designed already.. I tested the stuff already... and extended the docs. Please add what's missing and let me know if you have other questions.

Thanks for helping out with the implementation :)

@mattpass
Copy link
Collaborator

Sounds good, but a couple of issues. In the manual it says use
var gist = github().getGist(3165654);
but that should be
var gist = github.getGist(3165654);

The bigger problem though is I don't think fork, delete or update work?

See here I have setup a demo page: http://icecoder.net/github/

Press F12 to get a console up and select gist.read from the dropdown. You get a response back, but not for git.fork or gist.delete?

@sassembla
Copy link
Author

thanks a lot!

@mattpass
Copy link
Collaborator

Have been testing this a little today. I can read, fork, update & delete gists with basic auth fine. With oAuth I can only read them and can't fork, update or delete? Weird.

May have set up my oAuth incorrectly.

Can someone else confirm actions that involve authentication (such as forking, updating etc) works OK with oAuth here?

@michael
Copy link
Collaborator

michael commented Jul 24, 2012

Make sure you have the OAuth context set correctly it needs to have "gist" (you may revoke the token and get a new one). I was running into that problem yesterday.

@mattpass
Copy link
Collaborator

facepalm totally ignored the scope setting so has no context, just public perms. will have another look tomorrow but all 4 functions were working fine with basic auth so should be fine.

@michael
Copy link
Collaborator

michael commented Jul 24, 2012

Just fixed a bunch of other problems... + improved error handling (latest commit) GitHub API is having issues with content type determination... setting this:

xhr.setRequestHeader('Content-Type','application/json');

made it work. Now we store content with special characters again.

Arrr... HTTP sucks

@mattpass
Copy link
Collaborator

I thought it was a bit strange the content type was 'application/x-www-form-urlencoded' your previous jQuery AJAX version but I went along with it as I didn't want to break anything for you. Makes more sense now it's 'application/json'.

Also good idea on the improved error handling.

@mattpass
Copy link
Collaborator

I also setup a new oAuth token (with gist perms this time) and everything works as expected. Tested all 4 gist commands (read, fork, update & delete) under basic & oAuth, works great. :D

@michael michael closed this as completed Aug 5, 2012
punchagan pushed a commit to punchagan/github that referenced this issue Aug 23, 2014
add function for fetching an organization
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants