[][src]Trait misskey::ClientExt

pub trait ClientExt: Sync + Client {
    pub fn me(
        &self
    ) -> Pin<Box<dyn Future<Output = Result<User, Error<Self::Error>>> + Send, Global>> { ... }
pub fn update_me(&self) -> MeUpdateBuilder<&Self> { ... }
pub fn follow(
        &self,
        user: impl EntityRef<User>
    ) -> Pin<Box<dyn Future<Output = Result<User, Error<Self::Error>>> + Send, Global>> { ... }
pub fn unfollow(
        &self,
        user: impl EntityRef<User>
    ) -> Pin<Box<dyn Future<Output = Result<User, Error<Self::Error>>> + Send, Global>> { ... }
pub fn mute(
        &self,
        user: impl EntityRef<User>
    ) -> Pin<Box<dyn Future<Output = Result<(), Error<Self::Error>>> + Send, Global>> { ... }
pub fn unmute(
        &self,
        user: impl EntityRef<User>
    ) -> Pin<Box<dyn Future<Output = Result<(), Error<Self::Error>>> + Send, Global>> { ... }
pub fn block(
        &self,
        user: impl EntityRef<User>
    ) -> Pin<Box<dyn Future<Output = Result<User, Error<Self::Error>>> + Send, Global>> { ... }
pub fn unblock(
        &self,
        user: impl EntityRef<User>
    ) -> Pin<Box<dyn Future<Output = Result<User, Error<Self::Error>>> + Send, Global>> { ... }
pub fn followers(
        &self,
        user: impl EntityRef<User>
    ) -> PagerStream<Pin<Box<dyn Pager<Item = Result<Vec<User, Global>, Error<Self::Error>>, Content = User, Client = Self> + Send, Global>>> { ... }
pub fn following(
        &self,
        user: impl EntityRef<User>
    ) -> PagerStream<Pin<Box<dyn Pager<Item = Result<Vec<User, Global>, Error<Self::Error>>, Content = User, Client = Self> + Send, Global>>> { ... }
pub fn pin_note(
        &self,
        note: impl EntityRef<Note>
    ) -> Pin<Box<dyn Future<Output = Result<User, Error<Self::Error>>> + Send, Global>> { ... }
pub fn unpin_note(
        &self,
        note: impl EntityRef<Note>
    ) -> Pin<Box<dyn Future<Output = Result<User, Error<Self::Error>>> + Send, Global>> { ... }
pub fn follow_requests(
        &self
    ) -> Pin<Box<dyn Future<Output = Result<Vec<FollowRequest, Global>, Error<Self::Error>>> + Send, Global>> { ... }
pub fn cancel_follow_request(
        &self,
        user: impl EntityRef<User>
    ) -> Pin<Box<dyn Future<Output = Result<User, Error<Self::Error>>> + Send, Global>> { ... }
pub fn accept_follow_request(
        &self,
        user: impl EntityRef<User>
    ) -> Pin<Box<dyn Future<Output = Result<(), Error<Self::Error>>> + Send, Global>> { ... }
pub fn reject_follow_request(
        &self,
        user: impl EntityRef<User>
    ) -> Pin<Box<dyn Future<Output = Result<(), Error<Self::Error>>> + Send, Global>> { ... }
pub fn muting_users(
        &self
    ) -> PagerStream<Pin<Box<dyn Pager<Item = Result<Vec<User, Global>, Error<Self::Error>>, Content = User, Client = Self> + Send, Global>>> { ... }
pub fn blocking_users(
        &self
    ) -> PagerStream<Pin<Box<dyn Pager<Item = Result<Vec<User, Global>, Error<Self::Error>>, Content = User, Client = Self> + Send, Global>>> { ... }
pub fn favorited_notes(
        &self
    ) -> PagerStream<Pin<Box<dyn Pager<Item = Result<Vec<Note, Global>, Error<Self::Error>>, Content = Note, Client = Self> + Send, Global>>> { ... }
pub fn notifications(
        &self
    ) -> PagerStream<Pin<Box<dyn Pager<Item = Result<Vec<Notification, Global>, Error<Self::Error>>, Content = Notification, Client = Self> + Send, Global>>> { ... }
pub fn user_relation(
        &self,
        user: impl EntityRef<User>
    ) -> Pin<Box<dyn Future<Output = Result<UserRelation, Error<Self::Error>>> + Send, Global>> { ... }
pub fn is_following(
        &self,
        user: impl EntityRef<User>
    ) -> Pin<Box<dyn Future<Output = Result<bool, Error<Self::Error>>> + Send, Global>> { ... }
pub fn is_followed(
        &self,
        user: impl EntityRef<User>
    ) -> Pin<Box<dyn Future<Output = Result<bool, Error<Self::Error>>> + Send, Global>> { ... }
pub fn is_blocking(
        &self,
        user: impl EntityRef<User>
    ) -> Pin<Box<dyn Future<Output = Result<bool, Error<Self::Error>>> + Send, Global>> { ... }
pub fn is_blocked(
        &self,
        user: impl EntityRef<User>
    ) -> Pin<Box<dyn Future<Output = Result<bool, Error<Self::Error>>> + Send, Global>> { ... }
pub fn is_muted(
        &self,
        user: impl EntityRef<User>
    ) -> Pin<Box<dyn Future<Output = Result<bool, Error<Self::Error>>> + Send, Global>> { ... }
pub fn has_pending_follow_request_from_me(
        &self,
        user: impl EntityRef<User>
    ) -> Pin<Box<dyn Future<Output = Result<bool, Error<Self::Error>>> + Send, Global>> { ... }
pub fn has_pending_follow_request_to_me(
        &self,
        user: impl EntityRef<User>
    ) -> Pin<Box<dyn Future<Output = Result<bool, Error<Self::Error>>> + Send, Global>> { ... }
pub fn get_user(
        &self,
        id: Id<User>
    ) -> Pin<Box<dyn Future<Output = Result<User, Error<Self::Error>>> + Send, Global>> { ... }
pub fn get_users(
        &self,
        ids: impl IntoIterator<Item = Id<User>>
    ) -> Pin<Box<dyn Future<Output = Result<Vec<User, Global>, Error<Self::Error>>> + Send, Global>> { ... }
pub fn report_abuse(
        &self,
        user: impl EntityRef<User>,
        comment: impl Into<String>
    ) -> Pin<Box<dyn Future<Output = Result<(), Error<Self::Error>>> + Send, Global>> { ... }
pub fn search_users(
        &self,
        query: impl Into<String>
    ) -> PagerStream<Pin<Box<dyn Pager<Item = Result<Vec<User, Global>, Error<Self::Error>>, Content = User, Client = Self> + Send, Global>>> { ... }
pub fn users(&self) -> UserListBuilder<&Self> { ... }
pub fn recommended_users(
        &self
    ) -> PagerStream<Pin<Box<dyn Pager<Item = Result<Vec<User, Global>, Error<Self::Error>>, Content = User, Client = Self> + Send, Global>>> { ... }
pub fn frequently_replied_users(
        &self,
        user: impl EntityRef<User>
    ) -> Pin<Box<dyn Future<Output = Result<Vec<User, Global>, Error<Self::Error>>> + Send, Global>> { ... }
pub fn pinned_users(
        &self
    ) -> Pin<Box<dyn Future<Output = Result<Vec<User, Global>, Error<Self::Error>>> + Send, Global>> { ... }
pub fn build_note(&self) -> NoteBuilder<&Self> { ... }
pub fn delete_note(
        &self,
        note: impl EntityRef<Note>
    ) -> Pin<Box<dyn Future<Output = Result<(), Error<Self::Error>>> + Send, Global>> { ... }
pub fn get_note(
        &self,
        id: Id<Note>
    ) -> Pin<Box<dyn Future<Output = Result<Note, Error<Self::Error>>> + Send, Global>> { ... }
pub fn create_note(
        &self,
        text: impl Into<String>
    ) -> Pin<Box<dyn Future<Output = Result<Note, Error<Self::Error>>> + Send, Global>> { ... }
pub fn poll(
        &self,
        text: impl Into<String>,
        choices: impl IntoIterator<Item = impl Into<String>>
    ) -> Pin<Box<dyn Future<Output = Result<Note, Error<Self::Error>>> + Send, Global>> { ... }
pub fn reply(
        &self,
        note: impl EntityRef<Note>,
        text: impl Into<String>
    ) -> Pin<Box<dyn Future<Output = Result<Note, Error<Self::Error>>> + Send, Global>> { ... }
pub fn renote(
        &self,
        note: impl EntityRef<Note>
    ) -> Pin<Box<dyn Future<Output = Result<Note, Error<Self::Error>>> + Send, Global>> { ... }
pub fn quote(
        &self,
        note: impl EntityRef<Note>,
        text: impl Into<String>
    ) -> Pin<Box<dyn Future<Output = Result<Note, Error<Self::Error>>> + Send, Global>> { ... }
pub fn react(
        &self,
        note: impl EntityRef<Note>,
        reaction: impl Into<Reaction>
    ) -> Pin<Box<dyn Future<Output = Result<(), Error<Self::Error>>> + Send, Global>> { ... }
pub fn unreact(
        &self,
        note: impl EntityRef<Note>
    ) -> Pin<Box<dyn Future<Output = Result<(), Error<Self::Error>>> + Send, Global>> { ... }
pub fn favorite(
        &self,
        note: impl EntityRef<Note>
    ) -> Pin<Box<dyn Future<Output = Result<(), Error<Self::Error>>> + Send, Global>> { ... }
pub fn unfavorite(
        &self,
        note: impl EntityRef<Note>
    ) -> Pin<Box<dyn Future<Output = Result<(), Error<Self::Error>>> + Send, Global>> { ... }
pub fn watch(
        &self,
        note: impl EntityRef<Note>
    ) -> Pin<Box<dyn Future<Output = Result<(), Error<Self::Error>>> + Send, Global>> { ... }
pub fn unwatch(
        &self,
        note: impl EntityRef<Note>
    ) -> Pin<Box<dyn Future<Output = Result<(), Error<Self::Error>>> + Send, Global>> { ... }
pub fn is_favorited(
        &self,
        note: impl EntityRef<Note>
    ) -> Pin<Box<dyn Future<Output = Result<bool, Error<Self::Error>>> + Send, Global>> { ... }
pub fn is_watched(
        &self,
        note: impl EntityRef<Note>
    ) -> Pin<Box<dyn Future<Output = Result<bool, Error<Self::Error>>> + Send, Global>> { ... }
pub fn vote(
        &self,
        note: impl EntityRef<Note>,
        choice: u64
    ) -> Pin<Box<dyn Future<Output = Result<(), Error<Self::Error>>> + Send, Global>> { ... }
pub fn featured_notes(
        &self
    ) -> PagerStream<Pin<Box<dyn Pager<Item = Result<Vec<Note, Global>, Error<Self::Error>>, Content = Note, Client = Self> + Send, Global>>> { ... }
pub fn conversation(
        &self,
        note: impl EntityRef<Note>
    ) -> PagerStream<Pin<Box<dyn Pager<Item = Result<Vec<Note, Global>, Error<Self::Error>>, Content = Note, Client = Self> + Send, Global>>> { ... }
pub fn children_notes(
        &self,
        note: impl EntityRef<Note>
    ) -> PagerStream<Pin<Box<dyn Pager<Item = Result<Vec<Note, Global>, Error<Self::Error>>, Content = Note, Client = Self> + Send, Global>>> { ... }
pub fn mentioned_notes(
        &self
    ) -> PagerStream<Pin<Box<dyn Pager<Item = Result<Vec<Note, Global>, Error<Self::Error>>, Content = Note, Client = Self> + Send, Global>>> { ... }
pub fn renotes(
        &self,
        note: impl EntityRef<Note>
    ) -> PagerStream<Pin<Box<dyn Pager<Item = Result<Vec<Note, Global>, Error<Self::Error>>, Content = Note, Client = Self> + Send, Global>>> { ... }
pub fn replies(
        &self,
        note: impl EntityRef<Note>
    ) -> PagerStream<Pin<Box<dyn Pager<Item = Result<Vec<Note, Global>, Error<Self::Error>>, Content = Note, Client = Self> + Send, Global>>> { ... }
pub fn search_notes(
        &self,
        query: impl Into<String>
    ) -> PagerStream<Pin<Box<dyn Pager<Item = Result<Vec<Note, Global>, Error<Self::Error>>, Content = Note, Client = Self> + Send, Global>>> { ... }
pub fn local_notes(
        &self,
        range: impl Into<TimelineRange<Note>>
    ) -> PagerStream<Pin<Box<dyn Pager<Item = Result<Vec<Note, Global>, Error<Self::Error>>, Content = Note, Client = Self> + Send, Global>>> { ... }
pub fn local_notes_since(
        &self,
        since: impl Into<TimelineCursor<Note>>
    ) -> PagerStream<Pin<Box<dyn Pager<Item = Result<Vec<Note, Global>, Error<Self::Error>>, Content = Note, Client = Self> + Send, Global>>> { ... }
pub fn local_notes_around(
        &self,
        cursor: impl Into<TimelineCursor<Note>>
    ) -> (PagerStream<Pin<Box<dyn Pager<Item = Result<Vec<Note, Global>, Error<Self::Error>>, Content = Note, Client = Self> + Send, Global>>>, PagerStream<Pin<Box<dyn Pager<Item = Result<Vec<Note, Global>, Error<Self::Error>>, Content = Note, Client = Self> + Send, Global>>>) { ... }
pub fn global_notes(
        &self,
        range: impl Into<TimelineRange<Note>>
    ) -> PagerStream<Pin<Box<dyn Pager<Item = Result<Vec<Note, Global>, Error<Self::Error>>, Content = Note, Client = Self> + Send, Global>>> { ... }
pub fn global_notes_since(
        &self,
        since: impl Into<TimelineCursor<Note>>
    ) -> PagerStream<Pin<Box<dyn Pager<Item = Result<Vec<Note, Global>, Error<Self::Error>>, Content = Note, Client = Self> + Send, Global>>> { ... }
pub fn global_notes_around(
        &self,
        cursor: impl Into<TimelineCursor<Note>>
    ) -> (PagerStream<Pin<Box<dyn Pager<Item = Result<Vec<Note, Global>, Error<Self::Error>>, Content = Note, Client = Self> + Send, Global>>>, PagerStream<Pin<Box<dyn Pager<Item = Result<Vec<Note, Global>, Error<Self::Error>>, Content = Note, Client = Self> + Send, Global>>>) { ... }
pub fn social_notes(
        &self,
        range: impl Into<TimelineRange<Note>>
    ) -> PagerStream<Pin<Box<dyn Pager<Item = Result<Vec<Note, Global>, Error<Self::Error>>, Content = Note, Client = Self> + Send, Global>>> { ... }
pub fn social_notes_since(
        &self,
        since: impl Into<TimelineCursor<Note>>
    ) -> PagerStream<Pin<Box<dyn Pager<Item = Result<Vec<Note, Global>, Error<Self::Error>>, Content = Note, Client = Self> + Send, Global>>> { ... }
pub fn social_notes_around(
        &self,
        cursor: impl Into<TimelineCursor<Note>>
    ) -> (PagerStream<Pin<Box<dyn Pager<Item = Result<Vec<Note, Global>, Error<Self::Error>>, Content = Note, Client = Self> + Send, Global>>>, PagerStream<Pin<Box<dyn Pager<Item = Result<Vec<Note, Global>, Error<Self::Error>>, Content = Note, Client = Self> + Send, Global>>>) { ... }
pub fn home_notes(
        &self,
        range: impl Into<TimelineRange<Note>>
    ) -> PagerStream<Pin<Box<dyn Pager<Item = Result<Vec<Note, Global>, Error<Self::Error>>, Content = Note, Client = Self> + Send, Global>>> { ... }
pub fn home_notes_since(
        &self,
        since: impl Into<TimelineCursor<Note>>
    ) -> PagerStream<Pin<Box<dyn Pager<Item = Result<Vec<Note, Global>, Error<Self::Error>>, Content = Note, Client = Self> + Send, Global>>> { ... }
pub fn home_notes_around(
        &self,
        cursor: impl Into<TimelineCursor<Note>>
    ) -> (PagerStream<Pin<Box<dyn Pager<Item = Result<Vec<Note, Global>, Error<Self::Error>>, Content = Note, Client = Self> + Send, Global>>>, PagerStream<Pin<Box<dyn Pager<Item = Result<Vec<Note, Global>, Error<Self::Error>>, Content = Note, Client = Self> + Send, Global>>>) { ... }
pub fn user_notes(
        &self,
        user: impl EntityRef<User>,
        range: impl Into<TimelineRange<Note>>
    ) -> PagerStream<Pin<Box<dyn Pager<Item = Result<Vec<Note, Global>, Error<Self::Error>>, Content = Note, Client = Self> + Send, Global>>> { ... }
pub fn user_notes_since(
        &self,
        user: impl EntityRef<User>,
        since: impl Into<TimelineCursor<Note>>
    ) -> PagerStream<Pin<Box<dyn Pager<Item = Result<Vec<Note, Global>, Error<Self::Error>>, Content = Note, Client = Self> + Send, Global>>> { ... }
pub fn user_notes_around(
        &self,
        user: impl EntityRef<User>,
        cursor: impl Into<TimelineCursor<Note>>
    ) -> (PagerStream<Pin<Box<dyn Pager<Item = Result<Vec<Note, Global>, Error<Self::Error>>, Content = Note, Client = Self> + Send, Global>>>, PagerStream<Pin<Box<dyn Pager<Item = Result<Vec<Note, Global>, Error<Self::Error>>, Content = Note, Client = Self> + Send, Global>>>) { ... }
pub fn user_list_notes(
        &self,
        list: impl EntityRef<UserList>,
        range: impl Into<TimelineRange<Note>>
    ) -> PagerStream<Pin<Box<dyn Pager<Item = Result<Vec<Note, Global>, Error<Self::Error>>, Content = Note, Client = Self> + Send, Global>>> { ... }
pub fn user_list_notes_since(
        &self,
        list: impl EntityRef<UserList>,
        since: impl Into<TimelineCursor<Note>>
    ) -> PagerStream<Pin<Box<dyn Pager<Item = Result<Vec<Note, Global>, Error<Self::Error>>, Content = Note, Client = Self> + Send, Global>>> { ... }
pub fn user_list_notes_around(
        &self,
        list: impl EntityRef<UserList>,
        cursor: impl Into<TimelineCursor<Note>>
    ) -> (PagerStream<Pin<Box<dyn Pager<Item = Result<Vec<Note, Global>, Error<Self::Error>>, Content = Note, Client = Self> + Send, Global>>>, PagerStream<Pin<Box<dyn Pager<Item = Result<Vec<Note, Global>, Error<Self::Error>>, Content = Note, Client = Self> + Send, Global>>>) { ... }
pub fn channel_notes(
        &self,
        channel: impl EntityRef<Channel>,
        range: impl Into<TimelineRange<Note>>
    ) -> PagerStream<Pin<Box<dyn Pager<Item = Result<Vec<Note, Global>, Error<Self::Error>>, Content = Note, Client = Self> + Send, Global>>> { ... }
pub fn channel_notes_since(
        &self,
        channel: impl EntityRef<Channel>,
        since: impl Into<TimelineCursor<Note>>
    ) -> PagerStream<Pin<Box<dyn Pager<Item = Result<Vec<Note, Global>, Error<Self::Error>>, Content = Note, Client = Self> + Send, Global>>> { ... }
pub fn channel_notes_around(
        &self,
        channel: impl EntityRef<Channel>,
        cursor: impl Into<TimelineCursor<Note>>
    ) -> (PagerStream<Pin<Box<dyn Pager<Item = Result<Vec<Note, Global>, Error<Self::Error>>, Content = Note, Client = Self> + Send, Global>>>, PagerStream<Pin<Box<dyn Pager<Item = Result<Vec<Note, Global>, Error<Self::Error>>, Content = Note, Client = Self> + Send, Global>>>) { ... }
pub fn tagged_notes(
        &self,
        query: impl Into<Query<Tag>>
    ) -> PagerStream<Pin<Box<dyn Pager<Item = Result<Vec<Note, Global>, Error<Self::Error>>, Content = Note, Client = Self> + Send, Global>>> { ... }
pub fn local_notes_with_file_types(
        &self,
        types: impl IntoIterator<Item = Mime>
    ) -> PagerStream<Pin<Box<dyn Pager<Item = Result<Vec<Note, Global>, Error<Self::Error>>, Content = Note, Client = Self> + Send, Global>>> { ... }
pub fn create_user_list(
        &self,
        name: impl Into<String>
    ) -> Pin<Box<dyn Future<Output = Result<UserList, Error<Self::Error>>> + Send, Global>> { ... }
pub fn delete_user_list(
        &self,
        list: impl EntityRef<UserList>
    ) -> Pin<Box<dyn Future<Output = Result<(), Error<Self::Error>>> + Send, Global>> { ... }
pub fn rename_user_list(
        &self,
        list: impl EntityRef<UserList>,
        name: impl Into<String>
    ) -> Pin<Box<dyn Future<Output = Result<UserList, Error<Self::Error>>> + Send, Global>> { ... }
pub fn get_user_list(
        &self,
        id: Id<UserList>
    ) -> Pin<Box<dyn Future<Output = Result<UserList, Error<Self::Error>>> + Send, Global>> { ... }
pub fn push_to_user_list(
        &self,
        list: impl EntityRef<UserList>,
        user: impl EntityRef<User>
    ) -> Pin<Box<dyn Future<Output = Result<(), Error<Self::Error>>> + Send, Global>> { ... }
pub fn pull_from_user_list(
        &self,
        list: impl EntityRef<UserList>,
        user: impl EntityRef<User>
    ) -> Pin<Box<dyn Future<Output = Result<(), Error<Self::Error>>> + Send, Global>> { ... }
pub fn create_user_group(
        &self,
        name: impl Into<String>
    ) -> Pin<Box<dyn Future<Output = Result<UserGroup, Error<Self::Error>>> + Send, Global>> { ... }
pub fn delete_user_group(
        &self,
        group: impl EntityRef<UserGroup>
    ) -> Pin<Box<dyn Future<Output = Result<(), Error<Self::Error>>> + Send, Global>> { ... }
pub fn rename_user_group(
        &self,
        group: impl EntityRef<UserGroup>,
        name: impl Into<String>
    ) -> Pin<Box<dyn Future<Output = Result<UserGroup, Error<Self::Error>>> + Send, Global>> { ... }
pub fn get_user_group(
        &self,
        id: Id<UserGroup>
    ) -> Pin<Box<dyn Future<Output = Result<UserGroup, Error<Self::Error>>> + Send, Global>> { ... }
pub fn invite_to_user_group(
        &self,
        group: impl EntityRef<UserGroup>,
        user: impl EntityRef<User>
    ) -> Pin<Box<dyn Future<Output = Result<(), Error<Self::Error>>> + Send, Global>> { ... }
pub fn pull_from_user_group(
        &self,
        group: impl EntityRef<UserGroup>,
        user: impl EntityRef<User>
    ) -> Pin<Box<dyn Future<Output = Result<(), Error<Self::Error>>> + Send, Global>> { ... }
pub fn transfer_user_group(
        &self,
        group: impl EntityRef<UserGroup>,
        user: impl EntityRef<User>
    ) -> Pin<Box<dyn Future<Output = Result<UserGroup, Error<Self::Error>>> + Send, Global>> { ... }
pub fn user_group_invitations(
        &self
    ) -> PagerStream<Pin<Box<dyn Pager<Item = Result<Vec<UserGroupInvitation, Global>, Error<Self::Error>>, Content = UserGroupInvitation, Client = Self> + Send, Global>>> { ... }
pub fn accept_user_group_invitation(
        &self,
        invitation: impl EntityRef<UserGroupInvitation>
    ) -> Pin<Box<dyn Future<Output = Result<(), Error<Self::Error>>> + Send, Global>> { ... }
pub fn reject_user_group_invitation(
        &self,
        invitation: impl EntityRef<UserGroupInvitation>
    ) -> Pin<Box<dyn Future<Output = Result<(), Error<Self::Error>>> + Send, Global>> { ... }
pub fn joined_user_groups(
        &self
    ) -> Pin<Box<dyn Future<Output = Result<Vec<UserGroup, Global>, Error<Self::Error>>> + Send, Global>> { ... }
pub fn owned_user_groups(
        &self
    ) -> Pin<Box<dyn Future<Output = Result<Vec<UserGroup, Global>, Error<Self::Error>>> + Send, Global>> { ... }
pub fn create_antenna(
        &self,
        name: impl Into<String>,
        query: impl Into<Query<String>>
    ) -> Pin<Box<dyn Future<Output = Result<Antenna, Error<Self::Error>>> + Send, Global>> { ... }
pub fn build_antenna(&self) -> AntennaBuilder<&Self> { ... }
pub fn delete_antenna(
        &self,
        antenna: impl EntityRef<Antenna>
    ) -> Pin<Box<dyn Future<Output = Result<(), Error<Self::Error>>> + Send, Global>> { ... }
pub fn get_antenna(
        &self,
        id: Id<Antenna>
    ) -> Pin<Box<dyn Future<Output = Result<Antenna, Error<Self::Error>>> + Send, Global>> { ... }
pub fn update_antenna(
        &self,
        antenna: Antenna
    ) -> AntennaUpdateBuilder<&Self> { ... }
pub fn antennas(
        &self
    ) -> Pin<Box<dyn Future<Output = Result<Vec<Antenna, Global>, Error<Self::Error>>> + Send, Global>> { ... }
pub fn antenna_notes(
        &self,
        antenna: impl EntityRef<Antenna>
    ) -> PagerStream<Pin<Box<dyn Pager<Item = Result<Vec<Note, Global>, Error<Self::Error>>, Content = Note, Client = Self> + Send, Global>>> { ... }
pub fn create_channel(
        &self,
        name: impl Into<String>
    ) -> Pin<Box<dyn Future<Output = Result<Channel, Error<Self::Error>>> + Send, Global>> { ... }
pub fn build_channel(&self) -> ChannelBuilder<&Self> { ... }
pub fn get_channel(
        &self,
        id: Id<Channel>
    ) -> Pin<Box<dyn Future<Output = Result<Channel, Error<Self::Error>>> + Send, Global>> { ... }
pub fn update_channel(
        &self,
        channel: impl EntityRef<Channel>
    ) -> ChannelUpdateBuilder<&Self> { ... }
pub fn follow_channel(
        &self,
        channel: impl EntityRef<Channel>
    ) -> Pin<Box<dyn Future<Output = Result<(), Error<Self::Error>>> + Send, Global>> { ... }
pub fn unfollow_channel(
        &self,
        channel: impl EntityRef<Channel>
    ) -> Pin<Box<dyn Future<Output = Result<(), Error<Self::Error>>> + Send, Global>> { ... }
pub fn followed_channels(
        &self
    ) -> PagerStream<Pin<Box<dyn Pager<Item = Result<Vec<Channel, Global>, Error<Self::Error>>, Content = Channel, Client = Self> + Send, Global>>> { ... }
pub fn owned_channels(
        &self
    ) -> PagerStream<Pin<Box<dyn Pager<Item = Result<Vec<Channel, Global>, Error<Self::Error>>, Content = Channel, Client = Self> + Send, Global>>> { ... }
pub fn featured_channels(
        &self
    ) -> Pin<Box<dyn Future<Output = Result<Vec<Channel, Global>, Error<Self::Error>>> + Send, Global>> { ... }
pub fn create_clip(
        &self,
        name: impl Into<String>
    ) -> Pin<Box<dyn Future<Output = Result<Clip, Error<Self::Error>>> + Send, Global>> { ... }
pub fn build_clip(&self) -> ClipBuilder<&Self> { ... }
pub fn delete_clip(
        &self,
        clip: impl EntityRef<Clip>
    ) -> Pin<Box<dyn Future<Output = Result<(), Error<Self::Error>>> + Send, Global>> { ... }
pub fn clips(
        &self
    ) -> Pin<Box<dyn Future<Output = Result<Vec<Clip, Global>, Error<Self::Error>>> + Send, Global>> { ... }
pub fn note_clips(
        &self,
        note: impl EntityRef<Note>
    ) -> Pin<Box<dyn Future<Output = Result<Vec<Clip, Global>, Error<Self::Error>>> + Send, Global>> { ... }
pub fn clip_note(
        &self,
        clip: impl EntityRef<Clip>,
        note: impl EntityRef<Note>
    ) -> Pin<Box<dyn Future<Output = Result<(), Error<Self::Error>>> + Send, Global>> { ... }
pub fn clip_notes(
        &self,
        clip: impl EntityRef<Clip>
    ) -> PagerStream<Pin<Box<dyn Pager<Item = Result<Vec<Note, Global>, Error<Self::Error>>, Content = Note, Client = Self> + Send, Global>>> { ... }
pub fn get_clip(
        &self,
        id: Id<Clip>
    ) -> Pin<Box<dyn Future<Output = Result<Clip, Error<Self::Error>>> + Send, Global>> { ... }
pub fn update_clip(&self, clip: Clip) -> ClipUpdateBuilder<&Self> { ... }
pub fn user_clips(
        &self,
        user: impl EntityRef<User>
    ) -> PagerStream<Pin<Box<dyn Pager<Item = Result<Vec<Clip, Global>, Error<Self::Error>>, Content = Clip, Client = Self> + Send, Global>>> { ... }
pub fn create_message(
        &self,
        recipient: impl EntityRef<User>,
        text: impl Into<String>
    ) -> Pin<Box<dyn Future<Output = Result<MessagingMessage, Error<Self::Error>>> + Send, Global>> { ... }
pub fn create_group_message(
        &self,
        recipient: impl EntityRef<UserGroup>,
        text: impl Into<String>
    ) -> Pin<Box<dyn Future<Output = Result<MessagingMessage, Error<Self::Error>>> + Send, Global>> { ... }
pub fn build_message(&self) -> MessagingMessageBuilder<&Self> { ... }
pub fn delete_message(
        &self,
        message: impl EntityRef<MessagingMessage>
    ) -> Pin<Box<dyn Future<Output = Result<(), Error<Self::Error>>> + Send, Global>> { ... }
pub fn read_message(
        &self,
        message: impl EntityRef<MessagingMessage>
    ) -> Pin<Box<dyn Future<Output = Result<(), Error<Self::Error>>> + Send, Global>> { ... }
pub fn user_messages(
        &self,
        user: impl EntityRef<User>
    ) -> PagerStream<Pin<Box<dyn Pager<Item = Result<Vec<MessagingMessage, Global>, Error<Self::Error>>, Content = MessagingMessage, Client = Self> + Send, Global>>> { ... }
pub fn group_messages(
        &self,
        group: impl EntityRef<UserGroup>
    ) -> PagerStream<Pin<Box<dyn Pager<Item = Result<Vec<MessagingMessage, Global>, Error<Self::Error>>, Content = MessagingMessage, Client = Self> + Send, Global>>> { ... }
pub fn messaging_history(
        &self
    ) -> Pin<Box<dyn Future<Output = Result<Vec<MessagingMessage, Global>, Error<Self::Error>>> + Send, Global>> { ... }
pub fn upload_file_from_url(
        &self,
        url: Url
    ) -> Pin<Box<dyn Future<Output = Result<(), Error<Self::Error>>> + Send, Global>> { ... }
pub fn build_file_from_url(&self, url: Url) -> DriveFileUrlBuilder<&Self> { ... }
pub fn delete_file(
        &self,
        file: impl EntityRef<DriveFile>
    ) -> Pin<Box<dyn Future<Output = Result<(), Error<Self::Error>>> + Send, Global>> { ... }
pub fn update_file(
        &self,
        file: impl EntityRef<DriveFile>
    ) -> DriveFileUpdateBuilder<&Self> { ... }
pub fn get_file(
        &self,
        id: Id<DriveFile>
    ) -> Pin<Box<dyn Future<Output = Result<DriveFile, Error<Self::Error>>> + Send, Global>> { ... }
pub fn create_folder(
        &self,
        name: impl Into<String>
    ) -> Pin<Box<dyn Future<Output = Result<DriveFolder, Error<Self::Error>>> + Send, Global>> { ... }
pub fn create_folder_with_parent(
        &self,
        name: impl Into<String>,
        parent: impl EntityRef<DriveFolder>
    ) -> Pin<Box<dyn Future<Output = Result<DriveFolder, Error<Self::Error>>> + Send, Global>> { ... }
pub fn delete_folder(
        &self,
        folder: impl EntityRef<DriveFolder>
    ) -> Pin<Box<dyn Future<Output = Result<(), Error<Self::Error>>> + Send, Global>> { ... }
pub fn update_folder(
        &self,
        folder: impl EntityRef<DriveFolder>
    ) -> DriveFolderUpdateBuilder<&Self> { ... }
pub fn get_folder(
        &self,
        id: Id<DriveFolder>
    ) -> Pin<Box<dyn Future<Output = Result<DriveFolder, Error<Self::Error>>> + Send, Global>> { ... }
pub fn attached_notes(
        &self,
        file: impl EntityRef<DriveFile>
    ) -> Pin<Box<dyn Future<Output = Result<Vec<Note, Global>, Error<Self::Error>>> + Send, Global>> { ... }
pub fn find_file_by_name(
        &self,
        name: impl Into<String>
    ) -> Pin<Box<dyn Future<Output = Result<Vec<DriveFile, Global>, Error<Self::Error>>> + Send, Global>> { ... }
pub fn find_file_by_name_in_folder(
        &self,
        name: impl Into<String>,
        folder: impl EntityRef<DriveFolder>
    ) -> Pin<Box<dyn Future<Output = Result<Vec<DriveFile, Global>, Error<Self::Error>>> + Send, Global>> { ... }
pub fn find_folder_by_name(
        &self,
        name: impl Into<String>
    ) -> Pin<Box<dyn Future<Output = Result<Vec<DriveFolder, Global>, Error<Self::Error>>> + Send, Global>> { ... }
pub fn find_folder_by_name_in_folder(
        &self,
        name: impl Into<String>,
        folder: impl EntityRef<DriveFolder>
    ) -> Pin<Box<dyn Future<Output = Result<Vec<DriveFolder, Global>, Error<Self::Error>>> + Send, Global>> { ... }
pub fn files(&self) -> DriveFileListBuilder<&Self> { ... }
pub fn folders(
        &self
    ) -> PagerStream<Pin<Box<dyn Pager<Item = Result<Vec<DriveFolder, Global>, Error<Self::Error>>, Content = DriveFolder, Client = Self> + Send, Global>>> { ... }
pub fn folders_in_folder(
        &self,
        folder: impl EntityRef<DriveFolder>
    ) -> PagerStream<Pin<Box<dyn Pager<Item = Result<Vec<DriveFolder, Global>, Error<Self::Error>>, Content = DriveFolder, Client = Self> + Send, Global>>> { ... }
pub fn add_moderator(
        &self,
        user: impl EntityRef<User>
    ) -> Pin<Box<dyn Future<Output = Result<(), Error<Self::Error>>> + Send, Global>> { ... }
pub fn remove_moderator(
        &self,
        user: impl EntityRef<User>
    ) -> Pin<Box<dyn Future<Output = Result<(), Error<Self::Error>>> + Send, Global>> { ... }
pub fn promote_note(
        &self,
        note: impl EntityRef<Note>,
        expires_at: DateTime<Utc>
    ) -> Pin<Box<dyn Future<Output = Result<(), Error<Self::Error>>> + Send, Global>> { ... }
pub fn abuse_user_reports(
        &self
    ) -> PagerStream<Pin<Box<dyn Pager<Item = Result<Vec<AbuseUserReport, Global>, Error<Self::Error>>, Content = AbuseUserReport, Client = Self> + Send, Global>>> { ... }
pub fn resolve_abuse_user_report(
        &self,
        report: impl EntityRef<AbuseUserReport>
    ) -> Pin<Box<dyn Future<Output = Result<(), Error<Self::Error>>> + Send, Global>> { ... }
pub fn server_logs(&self) -> ServerLogListBuilder<&Self> { ... }
pub fn moderation_logs(
        &self
    ) -> PagerStream<Pin<Box<dyn Pager<Item = Result<Vec<ModerationLog, Global>, Error<Self::Error>>, Content = ModerationLog, Client = Self> + Send, Global>>> { ... }
pub fn silence(
        &self,
        user: impl EntityRef<User>
    ) -> Pin<Box<dyn Future<Output = Result<(), Error<Self::Error>>> + Send, Global>> { ... }
pub fn suspend(
        &self,
        user: impl EntityRef<User>
    ) -> Pin<Box<dyn Future<Output = Result<(), Error<Self::Error>>> + Send, Global>> { ... }
pub fn unsilence(
        &self,
        user: impl EntityRef<User>
    ) -> Pin<Box<dyn Future<Output = Result<(), Error<Self::Error>>> + Send, Global>> { ... }
pub fn unsuspend(
        &self,
        user: impl EntityRef<User>
    ) -> Pin<Box<dyn Future<Output = Result<(), Error<Self::Error>>> + Send, Global>> { ... }
pub fn update_meta(&self) -> MetaUpdateBuilder<&Self> { ... }
pub fn create_announcement(
        &self,
        title: impl Into<String>,
        text: impl Into<String>
    ) -> Pin<Box<dyn Future<Output = Result<Announcement, Error<Self::Error>>> + Send, Global>> { ... }
pub fn create_announcement_with_image(
        &self,
        title: impl Into<String>,
        text: impl Into<String>,
        image_url: Url
    ) -> Pin<Box<dyn Future<Output = Result<Announcement, Error<Self::Error>>> + Send, Global>> { ... }
pub fn delete_announcement(
        &self,
        announcement: impl EntityRef<Announcement>
    ) -> Pin<Box<dyn Future<Output = Result<(), Error<Self::Error>>> + Send, Global>> { ... }
pub fn update_announcement(
        &self,
        announcement: Announcement
    ) -> AnnouncementUpdateBuilder<&Self> { ... }
pub fn create_emoji(
        &self,
        file: impl EntityRef<DriveFile>
    ) -> Pin<Box<dyn Future<Output = Result<Id<Emoji>, Error<Self::Error>>> + Send, Global>> { ... }
pub fn delete_emoji(
        &self,
        emoji: impl EntityRef<Emoji>
    ) -> Pin<Box<dyn Future<Output = Result<(), Error<Self::Error>>> + Send, Global>> { ... }
pub fn update_emoji(&self, emoji: Emoji) -> EmojiUpdateBuilder<&Self> { ... }
pub fn copy_emoji(
        &self,
        emoji: impl EntityRef<Emoji>
    ) -> Pin<Box<dyn Future<Output = Result<Id<Emoji>, Error<Self::Error>>> + Send, Global>> { ... }
pub fn emojis(
        &self
    ) -> PagerStream<Pin<Box<dyn Pager<Item = Result<Vec<Emoji, Global>, Error<Self::Error>>, Content = Emoji, Client = Self> + Send, Global>>> { ... }
pub fn search_emojis(
        &self,
        query: impl Into<String>
    ) -> PagerStream<Pin<Box<dyn Pager<Item = Result<Vec<Emoji, Global>, Error<Self::Error>>, Content = Emoji, Client = Self> + Send, Global>>> { ... }
pub fn meta(
        &self
    ) -> Pin<Box<dyn Future<Output = Result<Meta, Error<Self::Error>>> + Send, Global>> { ... }
pub fn announcements(
        &self
    ) -> PagerStream<Pin<Box<dyn Pager<Item = Result<Vec<Announcement, Global>, Error<Self::Error>>, Content = Announcement, Client = Self> + Send, Global>>> { ... }
pub fn featured_pages(
        &self
    ) -> Pin<Box<dyn Future<Output = Result<Vec<Page, Global>, Error<Self::Error>>> + Send, Global>> { ... }
pub fn user_pages(
        &self,
        user: impl EntityRef<User>
    ) -> PagerStream<Pin<Box<dyn Pager<Item = Result<Vec<Page, Global>, Error<Self::Error>>, Content = Page, Client = Self> + Send, Global>>> { ... }
pub fn mark_all_notifications_as_read(
        &self
    ) -> Pin<Box<dyn Future<Output = Result<(), Error<Self::Error>>> + Send, Global>> { ... }
pub fn create_notification(
        &self,
        body: impl Into<String>
    ) -> Pin<Box<dyn Future<Output = Result<(), Error<Self::Error>>> + Send, Global>> { ... }
pub fn build_notification(&self) -> NotificationBuilder<&Self> { ... } }

