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

undocumented API - support #282

Closed
PatWie opened this issue Sep 15, 2016 · 4 comments
Closed

undocumented API - support #282

PatWie opened this issue Sep 15, 2016 · 4 comments

Comments

@PatWie
Copy link

PatWie commented Sep 15, 2016

There are some useful, but undocumented api urls, like
https://api.github.com/user/:id. Is there a trick to request these apis?

Also works for:
https://api.github.com/repositories/:id

@prasadsurase
Copy link
Contributor

@PatWie you can retrieve an repository's details using its id after this PR has merged.

@Shwetakale
Copy link
Contributor

@PatWie I think if API is not documented on Github then it's not supported officially by Github so they might update it or remove it any time which could break functionality of the apps using it so developers should not use such API's. Thoughts?

@PatWie
Copy link
Author

PatWie commented Sep 22, 2016

Well, if you want to robustly deal with repository information, it is a much better idea to just store the repo-id rather than everything else. In addition, GitHub allows users to change their nicknames. This also would screw up any tight integration.

I currently extent this library using

module GithubRepoExtension
  def get_by_id(*args)
    arguments(args, required: [:id])
    get_request("/repositories/#{arguments.id}", arguments.params)
  end
end

But looking forward the merge.

@piotrmurach
Copy link
Owner

@Shwetakale I think the risk is the same as for any other documented method call. GitHub chops and changes stuff quite frequently so I don't see a problem merging this in.

@prasadsurase Thanks for working on this PR.

@PatWie Done.

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

4 participants