Skip to content

Instantly share code, notes, and snippets.

@shanehoey
Last active August 22, 2022 07:25
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save shanehoey/4568336c7dadf8d1415097cdb66eb67a to your computer and use it in GitHub Desktop.
Save shanehoey/4568336c7dadf8d1415097cdb66eb67a to your computer and use it in GitHub Desktop.
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