An extension trait for Client that provides convenient high-level APIs.

Streams

Some methods (e.g. followers, local_notes, etc.) return a Stream that uses pagination to fetch all entries. You can use methods from TryStreamExt or StreamExt to work with this.

Provided methods

pub fn me(
    &self
) -> Pin<Box<dyn Future<Output = Result<User, Error<Self::Error>>> + Send, Global>>
[src]

Gets the information of the user who is logged in with this client.

Examples

let me = client.me().await?;
println!("Logged in as @{}", me.username);

pub fn update_me(&self) -> MeUpdateBuilder<&Self>[src]

Updates the user logged in with this client.

This method actually returns a builder, namely MeUpdateBuilder. You can chain the method calls to it corresponding to the fields you want to update. Finally, calling update method will actually perform the update. See MeUpdateBuilder for the fields that can be updated.

Examples

// Flag it as a bot and set the name to "my awesome bot"
let updated = client
    .update_me()
    .bot(true)
    .set_name("my awesome bot")
    .update()
    .await?;

assert!(updated.is_bot);
assert_eq!(updated.name.unwrap(), "my awesome bot");

pub fn follow(
    &self,
    user: impl EntityRef<User>
) -> Pin<Box<dyn Future<Output = Result<User, Error<Self::Error>>> + Send, Global>>
[src]

