How to retrieve the list of all GitHub repositories of a person?

后端 未结 15 1225
一个人的身影
一个人的身影 2020-12-02 05:43

We are working on a project where we need to display all the projects of a person in his repository on GitHub account.

Can anyone suggest, how can I display the na

15条回答
  •  情深已故
    2020-12-02 06:16

    Here is a full spec for the repos API:

    https://developer.github.com/v3/repos/#list-repositories-for-a-user

    GET /users/:username/repos

    Query String Parameters:

    The first 5 are documented in the API link above. The parameters for page and per_page which are documented elsewhere and are useful in a full description.

    • type (string): Can be one of all, owner, member. Default: owner
    • sort (string): Can be one of created, updated, pushed, full_name. Default: full_name
    • direction (string): Can be one of asc or desc. Default: asc when using full_name, otherwise desc
    • page (integer): Current page
    • per_page (integer): number of records per page

    Since this is an HTTP GET API, in addition to cURL, you can try this out simply in the browser. For example:

    https://api.github.com/users/grokify/repos?per_page=1&page=2

提交回复
热议问题