1
Fork 0
mirror of https://github.com/RGBCube/GitHubWrapper synced 2025-05-31 04:58:12 +00:00

Add licenses routes

This commit is contained in:
RGBCube 2022-06-27 13:23:40 +03:00
parent 859803fd72
commit 7274c90f2d

View file

@ -64,7 +64,7 @@ class RateLimits(NamedTuple):
# Gitignore
# Interactions
# Issues
# Licenses
# Licenses DONE
# Markdown
# Meta
# Metrics
@ -831,3 +831,14 @@ class HTTPClient:
params["page"] = page
return await self.request("GET", f"/users/{username}/gists", params=params)
# === LICENSES === #
async def get_commonly_used_licenses(self):
return await self.request("GET", "/licenses")
async def get_license(self, *, license: str):
return await self.request("GET", f"/licenses/{license}")
async def get_license_for_repository(self, *, owner: str, repo: str):
return await self.request("GET", f"/repos/{owner}/{repo}/license")