Follows the specified user.

pub fn unfollow(
    &self,
    user: impl EntityRef<User>
) -> Pin<Box<dyn Future<Output = Result<User, Error<Self::Error>>> + Send, Global>>
[src]

Unfollows the specified user.

pub fn mute(
    &self,
    user: impl EntityRef<User>
) -> Pin<Box<dyn Future<Output = Result<(), Error<Self::Error>>> + Send, Global>>
[src]

Mutes the specified user.

pub fn unmute(
    &self,
    user: impl EntityRef<User>
) -> Pin<Box<dyn Future<Output = Result<(), Error<Self::Error>>> + Send, Global>>
[src]

Unmutes the specified user.

pub fn block(
    &self,
    user: impl EntityRef<User>
) -> Pin<Box<dyn Future<Output = Result<User, Error<Self::Error>>> + Send, Global>>
[src]

Blocks the specified user.

pub fn unblock(
    &self,
    user: impl EntityRef<User>
) -> Pin<Box<dyn Future<Output = Result<User, Error<Self::Error>>> + Send, Global>>
[src]

Unblocks the specified user.

pub fn followers(
    &self,
    user: impl EntityRef<User>
) -> PagerStream<Pin<Box<dyn Pager<Item = Result<Vec<User, Global>, Error<Self::Error>>, Content = User, Client = Self> + Send, Global>>>
[src]

