mirror of
https://github.com/RGBCube/GitHubWrapper
synced 2025-05-17 22:45:08 +00:00
Getting issues added
This commit is contained in:
parent
6ed2deb92d
commit
5e44401601
5 changed files with 55 additions and 1 deletions
|
@ -10,7 +10,7 @@ import asyncio
|
|||
|
||||
from . import http
|
||||
from . import exceptions
|
||||
from .objects import User, Repository, Organization
|
||||
from .objects import *
|
||||
|
||||
class GHClient:
|
||||
_auth = None
|
||||
|
@ -83,6 +83,10 @@ class GHClient:
|
|||
"""Fetch a Github repository from it's name."""
|
||||
return Repository(await http.get_repo_from_name(self.session, owner, repo_name), self.session)
|
||||
|
||||
async def get_repo_issue(self, owner: str, repo_name: str, issue_number: int) -> Repository:
|
||||
"""Fetch a Github repository from it's name."""
|
||||
return repo.Issue(await http.get_repo_issue(self.session, owner, repo_name, issue_number), self.session)
|
||||
|
||||
async def get_org(self, org_name: str) -> Organization:
|
||||
"""Fetch a Github organization from it's name"""
|
||||
return Organization(await http.get_org(self.session, org_name), self.session)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue