pub struct Http { /* private fields */ }Implementations§
Source§impl Http
impl Http
pub fn new(token: SessionToken) -> Self
pub fn with_base_url(self, base_url: Url) -> Self
pub fn for_puppet(&self, id: UserId) -> Self
pub async fn media_upload( &self, target: &MediaCreated, body: Vec<u8>, ) -> Result<Option<Media>>
pub async fn thread_list( &self, channel_id: ChannelId, query: &PaginationQuery<ChannelId>, ) -> Result<PaginationResponse<Channel>>
pub async fn channel_list( &self, room_id: RoomId, query: &PaginationQuery<ChannelId>, ) -> Result<PaginationResponse<Channel>>
pub async fn message_list( &self, channel_id: ChannelId, query: &PaginationQuery<MessageId>, ) -> Result<PaginationResponse<Message>>
Source§impl Http
impl Http
pub async fn channel_create_room( &self, room_id: RoomId, body: &ChannelCreate, ) -> Result<Channel>
Source§impl Http
impl Http
pub async fn channel_update( &self, channel_id: ChannelId, body: &ChannelPatch, ) -> Result<Channel>
Source§impl Http
impl Http
pub async fn media_create(&self, body: &MediaCreate) -> Result<MediaCreated>
Source§impl Http
impl Http
pub async fn message_edit( &self, channel_id: ChannelId, message_id: MessageId, body: &MessagePatch, ) -> Result<Message>
Source§impl Http
impl Http
pub async fn message_create( &self, channel_id: ChannelId, body: &MessageCreate, ) -> Result<Message>
Source§impl Http
impl Http
pub async fn user_get(&self, user_id: UserIdReq) -> Result<UserWithRelationship>
Source§impl Http
impl Http
pub async fn room_member_add( &self, room_id: RoomId, user_id: UserIdReq, body: &RoomMemberPut, ) -> Result<RoomMember>
Source§impl Http
impl Http
pub async fn room_member_patch( &self, room_id: RoomId, user_id: UserIdReq, body: &RoomMemberPatch, ) -> Result<RoomMember>
Source§impl Http
impl Http
pub async fn user_set_status( &self, user_id: UserIdReq, body: &StatusPatch, ) -> Result<()>
Source§impl Http
impl Http
pub async fn puppet_ensure( &self, app_id: ApplicationId, puppet_id: String, body: &PuppetCreate, ) -> Result<User>
Source§impl Http
impl Http
pub async fn channel_create_dm(&self, body: &ChannelCreate) -> Result<Channel>
Source§impl Http
impl Http
pub async fn channel_reorder( &self, room_id: RoomId, body: &ChannelReorder, ) -> Result<()>
Source§impl Http
impl Http
pub async fn channel_transfer_ownership( &self, channel_id: ChannelId, body: &TransferOwnership, ) -> Result<()>
Source§impl Http
impl Http
pub async fn message_version_get( &self, channel_id: ChannelId, message_id: MessageId, version_id: MessageVerId, ) -> Result<Message>
Source§impl Http
impl Http
pub async fn message_moderate( &self, channel_id: ChannelId, body: &MessageModerate, ) -> Result<()>
Source§impl Http
impl Http
pub async fn message_move( &self, channel_id: ChannelId, body: &MessageMigrate, ) -> Result<()>
Source§impl Http
impl Http
pub async fn message_pin_reorder( &self, channel_id: ChannelId, body: &PinsReorder, ) -> Result<()>
Source§impl Http
impl Http
pub async fn room_create(&self, body: &RoomCreate) -> Result<Room>
Source§impl Http
impl Http
pub async fn room_transfer_ownership( &self, room_id: RoomId, body: &TransferOwnership, ) -> Result<()>
Source§impl Http
impl Http
pub async fn room_member_get( &self, room_id: RoomId, user_id: UserIdReq, ) -> Result<RoomMember>
Source§impl Http
impl Http
pub async fn room_ban_create( &self, room_id: RoomId, user_id: UserIdReq, body: &RoomBanCreate, ) -> Result<()>
Source§impl Http
impl Http
pub async fn room_ban_create_bulk( &self, room_id: RoomId, body: &RoomBanBulkCreate, ) -> Result<()>
Source§impl Http
impl Http
pub async fn thread_member_get( &self, thread_id: ChannelId, user_id: UserIdReq, ) -> Result<ThreadMember>
Source§impl Http
impl Http
pub async fn thread_member_add( &self, thread_id: ChannelId, user_id: UserIdReq, body: &ThreadMemberPut, ) -> Result<ThreadMember>
Source§impl Http
impl Http
pub async fn guest_create(&self, body: &UserCreate) -> Result<User>
Source§impl Http
impl Http
pub async fn user_suspend( &self, user_id: UserIdReq, body: &SuspendRequest, ) -> Result<User>
Trait Implementations§
Auto Trait Implementations§
impl Freeze for Http
impl !RefUnwindSafe for Http
impl Send for Http
impl Sync for Http
impl Unpin for Http
impl !UnwindSafe for Http
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