今天发现了Github有提供了简易的端口来查看仓库信息,对于我们这种不喜欢翻弄全部仓库的人来说,简直是开心死啊~

利用这一行代码就可以获取到信息了:

https://api.github.com/users/用户名称/repos

比如拿我的信息做个例子:

https://api.github.com/users/Uppez/repos

获取到的结果为:

[
  {
    "id": 186942008,
    "node_id": "MDEwOlJlcG9zaXRvcnkxODY5NDIwMDg=",
    "name": "100-Days-Of-ML-Code",
    "full_name": "Uppez/100-Days-Of-ML-Code",
    "private": false,
    "owner": {
      "login": "Uppez",
      "id": 46397010,
      "node_id": "MDQ6VXNlcjQ2Mzk3MDEw",
      "avatar_url": "https://avatars0.githubusercontent.com/u/46397010?v=4",
      "gravatar_id": "",
      "url": "https://api.github.com/users/Uppez",
      "html_url": "https://github.com/Uppez",
      "followers_url": "https://api.github.com/users/Uppez/followers",
      "following_url": "https://api.github.com/users/Uppez/following{/other_user}",
      "gists_url": "https://api.github.com/users/Uppez/gists{/gist_id}",
      "starred_url": "https://api.github.com/users/Uppez/starred{/owner}{/repo}",
      "subscriptions_url": "https://api.github.com/users/Uppez/subscriptions",
      "organizations_url": "https://api.github.com/users/Uppez/orgs",
      "repos_url": "https://api.github.com/users/Uppez/repos",
      "events_url": "https://api.github.com/users/Uppez/events{/privacy}",
      "received_events_url": "https://api.github.com/users/Uppez/received_events",
      "type": "User",
      "site_admin": false
    },
    "html_url": "https://github.com/Uppez/100-Days-Of-ML-Code",
    "description": "100-Days-Of-ML-Code中文版",
    "fork": true,
    "url": "https://api.github.com/repos/Uppez/100-Days-Of-ML-Code",
    "forks_url": "https://api.github.com/repos/Uppez/100-Days-Of-ML-Code/forks",
    "keys_url": "https://api.github.com/repos/Uppez/100-Days-Of-ML-Code/keys{/key_id}",
    "collaborators_url": "https://api.github.com/repos/Uppez/100-Days-Of-ML-Code/collaborators{/collaborator}",
    "teams_url": "https://api.github.com/repos/Uppez/100-Days-Of-ML-Code/teams",
    "hooks_url": "https://api.github.com/repos/Uppez/100-Days-Of-ML-Code/hooks",
    "issue_events_url": "https://api.github.com/repos/Uppez/100-Days-Of-ML-Code/issues/events{/number}",
    "events_url": "https://api.github.com/repos/Uppez/100-Days-Of-ML-Code/events",
    "assignees_url": "https://api.github.com/repos/Uppez/100-Days-Of-ML-Code/assignees{/user}",
    "branches_url": "https://api.github.com/repos/Uppez/100-Days-Of-ML-Code/branches{/branch}",
    "tags_url": "https://api.github.com/repos/Uppez/100-Days-Of-ML-Code/tags",
    "blobs_url": "https://api.github.com/repos/Uppez/100-Days-Of-ML-Code/git/blobs{/sha}",
    "git_tags_url": "https://api.github.com/repos/Uppez/100-Days-Of-ML-Code/git/tags{/sha}",
    "git_refs_url": "https://api.github.com/repos/Uppez/100-Days-Of-ML-Code/git/refs{/sha}",
    "trees_url": "https://api.github.com/repos/Uppez/100-Days-Of-ML-Code/git/trees{/sha}",
    "statuses_url": "https://api.github.com/repos/Uppez/100-Days-Of-ML-Code/statuses/{sha}",
    "languages_url": "https://api.github.com/repos/Uppez/100-Days-Of-ML-Code/languages",
    "stargazers_url": "https://api.github.com/repos/Uppez/100-Days-Of-ML-Code/stargazers",
    "contributors_url": "https://api.github.com/repos/Uppez/100-Days-Of-ML-Code/contributors",
    "subscribers_url": "https://api.github.com/repos/Uppez/100-Days-Of-ML-Code/subscribers",
    "subscription_url": "https://api.github.com/repos/Uppez/100-Days-Of-ML-Code/subscription",
    "commits_url": "https://api.github.com/repos/Uppez/100-Days-Of-ML-Code/commits{/sha}",
    "git_commits_url": "https://api.github.com/repos/Uppez/100-Days-Of-ML-Code/git/commits{/sha}",
    "comments_url": "https://api.github.com/repos/Uppez/100-Days-Of-ML-Code/comments{/number}",
    "issue_comment_url": "https://api.github.com/repos/Uppez/100-Days-Of-ML-Code/issues/comments{/number}",
    "contents_url": "https://api.github.com/repos/Uppez/100-Days-Of-ML-Code/contents/{+path}",
    "compare_url": "https://api.github.com/repos/Uppez/100-Days-Of-ML-Code/compare/{base}...{head}",
    "merges_url": "https://api.github.com/repos/Uppez/100-Days-Of-ML-Code/merges",
    "archive_url": "https://api.github.com/repos/Uppez/100-Days-Of-ML-Code/{archive_format}{/ref}",
    "downloads_url": "https://api.github.com/repos/Uppez/100-Days-Of-ML-Code/downloads",
    "issues_url": "https://api.github.com/repos/Uppez/100-Days-Of-ML-Code/issues{/number}",
    "pulls_url": "https://api.github.com/repos/Uppez/100-Days-Of-ML-Code/pulls{/number}",
    "milestones_url": "https://api.github.com/repos/Uppez/100-Days-Of-ML-Code/milestones{/number}",
    "notifications_url": "https://api.github.com/repos/Uppez/100-Days-Of-ML-Code/notifications{?since,all,participating}",
    "labels_url": "https://api.github.com/repos/Uppez/100-Days-Of-ML-Code/labels{/name}",
    "releases_url": "https://api.github.com/repos/Uppez/100-Days-Of-ML-Code/releases{/id}",
    "deployments_url": "https://api.github.com/repos/Uppez/100-Days-Of-ML-Code/deployments",
    "created_at": "2019-05-16T03:10:40Z",
    "updated_at": "2019-05-16T03:10:43Z",
    "pushed_at": "2019-04-28T03:12:34Z",
    "git_url": "git://github.com/Uppez/100-Days-Of-ML-Code.git",
    "ssh_url": "git@github.com:Uppez/100-Days-Of-ML-Code.git",
    "clone_url": "https://github.com/Uppez/100-Days-Of-ML-Code.git",
    "svn_url": "https://github.com/Uppez/100-Days-Of-ML-Code",
    "homepage": null,
    "size": 38580,
    "stargazers_count": 0,
    "watchers_count": 0,
    "language": "Jupyter Notebook",
    "has_issues": false,
    "has_projects": true,
    "has_downloads": true,
    "has_wiki": true,
    "has_pages": false,
    "forks_count": 0,
    "mirror_url": null,
    "archived": false,
    "disabled": false,
    "open_issues_count": 0,
    "license": {
      "key": "mit",
      "name": "MIT License",
      "spdx_id": "MIT",
      "url": "https://api.github.com/licenses/mit",
      "node_id": "MDc6TGljZW5zZTEz"
    },
    "forks": 0,
    "open_issues": 0,
    "watchers": 0,
    "default_branch": "master"
  },
  {
    "id": 182619959,
    "node_id": "MDEwOlJlcG9zaXRvcnkxODI2MTk5NTk=",
    "name": "2019-Autumn-recruitment-experience",
    "full_name": "Uppez/2019-Autumn-recruitment-experience",
    "private": false,
    "owner": {
      "login": "Uppez",
      "id": 46397010,
      "node_id": "MDQ6VXNlcjQ2Mzk3MDEw",
      "avatar_url": "https://avatars0.githubusercontent.com/u/46397010?v=4",
      "gravatar_id": "",
      "url": "https://api.github.com/users/Uppez",
      "html_url": "https://github.com/Uppez",
      "followers_url": "https://api.github.com/users/Uppez/followers",
      "following_url": "https://api.github.com/users/Uppez/following{/other_user}",
      "gists_url": "https://api.github.com/users/Uppez/gists{/gist_id}",
      "starred_url": "https://api.github.com/users/Uppez/starred{/owner}{/repo}",
      "subscriptions_url": "https://api.github.com/users/Uppez/subscriptions",..........
	}
]