pub struct UsersService<'a> { /* private fields */ }Expand description
The Users operations.
Implementations§
Source§impl<'a> UsersService<'a>
impl<'a> UsersService<'a>
Sourcepub async fn confirm_email_address_change(
&self,
user_id: &str,
email_address_token: &str,
) -> Result<(), Error>
pub async fn confirm_email_address_change( &self, user_id: &str, email_address_token: &str, ) -> Result<(), Error>
ConfirmEmailAddressChange — POST /{accountId}/users/{userId}/email_addresses/{emailAddressToken}/confirmation.json.
Sent once and never resent.
Sourcepub async fn create_push_subscription(
&self,
user_id: &str,
body: &CreatePushSubscriptionRequestContent,
) -> Result<(), Error>
pub async fn create_push_subscription( &self, user_id: &str, body: &CreatePushSubscriptionRequestContent, ) -> Result<(), Error>
CreatePushSubscription — POST /{accountId}/users/{userId}/push_subscriptions.json.
Sent once and never resent.
Sourcepub async fn create_user_data_export(
&self,
user_id: &str,
) -> Result<DataExport, Error>
pub async fn create_user_data_export( &self, user_id: &str, ) -> Result<DataExport, Error>
CreateUserDataExport — POST /{accountId}/users/{userId}/data_exports.json.
Sent once and never resent.
Sourcepub async fn deactivate(&self, user_id: &str) -> Result<(), Error>
pub async fn deactivate(&self, user_id: &str) -> Result<(), Error>
DeactivateUser — DELETE /{accountId}/users/{userId}.
Sent up to 3 times, backing off from 1000 ms, when the answer is 429, 500 or 503.
Sourcepub async fn delete_avatar(&self, user_id: &str) -> Result<(), Error>
pub async fn delete_avatar(&self, user_id: &str) -> Result<(), Error>
DeleteUserAvatar — DELETE /{accountId}/users/{userId}/avatar.
Sent up to 3 times, backing off from 1000 ms, when the answer is 429, 500 or 503.
Sourcepub async fn delete_push_subscription(
&self,
user_id: &str,
push_subscription_id: &str,
) -> Result<(), Error>
pub async fn delete_push_subscription( &self, user_id: &str, push_subscription_id: &str, ) -> Result<(), Error>
DeletePushSubscription — DELETE /{accountId}/users/{userId}/push_subscriptions/{pushSubscriptionId}.
Sent up to 3 times, backing off from 1000 ms, when the answer is 429, 500 or 503.
Sourcepub async fn get(&self, user_id: &str) -> Result<User, Error>
pub async fn get(&self, user_id: &str) -> Result<User, Error>
GetUser — GET /{accountId}/users/{userId}.
Sent up to 3 times, backing off from 1000 ms, when the answer is 429, 500 or 503.
Sourcepub async fn get_user_data_export(
&self,
user_id: &str,
export_id: &str,
) -> Result<DataExport, Error>
pub async fn get_user_data_export( &self, user_id: &str, export_id: &str, ) -> Result<DataExport, Error>
GetUserDataExport — GET /{accountId}/users/{userId}/data_exports/{exportId}.
Sent up to 3 times, backing off from 1000 ms, when the answer is 429, 500 or 503.
Sourcepub async fn list(&self) -> Result<Page<Vec<User>>, Error>
pub async fn list(&self) -> Result<Page<Vec<User>>, Error>
ListUsers — GET /{accountId}/users.json.
Sent up to 3 times, backing off from 1000 ms, when the answer is 429, 500 or 503.
Paginated: the answer is a page with page as its cursor, and the next one is read with next_page.
Sourcepub async fn request_email_address_change(
&self,
user_id: &str,
body: &RequestEmailAddressChangeRequestContent,
) -> Result<(), Error>
pub async fn request_email_address_change( &self, user_id: &str, body: &RequestEmailAddressChangeRequestContent, ) -> Result<(), Error>
RequestEmailAddressChange — POST /{accountId}/users/{userId}/email_addresses.json.
Sent once and never resent.
Sourcepub async fn update(
&self,
user_id: &str,
body: &UpdateUserRequestContent,
) -> Result<User, Error>
pub async fn update( &self, user_id: &str, body: &UpdateUserRequestContent, ) -> Result<User, Error>
UpdateUser — PATCH /{accountId}/users/{userId}.
Sent up to 3 times, backing off from 1000 ms, when the answer is 429, 500 or 503.
Sourcepub async fn update_role(
&self,
user_id: &str,
body: &UpdateUserRoleRequestContent,
) -> Result<(), Error>
pub async fn update_role( &self, user_id: &str, body: &UpdateUserRoleRequestContent, ) -> Result<(), Error>
UpdateUserRole — PATCH /{accountId}/users/{userId}/role.json.
Sent up to 3 times, backing off from 1000 ms, when the answer is 429, 500 or 503.