Skip to content

Instantly share code, notes, and snippets.

@shanehoey
Last active Aug 22, 2022
Embed
What would you like to do?
github api
@owner = shanehoey
@repository = shanehoey
@token = {{ $processEnv GITHUBtoken }}
### Check rate limit
get https://api.github.com/rate_limit
Accept: application/vnd.github+json
Authorization: token {{token}}
### get user
get https://api.github.com/user
Accept: application/vnd.github+json
Authorization: token {{token}}
### get user repos
get https://api.github.com/user/repos
Accept: application/vnd.github+json
Authorization: token {{token}}
### get user repos
get https://api.github.com/user/gists
Accept: application/vnd.github+json
Authorization: token {{token}}
### get user Publc repos
get https://api.github.com/users/{{owner}}/repos
Accept: application/vnd.github+json
Authorization: token {{token}}
### get files
@repository = temp_articles
get https://api.github.com/repos/{{owner}}/{{repository}}/contents/
Accept: application/vnd.github+json
Authorization: token {{token}}
###
get https://api.github.com/repos/{{username}}/{{repo}}/git/trees/main?recursive=1
Accept: application/vnd.github+json
Authorization: token {{token}}
### README
get https://api.github.com/repos/{{username}}/{{repo}}/readme
Accept: application/vnd.github+json
Authorization: token {{token}}
###
https://api.github.com/users/shanehoey
Accept: application/vnd.github+json
Authorization: token {{token}}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment