You've already forked PythonLib
mirror of
https://github.com/lifebottle/PythonLib.git
synced 2026-02-13 15:25:50 -08:00
Create functions for interacting with our Repos
This commit is contained in:
19
RepoFunctions.py
Normal file
19
RepoFunctions.py
Normal file
@@ -0,0 +1,19 @@
|
||||
import requests
|
||||
import json
|
||||
|
||||
def get_Releases(org, repo_name, latest=False):
|
||||
|
||||
#git_url = "https://api.github.com/repos/SymphoniaLauren/Tales-of-Rebirth/releases"
|
||||
git_url = "https://api.github.com/repos/{}/{}/releases".format(org, repo_name)
|
||||
|
||||
if latest:
|
||||
git_url = git_url+"/latest"
|
||||
|
||||
header = {
|
||||
"Accept":"application/vnd.github.v3+json"
|
||||
}
|
||||
|
||||
res = requests.get(git_url)
|
||||
json_res = json.loads(res.text)
|
||||
|
||||
return json_res
|
||||
Reference in New Issue
Block a user