Lists the followers of the specified user.

Examples

This example uses TryStreamExt::try_next and while let to retrieve notifications one after another until there are no more.

use futures::stream::{StreamExt, TryStreamExt};

// In this example, we will fetch all the followers and follow them.
// First, obtain your information to pass to `.follwers` method.
let me = client.me().await?;

// `follwers` variable here is a `Stream` to enumerate first 50 followers of `me`.
let mut followers = client.followers(&me).take(50);

// Retrieve all followers until there are no more.
while let Some(user) = followers.try_next().await? {
    // Follow the `user` if you haven't already.
    if !client.is_following(&user).await? {
        client.follow(&user).await?;
    }
}

pub fn following(
    &self,
    user: impl EntityRef<User>
) -> PagerStream<Pin<Box<dyn Pager<Item = Result<Vec<User, Global>, Error<Self::Error>>, Content = User, Client = Self> + Send, Global>>>
[src]

Lists the users that the specified user is following.

pub fn pin_note(
    &self,
    note: impl EntityRef<Note>
) -> Pin<Box<dyn Future<Output = Result<User, Error<Self::Error>>> + Send, Global>>
[src]

Pins the specified note to the profile.

pub fn unpin_note(
    &self,
    note: impl EntityRef<Note>
) -> Pin<Box<dyn Future<Output = Result<User, Error<Self::Error>>> + Send, Global>>
[src]

Unpins the specified note to the profile.

pub fn follow_requests(
    &self
) -> Pin<Box<dyn Future<Output = Result<Vec<FollowRequest, Global>, Error<Self::Error>>> + Send, Global>>
[src]

Lists the follow requests sent to the user logged in with this client.

Examples

// Accept all follow requests
for request in client.follow_requests().await? {
    client.accept_follow_request(&request.follower).await?;
}

pub fn cancel_follow_request(
    &self,
    user: impl EntityRef<User>
) -> Pin<Box<dyn Future<Output = Result<User, Error<Self::Error>>> + Send, Global>>
[src]

Cancels the follow request being sent to the specified user.

pub fn accept_follow_request(
    &self,
    user: impl EntityRef<User>
) -> Pin<Box<dyn Future<Output = Result<(), Error<Self::Error>>> + Send, Global>>
[src]

Accepts the follow request that have been received from the specified user.

pub fn reject_follow_request(
    &self,
    user: impl EntityRef<User>
) -> Pin<Box<dyn Future<Output = Result<(), Error<Self::Error>>> + Send, Global>>
[src]

Rejects the follow request that have been received from the specified user.

pub fn muting_users(
    &self
) -> PagerStream<Pin<Box<dyn Pager<Item = Result<Vec<User, Global>, Error<Self::Error>>, Content = User, Client = Self> + Send, Global>>>
[src]

Lists the users muted by the user logged in with this client.

pub fn blocking_users(
    &self
) -> PagerStream<Pin<Box<dyn Pager<Item = Result<Vec<User, Global>, Error<Self::Error>>, Content = User, Client = Self> + Send, Global>>>
[src]

Lists the users blocked by the user logged in with this client.

pub fn favorited_notes(
    &self
) -> PagerStream<Pin<Box<dyn Pager<Item = Result<Vec<Note, Global>, Error<Self::Error>>, Content = Note, Client = Self> + Send, Global>>>
[src]

Lists the notes favorited by the user logged in with this client.

pub fn notifications(
    &self
) -> PagerStream<Pin<Box<dyn Pager<Item = Result<Vec<Notification, Global>, Error<Self::Error>>, Content = Notification, Client = Self> + Send, Global>>>
[src]

Lists the notifications to the user logged in with this client.

Examples

This example uses TryStreamExt::try_next and while let to retrieve notifications one after another until there are no more.

use futures::stream::{StreamExt, TryStreamExt};

// `notifications` here is a `Stream` to enumerate first 10 notifications.
let mut notifications = client.notifications().take(10);
// Retrieve notifications until there are no more.
while let Some(notification) = notifications.try_next().await? {
    // Print some information about the notification.
    println!("notification {}: created at {}", notification.id, notification.created_at);
}

pub fn user_relation(
    &self,
    user: impl EntityRef<User>
) -> Pin<Box<dyn Future<Output = Result<UserRelation, Error<Self::Error>>> + Send, Global>>
[src]

Returns the relationship between the specified user and the user logged in with this client.

The returned UserRelation object records the various information. There are separate methods to examine each relationship (e.g. is_following), so if you are only interested in one relationship, it can be simpler to use those.

pub fn is_following(
    &self,
    user: impl EntityRef<User>
) -> Pin<Box<dyn Future<Output = Result<bool, Error<Self::Error>>> + Send, Global>>
[src]

Checks if the specified user is followed by the user logged in with this client.

If you are also interested in other relationships, use user_relation.

let relation = client.user_relation(&user).await?;
assert_eq!(client.is_following(&user).await?, relation.is_following);

pub fn is_followed(
    &self,
    user: impl EntityRef<User>
) -> Pin<Box<dyn Future<Output = Result<bool, Error<Self::Error>>> + Send, Global>>
[src]

Checks if the specified user follows the user logged in with this client.

If you are also interested in other relationships, use user_relation.

let relation = client.user_relation(&user).await?;
assert_eq!(client.is_followed(&user).await?, relation.is_followed);

pub fn is_blocking(
    &self,
    user: impl EntityRef<User>
) -> Pin<Box<dyn Future<Output = Result<bool, Error<Self::Error>>> + Send, Global>>
[src]

Checks if the specified user is blocked by the user logged in with this client.

If you are also interested in other relationships, use user_relation.

let relation = client.user_relation(&user).await?;
assert_eq!(client.is_blocking(&user).await?, relation.is_blocking);

pub fn is_blocked(
    &self,
    user: impl EntityRef<User>
) -> Pin<Box<dyn Future<Output = Result<bool, Error<Self::Error>>> + Send, Global>>
[src]

Checks if the specified user blocks the user logged in with this client.

If you are also interested in other relationships, use user_relation.

let relation = client.user_relation(&user).await?;
assert_eq!(client.is_blocked(&user).await?, relation.is_blocked);

pub fn is_muted(
    &self,
    user: impl EntityRef<User>
) -> Pin<Box<dyn Future<Output = Result<bool, Error<Self::Error>>> + Send, Global>>
[src]

Checks if the specified user is muted by the user logged in with this client.

If you are also interested in other relationships, use user_relation.

let relation = client.user_relation(&user).await?;
assert_eq!(client.is_muted(&user).await?, relation.is_muted);

pub fn has_pending_follow_request_from_me(
    &self,
    user: impl EntityRef<User>
) -> Pin<Box<dyn Future<Output = Result<bool, Error<Self::Error>>> + Send, Global>>
[src]

Checks if the specified user has a pending follow request from the user logged in with this client.

If you are also interested in other relationships, use user_relation.

let relation = client.user_relation(&user).await?;
assert_eq!(client.has_pending_follow_request_from_me(&user).await?, relation.has_pending_follow_request_from_you);

pub fn has_pending_follow_request_to_me(
    &self,
    user: impl EntityRef<User>
) -> Pin<Box<dyn Future<Output = Result<bool, Error<Self::Error>>> + Send, Global>>
[src]

Checks if the specified user has a pending follow request to the user logged in with this client.

If you are also interested in other relationships, use user_relation.

let relation = client.user_relation(&user).await?;
assert_eq!(client.has_pending_follow_request_to_me(&user).await?, relation.has_pending_follow_request_to_you);

pub fn get_user(
    &self,
    id: Id<User>
) -> Pin<Box<dyn Future<Output = Result<User, Error<Self::Error>>> + Send, Global>>
[src]

Gets the corresponding user from the ID.

pub fn get_users(
    &self,
    ids: impl IntoIterator<Item = Id<User>>
) -> Pin<Box<dyn Future<Output = Result<Vec<User, Global>, Error<Self::Error>>> + Send, Global>>
[src]

Gets the list of corresponding user from the list of IDs.

pub fn report_abuse(
    &self,
    user: impl EntityRef<User>,
    comment: impl Into<String>
) -> Pin<Box<dyn Future<Output = Result<(), Error<Self::Error>>> + Send, Global>>
[src]

Reports abuse by the specified user.

pub fn search_users(
    &self,
    query: impl Into<String>
) -> PagerStream<Pin<Box<dyn Pager<Item = Result<Vec<User, Global>, Error<Self::Error>>, Content = User, Client = Self> + Send, Global>>>
[src]

Searches for users with the specified query string.

pub fn users(&self) -> UserListBuilder<&Self>[src]

Lists the users in the instance.

This method actually returns a builder, namely UserListBuilder. You can specify how you want to list users by chaining methods. The list method of the builder returns a Stream that lists users in the specified way.

Examples

use futures::stream::TryStreamExt;
use misskey::model::user::{User, UserSortKey};

// Get a list of local moderator users sorted by number of followers.
let users: Vec<User> = client
    .users()
    .local()
    .moderator()
    .sort_by_followers()
    .list()
    .try_collect()
    .await?;

pub fn recommended_users(
    &self
) -> PagerStream<Pin<Box<dyn Pager<Item = Result<Vec<User, Global>, Error<Self::Error>>, Content = User, Client = Self> + Send, Global>>>
[src]

Lists the recommended users of the instance.

pub fn frequently_replied_users(
    &self,
    user: impl EntityRef<User>
) -> Pin<Box<dyn Future<Output = Result<Vec<User, Global>, Error<Self::Error>>> + Send, Global>>
[src]

Lists the users who frequently reply to the specified user.

pub fn pinned_users(
    &self
) -> Pin<Box<dyn Future<Output = Result<Vec<User, Global>, Error<Self::Error>>> + Send, Global>>
[src]

Lists the users pinned to the instance.

pub fn build_note(&self) -> NoteBuilder<&Self>[src]

Returns a builder for composing a note.

The returned builder provides methods to customize details of the note, and you can chain them to compose a note incrementally. Finally, calling create method will actually create a note. See NoteBuilder for the provided methods.

Examples

let note = client
    .build_note()
    .text("Hello, World")
    .followers_only()
    .create()
    .await?;

assert_eq!(note.text.unwrap(), "Hello, World");

pub fn delete_note(
    &self,
    note: impl EntityRef<Note>
) -> Pin<Box<dyn Future<Output = Result<(), Error<Self::Error>>> + Send, Global>>
[src]

Deletes the specified note.

Examples

let note = client.create_note("Oops!").await?;
client.delete_note(&note).await?;

pub fn get_note(
    &self,
    id: Id<Note>
) -> Pin<Box<dyn Future<Output = Result<Note, Error<Self::Error>>> + Send, Global>>
[src]

Gets the corresponding note from the ID.

pub fn create_note(
    &self,
    text: impl Into<String>
) -> Pin<Box<dyn Future<Output = Result<Note, Error<Self::Error>>> + Send, Global>>
[src]

Creates a note with the given text.

Examples

let note = client.create_note("Hello, Misskey!").await?;
assert_eq!(note.text.unwrap(), "Hello, Misskey!");

pub fn poll(
    &self,
    text: impl Into<String>,
    choices: impl IntoIterator<Item = impl Into<String>>
) -> Pin<Box<dyn Future<Output = Result<Note, Error<Self::Error>>> + Send, Global>>
[src]

Creates a poll with the given text and choices.

Examples

let note = client
    .poll("Which fruit is your favorite?", vec!["Apple", "Orange", "Banana"])
    .await?;

pub fn reply(
    &self,
    note: impl EntityRef<Note>,
    text: impl Into<String>
) -> Pin<Box<dyn Future<Output = Result<Note, Error<Self::Error>>> + Send, Global>>
[src]

Creates a reply note with the given text.

pub fn renote(
    &self,
    note: impl EntityRef<Note>
) -> Pin<Box<dyn Future<Output = Result<Note, Error<Self::Error>>> + Send, Global>>
[src]

