pub struct UserClient { /* private fields */ }Expand description
Client for a specific user (or the current user via ApifyClient::me).
Implementations§
Source§impl UserClient
impl UserClient
Sourcepub async fn get(&self) -> ApifyClientResult<Option<User>>
pub async fn get(&self) -> ApifyClientResult<Option<User>>
Fetches the user account information.
For the current user (me) this returns private account details; for other users
it returns the public profile.
Sourcepub async fn monthly_usage(&self) -> ApifyClientResult<Value>
pub async fn monthly_usage(&self) -> ApifyClientResult<Value>
Returns the current user’s monthly usage for the current month. Only valid for the me
client. To fetch usage for a specific month, use UserClient::monthly_usage_for_date.
Sourcepub async fn monthly_usage_for_date(
&self,
date: Option<&str>,
) -> ApifyClientResult<Value>
pub async fn monthly_usage_for_date( &self, date: Option<&str>, ) -> ApifyClientResult<Value>
Returns the current user’s monthly usage, optionally for the month containing date.
date is an optional YYYY-MM-DD string selecting the month to report (the spec’s
optional date query parameter on GET /v2/users/me/usage/monthly); passing None
returns the current month, which is equivalent to UserClient::monthly_usage. Only
valid for the me client.
Sourcepub async fn limits(&self) -> ApifyClientResult<Value>
pub async fn limits(&self) -> ApifyClientResult<Value>
Returns the current user’s account and usage limits. Only valid for the me client.
Sourcepub async fn update_limits<T: Serialize>(
&self,
new_limits: &T,
) -> ApifyClientResult<()>
pub async fn update_limits<T: Serialize>( &self, new_limits: &T, ) -> ApifyClientResult<()>
Updates the current user’s limits. Only valid for the me client.
Trait Implementations§
Source§impl Clone for UserClient
impl Clone for UserClient
Source§fn clone(&self) -> UserClient
fn clone(&self) -> UserClient
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more