1
Fork 0
mirror of https://github.com/RGBCube/GitHubWrapper synced 2025-05-17 22:45:08 +00:00

Dumb move, readd http

This commit is contained in:
VarMonke 2022-03-28 22:09:39 +05:30
parent 82c8bf06ac
commit 8325203413

View file

@ -77,11 +77,11 @@ class GHClient:
async def get_user(self, username: str) -> User:
"""Fetch a Github user from their username."""
return User.get_user(self.session, username)
return User(await http.get_user(self.session, username), self.session)
async def get_repo(self, owner: str, repo_name: str) -> Repository:
"""Fetch a Github repository from it's name."""
return Repository.from_name(self.session, owner, repo_name)
return Repository(await http.get_repo_from_name(self.session, owner, repo_name), self.session)
async def get_org(self, org_name: str) -> 'Org':
"""Fetch a Github organization from it's name"""