Creates a renote.

pub fn quote(
    &self,
    note: impl EntityRef<Note>,
    text: impl Into<String>
) -> Pin<Box<dyn Future<Output = Result<Note, Error<Self::Error>>> + Send, Global>>
[src]

Creates a quote note with the given text.

pub fn react(
    &self,
    note: impl EntityRef<Note>,
    reaction: impl Into<Reaction>
) -> Pin<Box<dyn Future<Output = Result<(), Error<Self::Error>>> + Send, Global>>
[src]

Adds the reaction to the specified note.

pub fn unreact(
    &self,
    note: impl EntityRef<Note>
) -> Pin<Box<dyn Future<Output = Result<(), Error<Self::Error>>> + Send, Global>>
[src]

Deletes a reaction from the specified note.

pub fn favorite(
    &self,
    note: impl EntityRef<Note>
) -> Pin<Box<dyn Future<Output = Result<(), Error<Self::Error>>> + Send, Global>>
[src]

Favorites the specified note.

pub fn unfavorite(
    &self,
    note: impl EntityRef<Note>
) -> Pin<Box<dyn Future<Output = Result<(), Error<Self::Error>>> + Send, Global>>
[src]

Unfavorites the specified note.

pub fn watch(
    &self,
    note: impl EntityRef<Note>
) -> Pin<Box<dyn Future<Output = Result<(), Error<Self::Error>>> + Send, Global>>
[src]

Watches the specified note.

pub fn unwatch(
    &self,
    note: impl EntityRef<Note>
) -> Pin<Box<dyn Future<Output = Result<(), Error<Self::Error>>> + Send, Global>>
[src]

Unwatches the specified note.

pub fn is_favorited(
    &self,
    note: impl EntityRef<Note>
) -> Pin<Box<dyn Future<Output = Result<bool, Error<Self::Error>>> + Send, Global>>
[src]

Checks if the specified note is favorited by the user logged in with this client.

pub fn is_watched(
    &self,
    note: impl EntityRef<Note>
) -> Pin<Box<dyn Future<Output = Result<bool, Error<Self::Error>>> + Send, Global>>
[src]

Checks if the specified note is watched by the user logged in with this client.

pub fn vote(
    &self,
    note: impl EntityRef<Note>,
    choice: u64
) -> Pin<Box<dyn Future<Output = Result<(), Error<Self::Error>>> + Send, Global>>
[src]

Vote on the specified note.

pub fn featured_notes(
    &self
) -> PagerStream<Pin<Box<dyn Pager<Item = Result<Vec<Note, Global>, Error<Self::Error>>, Content = Note, Client = Self> + Send, Global>>>
[src]

Lists the featured notes.

pub fn conversation(
    &self,
    note: impl EntityRef<Note>
) -> PagerStream<Pin<Box<dyn Pager<Item = Result<Vec<Note, Global>, Error<Self::Error>>, Content = Note, Client = Self> + Send, Global>>>
[src]

Lists the notes of the conversation.

pub fn children_notes(
    &self,
    note: impl EntityRef<Note>
) -> PagerStream<Pin<Box<dyn Pager<Item = Result<Vec<Note, Global>, Error<Self::Error>>, Content = Note, Client = Self> + Send, Global>>>
[src]

Lists the reply notes to the specified note.

pub fn mentioned_notes(
    &self
) -> PagerStream<Pin<Box<dyn Pager<Item = Result<Vec<Note, Global>, Error<Self::Error>>, Content = Note, Client = Self> + Send, Global>>>
[src]

Lists the notes that are mentioning the account you are logged into with this client.

pub fn renotes(
    &self,
    note: impl EntityRef<Note>
) -> PagerStream<Pin<Box<dyn Pager<Item = Result<Vec<Note, Global>, Error<Self::Error>>, Content = Note, Client = Self> + Send, Global>>>
[src]

Lists the renotes of the specified note.

pub fn replies(
    &self,
    note: impl EntityRef<Note>
) -> PagerStream<Pin<Box<dyn Pager<Item = Result<Vec<Note, Global>, Error<Self::Error>>, Content = Note, Client = Self> + Send, Global>>>
[src]

Lists the replies to the specified note.

pub fn search_notes(
    &self,
    query: impl Into<String>
) -> PagerStream<Pin<Box<dyn Pager<Item = Result<Vec<Note, Global>, Error<Self::Error>>, Content = Note, Client = Self> + Send, Global>>>
[src]

Searches for notes with the specified query string.

pub fn local_notes(
    &self,
    range: impl Into<TimelineRange<Note>>
) -> PagerStream<Pin<Box<dyn Pager<Item = Result<Vec<Note, Global>, Error<Self::Error>>, Content = Note, Client = Self> + Send, Global>>>
[src]

Lists the notes in the specified range of the local timeline.

The bound Into<TimelineRange<Note>> on the argument type is satisfied by the type of some range expressions such as .. or start.. (which are desugared into RangeFull and RangeFrom respectively). A note or DateTime<Utc> can be used to specify the start and end bounds of the range.

Examples

use futures::stream::{StreamExt, TryStreamExt};

// `notes` variable here is a `Stream` to enumerate first 100 local notes.
let mut notes = client.local_notes(..).take(100);

// Retrieve all notes until there are no more.
while let Some(note) = notes.try_next().await? {
    // Print the text of the note, if any.
    if let Some(text) = note.text {
        println!("@{}: {}", note.user.username, text);
    }
}
use chrono::Utc;

// Get the local notes since `time`.
let time = Utc::today().and_hms(0, 0, 0);
let mut notes = client.local_notes(time..);

pub fn local_notes_since(
    &self,
    since: impl Into<TimelineCursor<Note>>
) -> PagerStream<Pin<Box<dyn Pager<Item = Result<Vec<Note, Global>, Error<Self::Error>>, Content = Note, Client = Self> + Send, Global>>>
[src]

Lists all notes since the specified point in the local timeline in reverse order (i.e. the old note comes first, the new note comes after).

Examples

use futures::stream::{StreamExt, TryStreamExt};
use chrono::Utc;

let time = Utc::today().and_hms(0, 0, 0);

// `notes_since` is a `Stream` to enumerate first 100 local notes since `time` in reverse order.
let mut notes_since = client.local_notes_since(time).take(100);

// Retrieve all notes until there are no more.
while let Some(note) = notes_since.try_next().await? {
    // Print the text of the note, if any.
    if let Some(text) = note.text {
        println!("@{}: {}", note.user.username, text);
    }
}

pub fn local_notes_around(
    &self,
    cursor: impl Into<TimelineCursor<Note>>
) -> (PagerStream<Pin<Box<dyn Pager<Item = Result<Vec<Note, Global>, Error<Self::Error>>, Content = Note, Client = Self> + Send, Global>>>, PagerStream<Pin<Box<dyn Pager<Item = Result<Vec<Note, Global>, Error<Self::Error>>, Content = Note, Client = Self> + Send, Global>>>)
[src]

Returns a set of streams that fetch notes around the specified point in the local timeline in both directions.

pub fn global_notes(
    &self,
    range: impl Into<TimelineRange<Note>>
) -> PagerStream<Pin<Box<dyn Pager<Item = Result<Vec<Note, Global>, Error<Self::Error>>, Content = Note, Client = Self> + Send, Global>>>
[src]

Lists the notes in the specified range of the global timeline.

The bound Into<TimelineRange<Note>> on the argument type is satisfied by the type of some range expressions such as .. or start.. (which are desugared into RangeFull and RangeFrom respectively). A note or DateTime<Utc> can be used to specify the start and end bounds of the range.

Examples

use futures::stream::{StreamExt, TryStreamExt};

// `notes` variable here is a `Stream` to enumerate first 100 global notes.
let mut notes = client.global_notes(..).take(100);

// Retrieve all notes until there are no more.
while let Some(note) = notes.try_next().await? {
    // Print the text of the note, if any.
    if let Some(text) = note.text {
        println!("@{}: {}", note.user.username, text);
    }
}
use chrono::Utc;

// Get the global notes since `time`.
let time = Utc::today().and_hms(0, 0, 0);
let mut notes = client.global_notes(time..);

pub fn global_notes_since(
    &self,
    since: impl Into<TimelineCursor<Note>>
) -> PagerStream<Pin<Box<dyn Pager<Item = Result<Vec<Note, Global>, Error<Self::Error>>, Content = Note, Client = Self> + Send, Global>>>
[src]

Lists all notes since the specified point in the global timeline in reverse order (i.e. the old note comes first, the new note comes after).

Examples

use futures::stream::{StreamExt, TryStreamExt};
use chrono::Utc;

let time = Utc::today().and_hms(0, 0, 0);

// `notes_since` is a `Stream` to enumerate first 100 global notes since `time` in reverse order.
let mut notes_since = client.global_notes_since(time).take(100);

// Retrieve all notes until there are no more.
while let Some(note) = notes_since.try_next().await? {
    // Print the text of the note, if any.
    if let Some(text) = note.text {
        println!("@{}: {}", note.user.username, text);
    }
}

pub fn global_notes_around(
    &self,
    cursor: impl Into<TimelineCursor<Note>>
) -> (PagerStream<Pin<Box<dyn Pager<Item = Result<Vec<Note, Global>, Error<Self::Error>>, Content = Note, Client = Self> + Send, Global>>>, PagerStream<Pin<Box<dyn Pager<Item = Result<Vec<Note, Global>, Error<Self::Error>>, Content = Note, Client = Self> + Send, Global>>>)
[src]

Returns a set of streams that fetch notes around the specified point in the global timeline in both directions.

pub fn social_notes(
    &self,
    range: impl Into<TimelineRange<Note>>
) -> PagerStream<Pin<Box<dyn Pager<Item = Result<Vec<Note, Global>, Error<Self::Error>>, Content = Note, Client = Self> + Send, Global>>>
[src]

Lists the notes in the specified range of the social timeline.

The bound Into<TimelineRange<Note>> on the argument type is satisfied by the type of some range expressions such as .. or start.. (which are desugared into RangeFull and RangeFrom respectively). A note or DateTime<Utc> can be used to specify the start and end bounds of the range.

Examples

use futures::stream::{StreamExt, TryStreamExt};

// `notes` variable here is a `Stream` to enumerate first 100 social notes.
let mut notes = client.social_notes(..).take(100);

// Retrieve all notes until there are no more.
while let Some(note) = notes.try_next().await? {
    // Print the text of the note, if any.
    if let Some(text) = note.text {
        println!("@{}: {}", note.user.username, text);
    }
}
use chrono::Utc;

// Get the social notes since `time`.
let time = Utc::today().and_hms(0, 0, 0);
let mut notes = client.social_notes(time..);

pub fn social_notes_since(
    &self,
    since: impl Into<TimelineCursor<Note>>
) -> PagerStream<Pin<Box<dyn Pager<Item = Result<Vec<Note, Global>, Error<Self::Error>>, Content = Note, Client = Self> + Send, Global>>>
[src]

Lists all notes since the specified point in the social timeline in reverse order (i.e. the old note comes first, the new note comes after).

Examples

use futures::stream::{StreamExt, TryStreamExt};
use chrono::Utc;

let time = Utc::today().and_hms(0, 0, 0);

// `notes_since` is a `Stream` to enumerate first 100 social notes since `time` in reverse order.
let mut notes_since = client.social_notes_since(time).take(100);

// Retrieve all notes until there are no more.
while let Some(note) = notes_since.try_next().await? {
    // Print the text of the note, if any.
    if let Some(text) = note.text {
        println!("@{}: {}", note.user.username, text);
    }
}

pub fn social_notes_around(
    &self,
    cursor: impl Into<TimelineCursor<Note>>
) -> (PagerStream<Pin<Box<dyn Pager<Item = Result<Vec<Note, Global>, Error<Self::Error>>, Content = Note, Client = Self> + Send, Global>>>, PagerStream<Pin<Box<dyn Pager<Item = Result<Vec<Note, Global>, Error<Self::Error>>, Content = Note, Client = Self> + Send, Global>>>)
[src]

Returns a set of streams that fetch notes around the specified point in the social timeline in both directions.

pub fn home_notes(
    &self,
    range: impl Into<TimelineRange<Note>>
) -> PagerStream<Pin<Box<dyn Pager<Item = Result<Vec<Note, Global>, Error<Self::Error>>, Content = Note, Client = Self> + Send, Global>>>
[src]

Lists the notes in the specified range of the home timeline.

The bound Into<TimelineRange<Note>> on the argument type is satisfied by the type of some range expressions such as .. or start.. (which are desugared into RangeFull and RangeFrom respectively). A note or DateTime<Utc> can be used to specify the start and end bounds of the range.

Examples

use futures::stream::{StreamExt, TryStreamExt};

// `notes` variable here is a `Stream` to enumerate first 100 home notes.
let mut notes = client.home_notes(..).take(100);

// Retrieve all notes until there are no more.
while let Some(note) = notes.try_next().await? {
    // Print the text of the note, if any.
    if let Some(text) = note.text {
        println!("@{}: {}", note.user.username, text);
    }
}
use chrono::Utc;

// Get the home notes since `time`.
let time = Utc::today().and_hms(0, 0, 0);
let mut notes = client.home_notes(time..);

pub fn home_notes_since(
    &self,
    since: impl Into<TimelineCursor<Note>>
) -> PagerStream<Pin<Box<dyn Pager<Item = Result<Vec<Note, Global>, Error<Self::Error>>, Content = Note, Client = Self> + Send, Global>>>
[src]

Lists all notes since the specified point in the home timeline in reverse order (i.e. the old note comes first, the new note comes after).

Examples

use futures::stream::{StreamExt, TryStreamExt};
use chrono::Utc;

let time = Utc::today().and_hms(0, 0, 0);

// `notes_since` is a `Stream` to enumerate first 100 home notes since `time` in reverse order.
let mut notes_since = client.home_notes_since(time).take(100);

