GitHubAppClient#
- class safir.github.GitHubAppClient(*, http_client, name, jwt)#
Bases:
GitHubAPIA GitHub API client authenticated as a GitHub App.
- Parameters:
Methods Summary
app_getitem(url[, url_vars, accept])Send a GET request for a single item to the specified endpoint, authenticated as the GitHub App.
app_getiter(url[, url_vars, accept, ...])Return an async iterable for all the items at a specified endpoint, authenticated as the GitHub App.
app_patch(url[, url_vars, accept])- param url:
app_post(url[, url_vars, accept, data, ...])- param url:
Methods Documentation
- async app_getitem(url, url_vars=None, *, accept='application/vnd.github.v3+json')#
Send a GET request for a single item to the specified endpoint, authenticated as the GitHub App.
- Parameters:
url (
str) – The templated path of the endpoint.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]]], default:None) – The variables to substitute intourl.accept (
str, default:'application/vnd.github.v3+json') – TheAcceptheader to send.
- Returns:
The response data from the GitHub API.
- Return type:
Any
- async app_getiter(url, url_vars=None, *, accept='application/vnd.github.v3+json', iterable_key='items')#
Return an async iterable for all the items at a specified endpoint, authenticated as the GitHub App.
- Parameters:
url (
str) – The templated path of the endpoint.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]]], default:None) – The variables to substitute intourl.accept (
str, default:'application/vnd.github.v3+json') – TheAcceptheader to send.
- Yields:
item – Items from the GitHub API response.
- Return type:
- async app_patch(url, url_vars=None, *, data, accept='application/vnd.github.v3+json')#
- Parameters:
- Return type:
- async app_post(url, url_vars=None, *, accept='application/vnd.github.v3+json', data=None, content_type='application/json')#
- Parameters:
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]]], default:None) –accept (
str, default:'application/vnd.github.v3+json') –content_type (
str, default:'application/json') –
- Return type: