Common API interfaces of GitHub

await 2021-09-15 09:55:41

function

api Address

Request mode

Request parameters

Returns the parameter

Get user information

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

get

path route : user name

A user object

Get all warehouses of the user

https://api.github.com/users/{ user name }/repos

get

path route : user name

Returns an array

Get the details of a warehouse

https://api.github.com/repos/{ user name }/{ Warehouse, }

get

path route : user name and Warehouse,

Return a warehouse object

Get an array of directory files or folders

https://api.github.com/repos//{ user name }/{ Warehouse, }/contents

get

path route : user name and Warehouse,

Returns an array of first level files or folders

Get an array of subdirectory files or folders in a warehouse

https://api.github.com/repos//{ user name }/{ Warehouse, }/contents/{ Filename or folder name }

get

path route : user name and Warehouse name and file or folder name

Returns an array of files

Get the original content of a file (Raw)

1. Extract from the above file information download_url This link , You can get its original content .2. Or visit directly :https://raw.githubusercontent.com/{ user name }/{ Warehouse, }/{ Branch name }/{ File path }

get

path route : user name and Warehouse name and file l route

Returns a string of file contents

Get the follower list of a user

https://api.github.com/users/{ user name }/followers

get

path route : user name

Returns an array

Get a list of who a user is following

https://api.github.com/users/{ user name }}/following

get

path route : user name

Returns an array

Get the list of organizations joined by a user

https://api.github.com/users/{ user name }/orgs

get

path route : user name

Returns an array

repo All of the commits list

https://api.github.com/repos/{ user name }/{ Warehouse, }/commits

get

-

-

Some one commit details

https://api.github.com/repos/{ user name }/{ Warehouse, }/commits/{ Some one commit Of SHA}

get

-

-

issues list

https://api.github.com/repos/{ user name }/{ Warehouse, }/issues

get

-

-

Some issue details

https://api.github.com/repos/{ user name }/{ Warehouse, }/issues/{ Serial number }

get

issues It's all about 1,2,3 Such serial numbers

-

some issue Medium comments list

https://api.github.com/repos/{ user name }/{ Warehouse, }/issues/{ Serial number }/comments

get

-

-

some comment details

https://api.github.com/repos/{ user name }/{ Warehouse, }/issues/comments/{ Comment details ID}

get

Comment on ID It's from issues From the list

-

Participation of this paper Tencent cloud media sharing plan , You are welcome to join us , share .

Please bring the original link to reprint ,thank
Similar articles

2021-09-15