octomachinery.github.api.raw_client module#

A very low-level GitHub API client.

class octomachinery.github.api.raw_client.RawGitHubAPI(token: octomachinery.github.api.tokens.GitHubToken, *, user_agent: Optional[str] = None, **kwargs: Any)[source]#

Bases: gidgethub.aiohttp.GitHubAPI

A low-level GitHub API client with a pre-populated token.

delete(url: str, url_vars: Optional[Dict[str, Union[Sequence[Union[int, float, complex, str]], Mapping[str, Union[int, float, complex, str]], Tuple[str, Union[int, float, complex, str]], int, float, complex, str]]] = {}, *, data: Any = b'', preview_api_version: Optional[str] = None, accept: str = 'application/vnd.github.v3+json', jwt: Optional[str] = None, oauth_token: Optional[str] = None) None#
getitem(url: str, url_vars: Optional[Dict[str, Union[Sequence[Union[int, float, complex, str]], Mapping[str, Union[int, float, complex, str]], Tuple[str, Union[int, float, complex, str]], int, float, complex, str]]] = {}, *, preview_api_version: Optional[str] = None, accept: str = 'application/vnd.github.v3+json', jwt: Optional[str] = None, oauth_token: Optional[str] = None) Any#

Send a GET request for a single item to the specified endpoint.

getiter(url: str, url_vars: Optional[Dict[str, Union[Sequence[Union[int, float, complex, str]], Mapping[str, Union[int, float, complex, str]], Tuple[str, Union[int, float, complex, str]], int, float, complex, str]]] = {}, *, preview_api_version: Optional[str] = None, accept: str = 'application/vnd.github.v3+json', jwt: Optional[str] = None, oauth_token: Optional[str] = None, iterable_key: Optional[str] = 'items') AsyncGenerator[Any, None]#

Return an async iterable for all the items at a specified endpoint.

property is_initialized#

Return GitHub token presence.

patch(url: str, url_vars: Optional[Dict[str, Union[Sequence[Union[int, float, complex, str]], Mapping[str, Union[int, float, complex, str]], Tuple[str, Union[int, float, complex, str]], int, float, complex, str]]] = {}, *, data: Any, preview_api_version: Optional[str] = None, accept: str = 'application/vnd.github.v3+json', jwt: Optional[str] = None, oauth_token: Optional[str] = None) Any#
post(url: str, url_vars: Optional[Dict[str, Union[Sequence[Union[int, float, complex, str]], Mapping[str, Union[int, float, complex, str]], Tuple[str, Union[int, float, complex, str]], int, float, complex, str]]] = {}, *, data: Any, preview_api_version: Optional[str] = None, accept: str = 'application/vnd.github.v3+json', jwt: Optional[str] = None, oauth_token: Optional[str] = None, content_type: str = 'application/json') Any#
put(url: str, url_vars: Optional[Dict[str, Union[Sequence[Union[int, float, complex, str]], Mapping[str, Union[int, float, complex, str]], Tuple[str, Union[int, float, complex, str]], int, float, complex, str]]] = {}, *, data: Any = b'', preview_api_version: Optional[str] = None, accept: str = 'application/vnd.github.v3+json', jwt: Optional[str] = None, oauth_token: Optional[str] = None) Any#