request
request(token, endpoint, method=http.HttpMethod.get, dict_data=None)
¶
Make an api request to github.
See::
- https://docs.github.com/en/rest/overview/resources-in-the-rest-api
- https://docs.github.com/en/rest/overview/endpoints-available-for-github-apps
Parameters:
Name | Type | Description | Default |
---|---|---|---|
token |
str
|
A github personal access token. |
required |
endpoint |
str
|
A github api endpoint. |
required |
method |
HttpMethod
|
The http method to use. (default 'GET') |
get
|
dict_data |
object | None
|
A payload if the method if |
None
|
Returns:
Type | Description |
---|---|
OneOf[Issue, Any]
|
A response from Github. |