I'm gathering some Github releases using requests for Python 3.
The Github API mentions that to get a specific release, you need its ID. Is there a way to only use the tag to do so, or in the worst case to use it to retrieve the ID?
Here's my code so far:
def getGithub(self, url=ulgit.RELEASES_URL):
"""Get Github information"""
headers = {"Authorization": f"token {ulgit.TOKEN}"}
session = requests.Session()
response = session.get(url, headers=headers)
content = response.text
data = json.loads(content)
return data
def getVersionsGithub(self):
"""Get available versions releases on Github"""
list_releases = []
for i in self.getGithub():
list_releases.append(i["tag_name"])
def getSpecificRelease(self):
#TODO