// Retrieve all notes until there are no more.
while let Some(note) = notes_since.try_next().await? {
    // Print the text of the note, if any.
    if let Some(text) = note.text {
        println!("@{}: {}", note.user.username, text);
    }
}

pub fn home_notes_around(
    &self,
    cursor: impl Into<TimelineCursor<Note>>
) -> (PagerStream<Pin<Box<dyn Pager<Item = Result<Vec<Note, Global>, Error<Self::Error>>, Content = Note, Client = Self> + Send, Global>>>, PagerStream<Pin<Box<dyn Pager<Item = Result<Vec<Note, Global>, Error<Self::Error>>, Content = Note, Client = Self> + Send, Global>>>)
[src]

Returns a set of streams that fetch notes around the specified point in the home timeline in both directions.

pub fn user_notes(
    &self,
    user: impl EntityRef<User>,
    range: impl Into<TimelineRange<Note>>
) -> PagerStream<Pin<Box<dyn Pager<Item = Result<Vec<Note, Global>, Error<Self::Error>>, Content = Note, Client = Self> + Send, Global>>>
[src]

Lists the notes in the specified range of the user timeline.

The bound Into<TimelineRange<Note>> on the argument type is satisfied by the type of some range expressions such as .. or start.. (which are desugared into RangeFull and RangeFrom respectively). A note or DateTime<Utc> can be used to specify the start and end bounds of the range.

Examples

use futures::stream::{StreamExt, TryStreamExt};

// `notes` variable here is a `Stream` to enumerate first 100 user notes.
let mut notes = client.user_notes(&user, ..).take(100);

// Retrieve all notes until there are no more.
while let Some(note) = notes.try_next().await? {
    // Print the text of the note, if any.
    if let Some(text) = note.text {
        println!("@{}: {}", note.user.username, text);
    }
}
use chrono::Utc;

// Get the user notes since `time`.
let time = Utc::today().and_hms(0, 0, 0);
let mut notes = client.user_notes(&user, time..);

pub fn user_notes_since(
    &self,
    user: impl EntityRef<User>,
    since: impl Into<TimelineCursor<Note>>
) -> PagerStream<Pin<Box<dyn Pager<Item = Result<Vec<Note, Global>, Error<Self::Error>>, Content = Note, Client = Self> + Send, Global>>>
[src]

Lists all notes since the specified point in the user timeline in reverse order (i.e. the old note comes first, the new note comes after).

Examples

use futures::stream::{StreamExt, TryStreamExt};
use chrono::Utc;

let time = Utc::today().and_hms(0, 0, 0);

// `notes_since` is a `Stream` to enumerate first 100 user notes since `time` in reverse order.
let mut notes_since = client.user_notes_since(&user, time).take(100);

// Retrieve all notes until there are no more.
while let Some(note) = notes_since.try_next().await? {
    // Print the text of the note, if any.
    if let Some(text) = note.text {
        println!("@{}: {}", note.user.username, text);
    }
}

pub fn user_notes_around(
    &self,
    user: impl EntityRef<User>,
    cursor: impl Into<TimelineCursor<Note>>
) -> (PagerStream<Pin<Box<dyn Pager<Item = Result<Vec<Note, Global>, Error<Self::Error>>, Content = Note, Client = Self> + Send, Global>>>, PagerStream<Pin<Box<dyn Pager<Item = Result<Vec<Note, Global>, Error<Self::Error>>, Content = Note, Client = Self> + Send, Global>>>)
[src]

Returns a set of streams that fetch notes around the specified point in the user timeline in both directions.

pub fn user_list_notes(
    &self,
    list: impl EntityRef<UserList>,
    range: impl Into<TimelineRange<Note>>
) -> PagerStream<Pin<Box<dyn Pager<Item = Result<Vec<Note, Global>, Error<Self::Error>>, Content = Note, Client = Self> + Send, Global>>>
[src]

Lists the notes in the specified range of the user_list timeline.

The bound Into<TimelineRange<Note>> on the argument type is satisfied by the type of some range expressions such as .. or start.. (which are desugared into RangeFull and RangeFrom respectively). A note or DateTime<Utc> can be used to specify the start and end bounds of the range.

Examples

use futures::stream::{StreamExt, TryStreamExt};

// `notes` variable here is a `Stream` to enumerate first 100 user_list notes.
let mut notes = client.user_list_notes(&list, ..).take(100);

// Retrieve all notes until there are no more.
while let Some(note) = notes.try_next().await? {
    // Print the text of the note, if any.
    if let Some(text) = note.text {
        println!("@{}: {}", note.user.username, text);
    }
}
use chrono::Utc;

// Get the user_list notes since `time`.
let time = Utc::today().and_hms(0, 0, 0);
let mut notes = client.user_list_notes(&list, time..);

pub fn user_list_notes_since(
    &self,
    list: impl EntityRef<UserList>,
    since: impl Into<TimelineCursor<Note>>
) -> PagerStream<Pin<Box<dyn Pager<Item = Result<Vec<Note, Global>, Error<Self::Error>>, Content = Note, Client = Self> + Send, Global>>>
[src]

Lists all notes since the specified point in the user_list timeline in reverse order (i.e. the old note comes first, the new note comes after).

Examples

use futures::stream::{StreamExt, TryStreamExt};
use chrono::Utc;

let time = Utc::today().and_hms(0, 0, 0);

// `notes_since` is a `Stream` to enumerate first 100 user_list notes since `time` in reverse order.
let mut notes_since = client.user_list_notes_since(&list, time).take(100);

// Retrieve all notes until there are no more.
while let Some(note) = notes_since.try_next().await? {
    // Print the text of the note, if any.
    if let Some(text) = note.text {
        println!("@{}: {}", note.user.username, text);
    }
}

pub fn user_list_notes_around(
    &self,
    list: impl EntityRef<UserList>,
    cursor: impl Into<TimelineCursor<Note>>
) -> (PagerStream<Pin<Box<dyn Pager<Item = Result<Vec<Note, Global>, Error<Self::Error>>, Content = Note, Client = Self> + Send, Global>>>, PagerStream<Pin<Box<dyn Pager<Item = Result<Vec<Note, Global>, Error<Self::Error>>, Content = Note, Client = Self> + Send, Global>>>)
[src]

Returns a set of streams that fetch notes around the specified point in the user_list timeline in both directions.

pub fn channel_notes(
    &self,
    channel: impl EntityRef<Channel>,
    range: impl Into<TimelineRange<Note>>
) -> PagerStream<Pin<Box<dyn Pager<Item = Result<Vec<Note, Global>, Error<Self::Error>>, Content = Note, Client = Self> + Send, Global>>>
[src]

Lists the notes in the specified range of the channel timeline.

The bound Into<TimelineRange<Note>> on the argument type is satisfied by the type of some range expressions such as .. or start.. (which are desugared into RangeFull and RangeFrom respectively). A note or DateTime<Utc> can be used to specify the start and end bounds of the range.

Examples

use futures::stream::{StreamExt, TryStreamExt};

// `notes` variable here is a `Stream` to enumerate first 100 channel notes.
let mut notes = client.channel_notes(&channel, ..).take(100);

// Retrieve all notes until there are no more.
while let Some(note) = notes.try_next().await? {
    // Print the text of the note, if any.
    if let Some(text) = note.text {
        println!("@{}: {}", note.user.username, text);
    }
}
use chrono::Utc;

// Get the channel notes since `time`.
let time = Utc::today().and_hms(0, 0, 0);
let mut notes = client.channel_notes(&channel, time..);

pub fn channel_notes_since(
    &self,
    channel: impl EntityRef<Channel>,
    since: impl Into<TimelineCursor<Note>>
) -> PagerStream<Pin<Box<dyn Pager<Item = Result<Vec<Note, Global>, Error<Self::Error>>, Content = Note, Client = Self> + Send, Global>>>
[src]

Lists all notes since the specified point in the channel timeline in reverse order (i.e. the old note comes first, the new note comes after).

Examples

use futures::stream::{StreamExt, TryStreamExt};
use chrono::Utc;

let time = Utc::today().and_hms(0, 0, 0);

// `notes_since` is a `Stream` to enumerate first 100 channel notes since `time` in reverse order.
let mut notes_since = client.channel_notes_since(&channel, time).take(100);

// Retrieve all notes until there are no more.
while let Some(note) = notes_since.try_next().await? {
    // Print the text of the note, if any.
    if let Some(text) = note.text {
        println!("@{}: {}", note.user.username, text);
    }
}

pub fn channel_notes_around(
    &self,
    channel: impl EntityRef<Channel>,
    cursor: impl Into<TimelineCursor<Note>>
) -> (PagerStream<Pin<Box<dyn Pager<Item = Result<Vec<Note, Global>, Error<Self::Error>>, Content = Note, Client = Self> + Send, Global>>>, PagerStream<Pin<Box<dyn Pager<Item = Result<Vec<Note, Global>, Error<Self::Error>>, Content = Note, Client = Self> + Send, Global>>>)
[src]

Returns a set of streams that fetch notes around the specified point in the channel timeline in both directions.

pub fn tagged_notes(
    &self,
    query: impl Into<Query<Tag>>
) -> PagerStream<Pin<Box<dyn Pager<Item = Result<Vec<Note, Global>, Error<Self::Error>>, Content = Note, Client = Self> + Send, Global>>>
[src]

Lists the notes with tags as specified in the given query.

Examples

// Get all notes with the "linux" tag.
let mut notes = client.tagged_notes("linux");
use misskey::model::query::Query;

// Get all notes tagged with "test" or "bot".
let mut notes = client.tagged_notes(Query::atom("test").or("bot"));

pub fn local_notes_with_file_types(
    &self,
    types: impl IntoIterator<Item = Mime>
) -> PagerStream<Pin<Box<dyn Pager<Item = Result<Vec<Note, Global>, Error<Self::Error>>, Content = Note, Client = Self> + Send, Global>>>
[src]

Lists the local notes with the given file types.

Examples

use mime::IMAGE_STAR;

// Get all local notes with image files.
let mut notes = client.local_notes_with_file_types(vec![IMAGE_STAR]);

pub fn create_user_list(
    &self,
    name: impl Into<String>
) -> Pin<Box<dyn Future<Output = Result<UserList, Error<Self::Error>>> + Send, Global>>
[src]

Creates a user list with the given name.

Examples

let list = client.create_user_list("list").await?;
assert_eq!(list.name, "list");

pub fn delete_user_list(
    &self,
    list: impl EntityRef<UserList>
) -> Pin<Box<dyn Future<Output = Result<(), Error<Self::Error>>> + Send, Global>>
[src]

Deletes the specified user list.

Examples

let list = client.create_user_list("list").await?;
client.delete_user_list(&list).await?;

pub fn rename_user_list(
    &self,
    list: impl EntityRef<UserList>,
    name: impl Into<String>
) -> Pin<Box<dyn Future<Output = Result<UserList, Error<Self::Error>>> + Send, Global>>
[src]

Updates the name of the specified user list to the given one.

Examples

let list = client.create_user_list("list").await?;
let renamed_list = client.rename_user_list(&list, "list2").await?;
assert_eq!(renamed_list.name, "list2");

pub fn get_user_list(
    &self,
    id: Id<UserList>
) -> Pin<Box<dyn Future<Output = Result<UserList, Error<Self::Error>>> + Send, Global>>
[src]

Gets the corresponding user list from the ID.

pub fn push_to_user_list(
    &self,
    list: impl EntityRef<UserList>,
    user: impl EntityRef<User>
) -> Pin<Box<dyn Future<Output = Result<(), Error<Self::Error>>> + Send, Global>>
[src]

Adds the user from the specified user list.

pub fn pull_from_user_list(
    &self,
    list: impl EntityRef<UserList>,
    user: impl EntityRef<User>
) -> Pin<Box<dyn Future<Output = Result<(), Error<Self::Error>>> + Send, Global>>
[src]

Deletes the user from the specified user list.

pub fn create_user_group(
    &self,
    name: impl Into<String>
) -> Pin<Box<dyn Future<Output = Result<UserGroup, Error<Self::Error>>> + Send, Global>>
[src]

Creates a user group with the given name.

Examples

let group = client.create_user_group("group").await?;
assert_eq!(group.name, "group");

pub fn delete_user_group(
    &self,
    group: impl EntityRef<UserGroup>
) -> Pin<Box<dyn Future<Output = Result<(), Error<Self::Error>>> + Send, Global>>
[src]

Deletes the specified user group.

Examples

let group = client.create_user_group("group").await?;
client.delete_user_group(&group).await?;

pub fn rename_user_group(
    &self,
    group: impl EntityRef<UserGroup>,
    name: impl Into<String>
) -> Pin<Box<dyn Future<Output = Result<UserGroup, Error<Self::Error>>> + Send, Global>>
[src]

Updates the name of the specified user group to the given one.

Examples

let group = client.create_user_group("group").await?;
let renamed_group = client.rename_user_group(&group, "group2").await?;
assert_eq!(renamed_group.name, "group2");

pub fn get_user_group(
    &self,
    id: Id<UserGroup>
) -> Pin<Box<dyn Future<Output = Result<UserGroup, Error<Self::Error>>> + Send, Global>>
[src]

Gets the corresponding user group from the ID.

pub fn invite_to_user_group(
    &self,
    group: impl EntityRef<UserGroup>,
    user: impl EntityRef<User>
) -> Pin<Box<dyn Future<Output = Result<(), Error<Self::Error>>> + Send, Global>>
[src]

Invites the user to the specified user group.

pub fn pull_from_user_group(
    &self,
    group: impl EntityRef<UserGroup>,
    user: impl EntityRef<User>
) -> Pin<Box<dyn Future<Output = Result<(), Error<Self::Error>>> + Send, Global>>
[src]

Deletes the user from the specified user group.

Note that the owner of the group cannot be deleted. If you want to do so, you first need to transfer the group with transfer_user_group.

