ghnova.user.async_user
async_user
Asynchronous User Resource for GitHub API.
Classes
ghnova.user.async_user.AsyncUser
Bases: BaseUser, AsyncResource
GitHub Asynchronous User resource.
Source code in src/ghnova/resource/async_resource.py
Functions
ghnova.user.async_user.AsyncUser.get_user
async
get_user(username: str | None = None, account_id: int | None = None, etag: str | None = None, last_modified: str | None = None, **kwargs: Any) -> tuple[dict[str, Any], dict[str, Any]]
Asynchronously get user information.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
username
|
str | None
|
The username of the user to retrieve. If None, retrieves the authenticated user. |
None
|
account_id
|
int | None
|
The account ID of the user to retrieve. If None, retrieves by username. |
None
|
etag
|
str | None
|
The ETag value for conditional requests. |
None
|
last_modified
|
str | None
|
The Last-Modified timestamp for conditional requests. |
None
|
**kwargs
|
Any
|
Additional arguments for the request. |
{}
|
Returns:
| Type | Description |
|---|---|
tuple[dict[str, Any], dict[str, Any]]
|
A tuple containing:
|
Source code in src/ghnova/user/async_user.py
ghnova.user.async_user.AsyncUser.update_user
async
update_user(name: str | None = None, email: str | None = None, blog: str | None = None, twitter_username: str | None = None, company: str | None = None, location: str | None = None, hireable: bool | None = None, bio: str | None = None, etag: str | None = None, last_modified: str | None = None, **kwargs: Any) -> tuple[dict[str, Any], dict[str, Any]]
Asynchronously update the authenticated user's information.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
name
|
str | None
|
The user's name. |
None
|
email
|
str | None
|
The user's email. |
None
|
blog
|
str | None
|
The user's blog URL. |
None
|
twitter_username
|
str | None
|
The user's Twitter username. |
None
|
company
|
str | None
|
The user's company. |
None
|
location
|
str | None
|
The user's location. |
None
|
hireable
|
bool | None
|
Whether the user is available for hire. |
None
|
bio
|
str | None
|
The user's bio. |
None
|
etag
|
str | None
|
The ETag value for conditional requests. |
None
|
last_modified
|
str | None
|
The Last-Modified timestamp for conditional requests. |
None
|
**kwargs
|
Any
|
Additional arguments for the request. |
{}
|
Returns:
| Type | Description |
|---|---|
tuple[dict[str, Any], dict[str, Any]]
|
A tuple containing:
|
Source code in src/ghnova/user/async_user.py
ghnova.user.async_user.AsyncUser.list_users
async
list_users(since: int | None = None, per_page: int | None = None, etag: str | None = None, last_modified: str | None = None, **kwargs: Any) -> tuple[list[dict[str, Any]], dict[str, Any]]
Asynchronously list all users.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
since
|
int | None
|
The integer ID of the last User that you've seen. |
None
|
per_page
|
int | None
|
The number of results per page (max 100). |
None
|
etag
|
str | None
|
The ETag value for conditional requests. |
None
|
last_modified
|
str | None
|
The Last-Modified timestamp for conditional requests. |
None
|
**kwargs
|
Any
|
Additional arguments for the request. |
{}
|
Returns:
| Type | Description |
|---|---|
tuple[list[dict[str, Any]], dict[str, Any]]
|
A tuple containing:
|
Source code in src/ghnova/user/async_user.py
ghnova.user.async_user.AsyncUser.get_contextual_information
async
get_contextual_information(username: str, subject_type: str | None = None, subject_id: str | None = None, **kwargs: Any) -> tuple[dict[str, Any], dict[str, Any]]
Asynchronously get contextual information about a user.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
username
|
str
|
The username of the user. |
required |
subject_type
|
str | None
|
The type of subject for the hovercard. |
None
|
subject_id
|
str | None
|
The ID of the subject for the hovercard. |
None
|
**kwargs
|
Any
|
Additional arguments for the request. |
{}
|
Returns:
| Type | Description |
|---|---|
tuple[dict[str, Any], dict[str, Any]]
|
A tuple containing:
|