1

I am not able to understand how the below thing works: I run the "GET /orgs/octokit/repos" command in the terminal and nothing happens.
It's supposed to get list of repositories. I am sure I am not doing the correct way. Can somebody please explain why this command doesn't work?

Example: When you get a list of repositories, you get the summary representation of each repository.
Here, we fetch the list of repositories owned by the octokit organization:

GET /orgs/octokit/repos
VonC
  • 1,042,979
  • 435
  • 3,649
  • 4,283
Zack
  • 1,794
  • 10
  • 23
  • 46

2 Answers2

2

GET is supposed to be an HTTP request method, not a command.

See for example this curl tutorial, as a way to do some GET through curl.

curl https://api.github.com/orgs/octokit/repos

This works also directly from your browser:

https://api.github.com/orgs/octokit/repos

VonC
  • 1,042,979
  • 435
  • 3,649
  • 4,283
  • 1
    Note: curl is included in Git if you are on Windows (http://stackoverflow.com/q/2710748/6309) – VonC Feb 01 '15 at 21:54
  • Thank you @VonC. I have to actually find all the commits done on a repository and then compare every alternate commit and output the diffs in a file. I think I have to try something like this - curl https://api.github.com/orgs/octokit/repos/commits/ – Zack Feb 01 '15 at 22:04
  • @VonC I also have similar question [here](http://stackoverflow.com/questions/28389414/how-to-create-organization-name-through-github-api-instead-of-creating-manually) on github-api. If possible can you help me out over there. I did some research but not able to find the answer for that. – john Feb 08 '15 at 03:28
2

GET is not a command, it is the HTTP request method. You will need to use something like curl. This returns the list:

curl https://api.github.com/orgs/octokit/repos

You can also test that URL directly in your browser.

Joe
  • 13,504
  • 1
  • 13
  • 31
  • Thanks! I have to actually find all the commits done on a repository and then compare every alternate commit and output the diffs in a file. – Zack Feb 01 '15 at 22:03