pub fn transfer_user_group(
    &self,
    group: impl EntityRef<UserGroup>,
    user: impl EntityRef<User>
) -> Pin<Box<dyn Future<Output = Result<UserGroup, Error<Self::Error>>> + Send, Global>>
[src]

Transfers the specified user group.

Note that you can only transfer the group to one of its members.

pub fn user_group_invitations(
    &self
) -> PagerStream<Pin<Box<dyn Pager<Item = Result<Vec<UserGroupInvitation, Global>, Error<Self::Error>>, Content = UserGroupInvitation, Client = Self> + Send, Global>>>
[src]

Lists the user group invitations sent to the user who is logged in with this client.

Examples

This example uses TryStreamExt::try_next and while let to retrieve invitations one after another until there are no more.

use futures::stream::TryStreamExt;

// `invitations` here is a `Stream` to enumerate all the invitations.
let mut invitations = client.user_group_invitations();
// Retrieve invitations until there are no more.
while let Some(invitation) = invitations.try_next().await? {
    // Accept the invitation.
    client.accept_user_group_invitation(&invitation).await?;
}

pub fn accept_user_group_invitation(
    &self,
    invitation: impl EntityRef<UserGroupInvitation>
) -> Pin<Box<dyn Future<Output = Result<(), Error<Self::Error>>> + Send, Global>>
[src]

Accepts the specified user group invitation sent to the user logged in with this client.

pub fn reject_user_group_invitation(
    &self,
    invitation: impl EntityRef<UserGroupInvitation>
) -> Pin<Box<dyn Future<Output = Result<(), Error<Self::Error>>> + Send, Global>>
[src]

Rejects the specified user group invitation sent to the user logged in with this client.

pub fn joined_user_groups(
    &self
) -> Pin<Box<dyn Future<Output = Result<Vec<UserGroup, Global>, Error<Self::Error>>> + Send, Global>>
[src]

Lists the user groups joined by the user logged in with this client.

pub fn owned_user_groups(
    &self
) -> Pin<Box<dyn Future<Output = Result<Vec<UserGroup, Global>, Error<Self::Error>>> + Send, Global>>
[src]

Lists the user groups owned by the user logged in with this client.

pub fn create_antenna(
    &self,
    name: impl Into<String>,
    query: impl Into<Query<String>>
) -> Pin<Box<dyn Future<Output = Result<Antenna, Error<Self::Error>>> + Send, Global>>
[src]

Creates an antenna with the given name and query.

Examples

use misskey::model::query::Query;

// Create an antenna for notes containing "misskey" or "msky"
let antenna = client
    .create_antenna("misskey antenna", Query::atom("misskey").or("msky"))
    .await?;

assert_eq!(antenna.name, "misskey antenna");

pub fn build_antenna(&self) -> AntennaBuilder<&Self>[src]

Returns a builder for creating an antenna.

The returned builder provides methods to customize details of the antenna, and you can chain them to create an antenna incrementally. Finally, calling create method will actually create an antenna. See AntennaBuilder for the provided methods.

Examples

// Create an antenna for non-reply notes in home timeline that include "misskey"
let antenna = client
    .build_antenna()
    .name("misskey antenna")
    .include("misskey")
    .home()
    .exclude_replies(true)
    .create()
    .await?;

assert_eq!(antenna.name, "misskey antenna");

pub fn delete_antenna(
    &self,
    antenna: impl EntityRef<Antenna>
) -> Pin<Box<dyn Future<Output = Result<(), Error<Self::Error>>> + Send, Global>>
[src]

Deletes the specified antenna.

Examples

let antenna = client
    .create_antenna("antenna", "misskey")
    .await?;
client.delete_antenna(&antenna).await?;

pub fn get_antenna(
    &self,
    id: Id<Antenna>
) -> Pin<Box<dyn Future<Output = Result<Antenna, Error<Self::Error>>> + Send, Global>>
[src]

Gets the corresponding antenna from the ID.

pub fn update_antenna(&self, antenna: Antenna) -> AntennaUpdateBuilder<&Self>[src]

Updates the antenna.

This method actually returns a builder, namely AntennaUpdateBuilder. You can chain the method calls to it corresponding to the fields you want to update. Finally, calling update method will actually perform the update. See AntennaUpdateBuilder for the fields that can be updated.

Examples

let antenna = client
    .create_antenna("antenna", "misskey")
    .await?;

// Change source and case sensitivity of the antenna
client
    .update_antenna(antenna)
    .case_sensitive(true)
    .all()
    .update()
    .await?;

pub fn antennas(
    &self
) -> Pin<Box<dyn Future<Output = Result<Vec<Antenna, Global>, Error<Self::Error>>> + Send, Global>>
[src]

Lists the antennas created by the user logged in with this client.

pub fn antenna_notes(
    &self,
    antenna: impl EntityRef<Antenna>
) -> PagerStream<Pin<Box<dyn Pager<Item = Result<Vec<Note, Global>, Error<Self::Error>>, Content = Note, Client = Self> + Send, Global>>>
[src]

Lists the notes that hit the specified antenna.

pub fn create_channel(
    &self,
    name: impl Into<String>
) -> Pin<Box<dyn Future<Output = Result<Channel, Error<Self::Error>>> + Send, Global>>
[src]

Creates a channel with the given name.

Examples

let channel = client.create_channel("name").await?;
assert_eq!(channel.name, "name");

pub fn build_channel(&self) -> ChannelBuilder<&Self>[src]

Returns a builder for creating a channel.

The returned builder provides methods to customize details of the channel, and you can chain them to create a channel incrementally. Finally, calling create method will actually create a channel. See ChannelBuilder for the provided methods.

Examples

let channel = client
    .build_channel()
    .name("bot devs")
    .description("Let's talk about Misskey's bot development!")
    .create()
    .await?;

assert_eq!(channel.name, "bot devs");

pub fn get_channel(
    &self,
    id: Id<Channel>
) -> Pin<Box<dyn Future<Output = Result<Channel, Error<Self::Error>>> + Send, Global>>
[src]

Gets the corresponding channel from the ID.

pub fn update_channel(
    &self,
    channel: impl EntityRef<Channel>
) -> ChannelUpdateBuilder<&Self>
[src]

Updates the specified channel.

This method actually returns a builder, namely ChannelUpdateBuilder. You can chain the method calls to it corresponding to the fields you want to update. Finally, calling update method will actually perform the update. See ChannelUpdateBuilder for the fields that can be updated.

Examples

let channel = client.create_channel("feedback").await?;
client
    .update_channel(&channel)
    .set_description("Give us feedback on the instance.")
    .update()
    .await?;

pub fn follow_channel(
    &self,
    channel: impl EntityRef<Channel>
) -> Pin<Box<dyn Future<Output = Result<(), Error<Self::Error>>> + Send, Global>>
[src]

Follows the specified channel.

pub fn unfollow_channel(
    &self,
    channel: impl EntityRef<Channel>
) -> Pin<Box<dyn Future<Output = Result<(), Error<Self::Error>>> + Send, Global>>
[src]

Unfollows the specified channel.

pub fn followed_channels(
    &self
) -> PagerStream<Pin<Box<dyn Pager<Item = Result<Vec<Channel, Global>, Error<Self::Error>>, Content = Channel, Client = Self> + Send, Global>>>
[src]

Lists the channels followed by the user logged in with this client.

pub fn owned_channels(
    &self
) -> PagerStream<Pin<Box<dyn Pager<Item = Result<Vec<Channel, Global>, Error<Self::Error>>, Content = Channel, Client = Self> + Send, Global>>>
[src]

Lists the channels owned by the user logged in with this client.

pub fn featured_channels(
    &self
) -> Pin<Box<dyn Future<Output = Result<Vec<Channel, Global>, Error<Self::Error>>> + Send, Global>>
[src]

Lists the featured channels.

pub fn create_clip(
    &self,
    name: impl Into<String>
) -> Pin<Box<dyn Future<Output = Result<Clip, Error<Self::Error>>> + Send, Global>>
[src]

Creates a clip with the given name.

Examples

let clip = client.create_clip("name").await?;
assert_eq!(clip.name, "name");

pub fn build_clip(&self) -> ClipBuilder<&Self>[src]

Returns a builder for creating a clip.

The returned builder provides methods to customize details of the clip, and you can chain them to create a clip incrementally. Finally, calling create method will actually create a clip. See ClipBuilder for the provided methods.

Examples

let clip = client
    .build_clip()
    .name("kawaii notes")
    .public(true)
    .create()
    .await?;

assert_eq!(clip.name, "kawaii notes");

pub fn delete_clip(
    &self,
    clip: impl EntityRef<Clip>
) -> Pin<Box<dyn Future<Output = Result<(), Error<Self::Error>>> + Send, Global>>
[src]

Deletes the specified clip.

Examples

let clip = client.create_clip("Oops!").await?;
client.delete_clip(&clip).await?;

pub fn clips(
    &self
) -> Pin<Box<dyn Future<Output = Result<Vec<Clip, Global>, Error<Self::Error>>> + Send, Global>>
[src]

Lists the clips created by the user logged in with this client.

pub fn note_clips(
    &self,
    note: impl EntityRef<Note>
) -> Pin<Box<dyn Future<Output = Result<Vec<Clip, Global>, Error<Self::Error>>> + Send, Global>>
[src]

Lists the clips that contain the specified note.

pub fn clip_note(
    &self,
    clip: impl EntityRef<Clip>,
    note: impl EntityRef<Note>
) -> Pin<Box<dyn Future<Output = Result<(), Error<Self::Error>>> + Send, Global>>
[src]

Clips the specified note.

pub fn clip_notes(
    &self,
    clip: impl EntityRef<Clip>
) -> PagerStream<Pin<Box<dyn Pager<Item = Result<Vec<Note, Global>, Error<Self::Error>>, Content = Note, Client = Self> + Send, Global>>>
[src]

Lists the notes that are clipped to the specified clip.

pub fn get_clip(
    &self,
    id: Id<Clip>
) -> Pin<Box<dyn Future<Output = Result<Clip, Error<Self::Error>>> + Send, Global>>
[src]

Gets the corresponding clip from the ID.

pub fn update_clip(&self, clip: Clip) -> ClipUpdateBuilder<&Self>[src]

Updates the specified clip.

This method actually returns a builder, namely ClipUpdateBuilder. You can chain the method calls to it corresponding to the fields you want to update. Finally, calling update method will actually perform the update. See ClipUpdateBuilder for the fields that can be updated.

Examples

let clip = client.create_clip("kawaii notes").await?;
// Update the description and publish it.
client
    .update_clip(clip)
    .public(true)
    .description("collection of kawaii notes")
    .update()
    .await?;

pub fn user_clips(
    &self,
    user: impl EntityRef<User>
) -> PagerStream<Pin<Box<dyn Pager<Item = Result<Vec<Clip, Global>, Error<Self::Error>>, Content = Clip, Client = Self> + Send, Global>>>
[src]

Lists the clips created by the specified user.

pub fn create_message(
    &self,
    recipient: impl EntityRef<User>,
    text: impl Into<String>
) -> Pin<Box<dyn Future<Output = Result<MessagingMessage, Error<Self::Error>>> + Send, Global>>
[src]

Sends a message to the user with the given text.

pub fn create_group_message(
    &self,
    recipient: impl EntityRef<UserGroup>,
    text: impl Into<String>
) -> Pin<Box<dyn Future<Output = Result<MessagingMessage, Error<Self::Error>>> + Send, Global>>
[src]

Sends a message to the user group with the given text.

pub fn build_message(&self) -> MessagingMessageBuilder<&Self>[src]

Returns a builder for creating a message.

The returned builder provides methods to customize details of the message and its recipients, and you can chain them to create a message incrementally. Finally, calling create method will actually create and send a message. See MessagingMessageBuilder for the provided methods.

pub fn delete_message(
    &self,
    message: impl EntityRef<MessagingMessage>
) -> Pin<Box<dyn Future<Output = Result<(), Error<Self::Error>>> + Send, Global>>
[src]

Deletes the specified message.

pub fn read_message(
    &self,
    message: impl EntityRef<MessagingMessage>
) -> Pin<Box<dyn Future<Output = Result<(), Error<Self::Error>>> + Send, Global>>
[src]

Marks the specified message as read.

pub fn user_messages(
    &self,
    user: impl EntityRef<User>
) -> PagerStream<Pin<Box<dyn Pager<Item = Result<Vec<MessagingMessage, Global>, Error<Self::Error>>, Content = MessagingMessage, Client = Self> + Send, Global>>>
[src]

Lists the messages with the specified user.

pub fn group_messages(
    &self,
    group: impl EntityRef<UserGroup>
) -> PagerStream<Pin<Box<dyn Pager<Item = Result<Vec<MessagingMessage, Global>, Error<Self::Error>>, Content = MessagingMessage, Client = Self> + Send, Global>>>
[src]

Lists the messages in the specified user group.

pub fn messaging_history(
    &self
) -> Pin<Box<dyn Future<Output = Result<Vec<MessagingMessage, Global>, Error<Self::Error>>> + Send, Global>>
[src]

Gets message logs for the user who is logged in with this client.

pub fn upload_file_from_url(
    &self,
    url: Url
) -> Pin<Box<dyn Future<Output = Result<(), Error<Self::Error>>> + Send, Global>>
[src]

Uploads the file from the given url to the drive.

The difference between upload_file_from_url_ and this method is that the former can get the DriveFile of the uploaded file, while the latter cannot. If you want to obtain the DriveFile of an uploaded file in v12.48.0 or later, you can use DriveFileUrlBuilder::upload_and_wait or download the file once on the client side and the use UploadFileClientExt::upload_file to upload it.

pub fn build_file_from_url(&self, url: Url) -> DriveFileUrlBuilder<&Self>[src]

Returns a builder for creating a file on the drive.

