Users
This subclient handle all the user related interaction with the Eternaltwin API.
eternaltwin.clients.abc.users.UserClientABC
Bases: NamespacedClientABC[C], Generic[C]
Base class for sub-client handling interaction with users.
me
abstractmethod
Retrieve currently authenticated user's profile.
get
abstractmethod
Retrieve a user using their ID.
search
abstractmethod
search(query: str = None, limit: int = 20, offset: int = 0, token: Token = None) -> Response | Awaitable[Response]
Search for users matching the query.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
query
|
str
|
An optional query to use against the user's username, default to |
None
|
limit
|
int
|
The maximum number of users to return, default to |
20
|
offset
|
int
|
The offset to start returning users from, default to |
0
|
eternaltwin.clients.sync.users.UserClient
Bases: UserClientABC
Synchronous implementation of UserClientABC using requests.
eternaltwin.clients.sync.users.UserClient.me
Retrieve currently authenticated user's profile.
eternaltwin.clients.sync.users.UserClient.get
Retrieve a user using their ID.
eternaltwin.clients.sync.users.UserClient.search
Search for users matching the query.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
query
|
str
|
An optional query to use against the user's username, default to |
None
|
limit
|
int
|
The maximum number of users to return, default to |
20
|
offset
|
int
|
The offset to start returning users from, default to |
0
|
eternaltwin.clients.asyncio.users.UserClient
Bases: UserClientABC
Synchronous implementation of UserClientABC using requests.
eternaltwin.clients.asyncio.users.UserClient.me
async
Retrieve currently authenticated user's profile.
eternaltwin.clients.asyncio.users.UserClient.get
async
Retrieve a user using their ID.
eternaltwin.clients.asyncio.users.UserClient.search
async
Search for users matching the query.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
query
|
str
|
An optional query to use against the user's username, default to |
None
|
limit
|
int
|
The maximum number of users to return, default to |
20
|
offset
|
int
|
The offset to start returning users from, default to |
0
|