Struct netsblox_api::Client
source · pub struct Client { /* private fields */ }
Implementations§
source§impl Client
impl Client
pub fn new(cfg: Config) -> Self
pub async fn create_user( &self, name: &str, email: &str, password: Option<&str>, group_id: Option<&GroupId>, role: UserRole ) -> Result<(), Error>
pub async fn list_users(&self) -> Result<Vec<User>, Error>
sourcepub async fn forgot_username(&self, email: &str) -> Result<(), Error>
pub async fn forgot_username(&self, email: &str) -> Result<(), Error>
Send an email containing all usernames associated with the given address to the email address.
pub async fn delete_user(&self, username: &str) -> Result<(), Error>
pub async fn view_user(&self, username: &str) -> Result<User, Error>
pub async fn set_password( &self, username: &str, password: &str ) -> Result<(), Error>
pub async fn link_account( &self, username: &str, credentials: &Credentials ) -> Result<(), Error>
pub async fn unlink_account( &self, username: &str, account: &LinkedAccount ) -> Result<(), Error>
pub async fn ban_user(&self, username: &str) -> Result<BannedAccount, Error>
pub async fn unban_user(&self, username: &str) -> Result<BannedAccount, Error>
sourcepub async fn send_magic_link(
&self,
data: &CreateMagicLinkData
) -> Result<(), Error>
pub async fn send_magic_link( &self, data: &CreateMagicLinkData ) -> Result<(), Error>
Send a magic link to the given email address. Usable for any user associated with the address.
pub async fn create_project( &self, data: &CreateProjectData ) -> Result<ProjectMetadata, Error>
pub async fn list_projects( &self, owner: &str ) -> Result<Vec<ProjectMetadata>, Error>
pub async fn get_project_metadata( &self, owner: &str, name: &str ) -> Result<ProjectMetadata, Error>
pub async fn rename_project( &self, id: &ProjectId, name: &str ) -> Result<(), Error>
pub async fn rename_role( &self, id: &ProjectId, role_id: &RoleId, name: &str ) -> Result<(), Error>
pub async fn delete_project(&self, id: &ProjectId) -> Result<(), Error>
pub async fn delete_role( &self, id: &ProjectId, role_id: &RoleId ) -> Result<(), Error>
pub async fn publish_project( &self, id: &ProjectId ) -> Result<PublishState, Error>
pub async fn unpublish_project(&self, id: &ProjectId) -> Result<(), Error>
pub async fn get_project( &self, id: &ProjectId, latest: &bool ) -> Result<Project, Error>
pub async fn get_role( &self, id: &ProjectId, role_id: &RoleId, latest: &bool ) -> Result<RoleData, Error>
pub async fn list_collaborators( &self, project_id: &str ) -> Result<Vec<String>, Error>
pub async fn remove_collaborator( &self, project_id: &ProjectId, username: &str ) -> Result<(), Error>
pub async fn list_collaboration_invites( &self, username: &str ) -> Result<Vec<CollaborationInvite>, Error>
pub async fn invite_collaborator( &self, id: &ProjectId, username: &str ) -> Result<(), Error>
pub async fn respond_to_collaboration_invite( &self, id: &InvitationId, state: &InvitationState ) -> Result<(), Error>
pub async fn list_friends(&self, username: &str) -> Result<Vec<String>, Error>
pub async fn list_online_friends( &self, username: &str ) -> Result<Vec<String>, Error>
pub async fn list_friend_invites( &self, username: &str ) -> Result<Vec<FriendInvite>, Error>
pub async fn send_friend_invite( &self, username: &str, recipient: &str ) -> Result<(), Error>
pub async fn respond_to_friend_invite( &self, recipient: &str, sender: &str, state: FriendLinkState ) -> Result<(), Error>
pub async fn unfriend(&self, username: &str, friend: &str) -> Result<(), Error>
pub async fn block_user( &self, username: &str, other_user: &str ) -> Result<(), Error>
pub async fn unblock_user( &self, username: &str, other_user: &str ) -> Result<(), Error>
pub async fn get_libraries( &self, username: &str ) -> Result<Vec<LibraryMetadata>, Error>
pub async fn get_submitted_libraries( &self ) -> Result<Vec<LibraryMetadata>, Error>
pub async fn get_public_libraries(&self) -> Result<Vec<LibraryMetadata>, Error>
pub async fn get_library( &self, username: &str, name: &str ) -> Result<String, Error>
pub async fn save_library( &self, username: &str, name: &str, blocks: &str, notes: &str ) -> Result<(), Error>
pub async fn delete_library( &self, username: &str, library: &str ) -> Result<(), Error>
pub async fn publish_library( &self, username: &str, library: &str ) -> Result<(), Error>
pub async fn unpublish_library( &self, username: &str, library: &str ) -> Result<(), Error>
pub async fn approve_library( &self, username: &str, library: &str, state: &PublishState ) -> Result<(), Error>
pub async fn list_groups(&self, username: &str) -> Result<Vec<Group>, Error>
pub async fn create_group(&self, owner: &str, name: &str) -> Result<(), Error>
pub async fn delete_group(&self, id: &GroupId) -> Result<(), Error>
pub async fn list_members(&self, id: &GroupId) -> Result<Vec<User>, Error>
pub async fn rename_group(&self, id: &GroupId, name: &str) -> Result<(), Error>
pub async fn view_group(&self, id: &GroupId) -> Result<Group, Error>
pub async fn list_user_hosts( &self, username: &str ) -> Result<Vec<ServiceHost>, Error>
pub async fn list_group_hosts( &self, group_id: &GroupId ) -> Result<Vec<ServiceHost>, Error>
pub async fn list_hosts( &self, username: &str ) -> Result<Vec<ServiceHost>, Error>
pub async fn set_user_hosts( &self, username: &str, hosts: Vec<ServiceHost> ) -> Result<(), Error>
pub async fn set_group_hosts( &self, group_id: &GroupId, hosts: Vec<ServiceHost> ) -> Result<(), Error>
pub async fn list_group_settings( &self, group_id: &GroupId ) -> Result<Vec<String>, Error>
pub async fn list_user_settings( &self, username: &str ) -> Result<Vec<String>, Error>
pub async fn get_all_settings( &self, username: &str, service_id: &str ) -> Result<ServiceSettings, Error>
pub async fn get_group_settings( &self, group_id: &GroupId, service_id: &str ) -> Result<String, Error>
pub async fn get_user_settings( &self, username: &str, service_id: &str ) -> Result<String, Error>
pub async fn set_user_settings( &self, username: &str, service_id: &str, settings: String ) -> Result<String, Error>
pub async fn set_group_settings( &self, group_id: &GroupId, service_id: &str, settings: String ) -> Result<String, Error>
pub async fn delete_user_settings( &self, username: &str, service_id: &str ) -> Result<String, Error>
pub async fn delete_group_settings( &self, group_id: &GroupId, service_id: &str ) -> Result<String, Error>
pub async fn list_external_clients(&self) -> Result<Vec<ExternalClient>, Error>
pub async fn list_networks(&self) -> Result<Vec<ProjectId>, Error>
pub async fn get_room_state(&self, id: &ProjectId) -> Result<RoomState, Error>
pub async fn get_client_state( &self, client_id: &ClientId ) -> Result<ClientInfo, Error>
pub async fn evict_occupant(&self, client_id: &ClientId) -> Result<(), Error>
pub async fn connect(&self, address: &str) -> Result<MessageChannel, Error>
pub async fn add_oauth_client( &self, client: &CreateClientData ) -> Result<CreatedClientData, Error>
pub async fn remove_oauth_client(&self, id: &ClientId) -> Result<(), Error>
pub async fn list_oauth_clients(&self) -> Result<Vec<Client>, Error>
Trait Implementations§
Auto Trait Implementations§
impl RefUnwindSafe for Client
impl Send for Client
impl Sync for Client
impl Unpin for Client
impl UnwindSafe for Client
Blanket Implementations§
source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more