The returned builder provides methods to customize details of the file, and you can chain them to create a file incrementally. See DriveFileUrlBuilder for the provided methods.

pub fn delete_file(
    &self,
    file: impl EntityRef<DriveFile>
) -> Pin<Box<dyn Future<Output = Result<(), Error<Self::Error>>> + Send, Global>>
[src]

Deletes the specified file on the drive.

pub fn update_file(
    &self,
    file: impl EntityRef<DriveFile>
) -> DriveFileUpdateBuilder<&Self>
[src]

Updates the specified file

This method actually returns a builder, namely DriveFileUpdateBuilder. You can chain the method calls to it corresponding to the fields you want to update. Finally, calling update method will actually perform the update. See DriveFileUpdateBuilder for the fields that can be updated.

pub fn get_file(
    &self,
    id: Id<DriveFile>
) -> Pin<Box<dyn Future<Output = Result<DriveFile, Error<Self::Error>>> + Send, Global>>
[src]

Gets the corresponding file from the ID.

pub fn create_folder(
    &self,
    name: impl Into<String>
) -> Pin<Box<dyn Future<Output = Result<DriveFolder, Error<Self::Error>>> + Send, Global>>
[src]

Creates a folder on the drive with the given name.

Examples

let folder = client.create_folder("Folder1").await?;
assert_eq!(folder.name, "Folder1");

pub fn create_folder_with_parent(
    &self,
    name: impl Into<String>,
    parent: impl EntityRef<DriveFolder>
) -> Pin<Box<dyn Future<Output = Result<DriveFolder, Error<Self::Error>>> + Send, Global>>
[src]

Creates a folder on the drive with the given name and parent folder.

pub fn delete_folder(
    &self,
    folder: impl EntityRef<DriveFolder>
) -> Pin<Box<dyn Future<Output = Result<(), Error<Self::Error>>> + Send, Global>>
[src]

Deletes the specified folder on the drive.

pub fn update_folder(
    &self,
    folder: impl EntityRef<DriveFolder>
) -> DriveFolderUpdateBuilder<&Self>
[src]

Updates the specified folder.

This method actually returns a builder, namely DriveFolderUpdateBuilder. You can chain the method calls to it corresponding to the fields you want to update. Finally, calling update method will actually perform the update. See DriveFolderUpdateBuilder for the fields that can be updated.

Examples

let folder = client.create_folder("Folder1").await?;
client
    .update_folder(&folder)
    .name("Folder2")
    .update()
    .await?;

pub fn get_folder(
    &self,
    id: Id<DriveFolder>
) -> Pin<Box<dyn Future<Output = Result<DriveFolder, Error<Self::Error>>> + Send, Global>>
[src]

Gets the corresponding folder from the ID.

pub fn attached_notes(
    &self,
    file: impl EntityRef<DriveFile>
) -> Pin<Box<dyn Future<Output = Result<Vec<Note, Global>, Error<Self::Error>>> + Send, Global>>
[src]

Lists the notes that have the specified file attached.

pub fn find_file_by_name(
    &self,
    name: impl Into<String>
) -> Pin<Box<dyn Future<Output = Result<Vec<DriveFile, Global>, Error<Self::Error>>> + Send, Global>>
[src]

Lists the files with the specified name.

pub fn find_file_by_name_in_folder(
    &self,
    name: impl Into<String>,
    folder: impl EntityRef<DriveFolder>
) -> Pin<Box<dyn Future<Output = Result<Vec<DriveFile, Global>, Error<Self::Error>>> + Send, Global>>
[src]

Lists the files with the specified name in the folder.

pub fn find_folder_by_name(
    &self,
    name: impl Into<String>
) -> Pin<Box<dyn Future<Output = Result<Vec<DriveFolder, Global>, Error<Self::Error>>> + Send, Global>>
[src]

Lists the folders with the specified name.

pub fn find_folder_by_name_in_folder(
    &self,
    name: impl Into<String>,
    folder: impl EntityRef<DriveFolder>
) -> Pin<Box<dyn Future<Output = Result<Vec<DriveFolder, Global>, Error<Self::Error>>> + Send, Global>>
[src]

Lists the folders with the specified name in the folder.

pub fn files(&self) -> DriveFileListBuilder<&Self>[src]

Lists the files on the drive.

This method actually returns a builder, namely DriveFileListBuilder. You can specify how you want to list files by chaining methods. The list method of the builder returns a Stream that lists files in the specified way.

Examples

use futures::stream::TryStreamExt;
use mime::IMAGE_STAR;
use misskey::model::drive::DriveFile;

// Get a list of image files
let images: Vec<DriveFile> = client
    .files()
    .type_(IMAGE_STAR)
    .list()
    .try_collect()
    .await?;

pub fn folders(
    &self
) -> PagerStream<Pin<Box<dyn Pager<Item = Result<Vec<DriveFolder, Global>, Error<Self::Error>>, Content = DriveFolder, Client = Self> + Send, Global>>>
[src]

Lists the folders.

pub fn folders_in_folder(
    &self,
    folder: impl EntityRef<DriveFolder>
) -> PagerStream<Pin<Box<dyn Pager<Item = Result<Vec<DriveFolder, Global>, Error<Self::Error>>, Content = DriveFolder, Client = Self> + Send, Global>>>
[src]

Lists the folders in the folder.

pub fn add_moderator(
    &self,
    user: impl EntityRef<User>
) -> Pin<Box<dyn Future<Output = Result<(), Error<Self::Error>>> + Send, Global>>
[src]

Sets moderator privileges for the specified user.

This operation may require this client to be logged in with an admin account.

pub fn remove_moderator(
    &self,
    user: impl EntityRef<User>
) -> Pin<Box<dyn Future<Output = Result<(), Error<Self::Error>>> + Send, Global>>
[src]

Removes moderator privileges for the specified user.

This operation may require this client to be logged in with an admin account.

pub fn promote_note(
    &self,
    note: impl EntityRef<Note>,
    expires_at: DateTime<Utc>
) -> Pin<Box<dyn Future<Output = Result<(), Error<Self::Error>>> + Send, Global>>
[src]

Promotes the specified note until the time.

This operation may require moderator privileges.

pub fn abuse_user_reports(
    &self
) -> PagerStream<Pin<Box<dyn Pager<Item = Result<Vec<AbuseUserReport, Global>, Error<Self::Error>>, Content = AbuseUserReport, Client = Self> + Send, Global>>>
[src]

Lists the abuse user reports.

This operation may require moderator privileges.

pub fn resolve_abuse_user_report(
    &self,
    report: impl EntityRef<AbuseUserReport>
) -> Pin<Box<dyn Future<Output = Result<(), Error<Self::Error>>> + Send, Global>>
[src]

Marks the specified abuse user report as resolved.

This operation may require moderator privileges.

pub fn server_logs(&self) -> ServerLogListBuilder<&Self>[src]

Lists the server logs in the instance.

This method actually returns a builder, namely ServerLogListBuilder. You can specify how you want to list users by chaining methods. The list method of the builder fetches the actual logs.

This operation may require moderator privileges.

Examples

// Get a first 10 entries of 'info' logs with 'chart' domain
let logs = client
    .server_logs()
    .take(10)
    .info()
    .with_domain("chart")
    .list()
    .await?;

pub fn moderation_logs(
    &self
) -> PagerStream<Pin<Box<dyn Pager<Item = Result<Vec<ModerationLog, Global>, Error<Self::Error>>, Content = ModerationLog, Client = Self> + Send, Global>>>
[src]

Lists the moderation logs in the instance.

This operation may require moderator privileges.

pub fn silence(
    &self,
    user: impl EntityRef<User>
) -> Pin<Box<dyn Future<Output = Result<(), Error<Self::Error>>> + Send, Global>>
[src]

Silences the specified user.

This operation may require moderator privileges.

pub fn suspend(
    &self,
    user: impl EntityRef<User>
) -> Pin<Box<dyn Future<Output = Result<(), Error<Self::Error>>> + Send, Global>>
[src]

Suspends the specified user.

This operation may require moderator privileges.

pub fn unsilence(
    &self,
    user: impl EntityRef<User>
) -> Pin<Box<dyn Future<Output = Result<(), Error<Self::Error>>> + Send, Global>>
[src]

Unsilences the specified user.

This operation may require moderator privileges.

pub fn unsuspend(
    &self,
    user: impl EntityRef<User>
) -> Pin<Box<dyn Future<Output = Result<(), Error<Self::Error>>> + Send, Global>>
[src]

Unsuspends the specified user.

This operation may require moderator privileges.

pub fn update_meta(&self) -> MetaUpdateBuilder<&Self>[src]

Updates the instance information.

This method actually returns a builder, namely MetaUpdateBuilder. You can chain the method calls to it corresponding to the fields you want to update. Finally, calling update method will actually perform the update. See MetaUpdateBuilder for the fields that can be updated.

This operation may require this client to be logged in with an admin account.

Examples

client
    .update_meta()
    .set_name("The Instance of Saturn")
    .max_note_text_length(5000)
    .update()
    .await?;

pub fn create_announcement(
    &self,
    title: impl Into<String>,
    text: impl Into<String>
) -> Pin<Box<dyn Future<Output = Result<Announcement, Error<Self::Error>>> + Send, Global>>
[src]

Creates an announcement with given title and text.

This operation may require moderator privileges.

pub fn create_announcement_with_image(
    &self,
    title: impl Into<String>,
    text: impl Into<String>,
    image_url: Url
) -> Pin<Box<dyn Future<Output = Result<Announcement, Error<Self::Error>>> + Send, Global>>
[src]

Creates an announcement with given title, text, and image URL.

This operation may require moderator privileges.

pub fn delete_announcement(
    &self,
    announcement: impl EntityRef<Announcement>
) -> Pin<Box<dyn Future<Output = Result<(), Error<Self::Error>>> + Send, Global>>
[src]

Deletes the specified announcement.

This operation may require moderator privileges.

pub fn update_announcement(
    &self,
    announcement: Announcement
) -> AnnouncementUpdateBuilder<&Self>
[src]

Updates the specified announcement.

This method actually returns a builder, namely AnnouncementUpdateBuilder. You can chain the method calls to it corresponding to the fields you want to update. Finally, calling update method will actually perform the update. See AnnouncementUpdateBuilder for the fields that can be updated.

This operation may require moderator privileges.

pub fn create_emoji(
    &self,
    file: impl EntityRef<DriveFile>
) -> Pin<Box<dyn Future<Output = Result<Id<Emoji>, Error<Self::Error>>> + Send, Global>>
[src]

Creates a custom emoji from the given file.

This operation may require moderator privileges.

pub fn delete_emoji(
    &self,
    emoji: impl EntityRef<Emoji>
) -> Pin<Box<dyn Future<Output = Result<(), Error<Self::Error>>> + Send, Global>>
[src]

Deletes the specified emoji.

This operation may require moderator privileges.

pub fn update_emoji(&self, emoji: Emoji) -> EmojiUpdateBuilder<&Self>[src]

Updates the specified emoji.

This method actually returns a builder, namely EmojiUpdateBuilder. You can chain the method calls to it corresponding to the fields you want to update. Finally, calling update method will actually perform the update. See EmojiUpdateBuilder for the fields that can be updated.

This operation may require moderator privileges.

pub fn copy_emoji(
    &self,
    emoji: impl EntityRef<Emoji>
) -> Pin<Box<dyn Future<Output = Result<Id<Emoji>, Error<Self::Error>>> + Send, Global>>
[src]

Copies the specified emoji.

This operation may require moderator privileges.

pub fn emojis(
    &self
) -> PagerStream<Pin<Box<dyn Pager<Item = Result<Vec<Emoji, Global>, Error<Self::Error>>, Content = Emoji, Client = Self> + Send, Global>>>
[src]

Lists the emojis in the instance.

This operation may require moderator privileges. Use meta method if you want to get a list of custom emojis from normal users,

pub fn search_emojis(
    &self,
    query: impl Into<String>
) -> PagerStream<Pin<Box<dyn Pager<Item = Result<Vec<Emoji, Global>, Error<Self::Error>>, Content = Emoji, Client = Self> + Send, Global>>>
[src]

Searches the emojis using the given query string.

This operation may require moderator privileges.

pub fn meta(
    &self
) -> Pin<Box<dyn Future<Output = Result<Meta, Error<Self::Error>>> + Send, Global>>
[src]

Gets information about the instance.

pub fn announcements(
    &self
) -> PagerStream<Pin<Box<dyn Pager<Item = Result<Vec<Announcement, Global>, Error<Self::Error>>, Content = Announcement, Client = Self> + Send, Global>>>
[src]

Lists announcements of the instance.

pub fn featured_pages(
    &self
) -> Pin<Box<dyn Future<Output = Result<Vec<Page, Global>, Error<Self::Error>>> + Send, Global>>
[src]

Lists the featured pages.

pub fn user_pages(
    &self,
    user: impl EntityRef<User>
) -> PagerStream<Pin<Box<dyn Pager<Item = Result<Vec<Page, Global>, Error<Self::Error>>, Content = Page, Client = Self> + Send, Global>>>
[src]

Lists the pages created by the specified user.

pub fn mark_all_notifications_as_read(
    &self
) -> Pin<Box<dyn Future<Output = Result<(), Error<Self::Error>>> + Send, Global>>
[src]

Marks all notifications as read.

pub fn create_notification(
    &self,
    body: impl Into<String>
) -> Pin<Box<dyn Future<Output = Result<(), Error<Self::Error>>> + Send, Global>>
[src]

Creates a notification with the given text.

pub fn build_notification(&self) -> NotificationBuilder<&Self>[src]

Returns a builder for creating a notification.

The returned builder provides methods to customize details of the notification, and you can chain them to create a notification incrementally. Finally, calling create method will actually create a notification. See NotificationBuilder for the provided methods.

Loading content...

Implementors

impl<C> ClientExt for C where
    C: Sync + Client
[src]

Loading content...