Struct mammut::Mastodon
[−]
[src]
pub struct Mastodon { pub data: Data, // some fields omitted }
Your mastodon application client, handles all requests to and from Mastodon.
Fields
data: Data
Raw data about your mastodon instance.
Methods
impl Mastodon
[src]
fn from_data(data: Data) -> Self
[src]
Creates a mastodon instance from the data struct.
fn favourites(&self) -> Result<Page<Status>>
[src]
fn blocks(&self) -> Result<Page<Account>>
[src]
fn domain_blocks(&self) -> Result<Page<String>>
[src]
fn follow_requests(&self) -> Result<Page<Account>>
[src]
fn get_home_timeline(&self) -> Result<Page<Status>>
[src]
fn get_emojis(&self) -> Result<Page<Emoji>>
[src]
fn mutes(&self) -> Result<Page<Account>>
[src]
fn notifications(&self) -> Result<Page<Notification>>
[src]
fn reports(&self) -> Result<Page<Report>>
[src]
fn followers(&self, id: &str) -> Result<Page<Account>>
[src]
fn following(&self) -> Result<Account>
[src]
fn reblogged_by(&self) -> Result<Account>
[src]
fn favourited_by(&self) -> Result<Account>
[src]
fn unblock_domain(&self, domain: String) -> Result<Empty>
[src]
fn instance(&self) -> Result<Instance>
[src]
fn verify_credentials(&self) -> Result<Account>
[src]
fn report(
&self,
account_id: &str,
status_ids: Vec<&str>,
comment: String
) -> Result<Report>
[src]
&self,
account_id: &str,
status_ids: Vec<&str>,
comment: String
) -> Result<Report>
fn block_domain(&self, domain: String) -> Result<Empty>
[src]
[src]
fn reject_follow_request(&self, id: &str) -> Result<Empty>
[src]
fn search(&self, q: String, resolve: bool) -> Result<SearchResult>
[src]
fn follows(&self, uri: Cow<'static, str>) -> Result<Account>
[src]
fn media(&self, file: Cow<'static, str>) -> Result<Attachment>
[src]
fn clear_notifications(&self) -> Result<Empty>
[src]
fn get_account(&self, id: u64) -> Result<Account>
[src]
fn follow(&self, id: u64) -> Result<Account>
[src]
fn unfollow(&self, id: u64) -> Result<Account>
[src]
fn block(&self, id: u64) -> Result<Account>
[src]
fn unblock(&self, id: u64) -> Result<Account>
[src]
fn mute(&self, id: u64) -> Result<Account>
[src]
fn unmute(&self, id: u64) -> Result<Account>
[src]
fn get_notification(&self, id: u64) -> Result<Notification>
[src]
fn get_status(&self, id: u64) -> Result<Status>
[src]
fn get_context(&self, id: u64) -> Result<Context>
[src]
fn get_card(&self, id: u64) -> Result<Card>
[src]
fn reblog(&self, id: u64) -> Result<Status>
[src]
fn unreblog(&self, id: u64) -> Result<Status>
[src]
fn favourite(&self, id: u64) -> Result<Status>
[src]
fn unfavourite(&self, id: u64) -> Result<Status>
[src]
fn delete_status(&self, id: u64) -> Result<Empty>
[src]
fn update_credentials(&self, changes: CredientialsBuilder) -> Result<Account>
[src]
fn new_status(&self, status: StatusBuilder) -> Result<Status>
[src]
Post a new status to the account.
fn get_public_timeline(&self, local: bool) -> Result<Vec<Status>>
[src]
Get the federated timeline for the instance.
fn get_tagged_timeline(
&self,
hashtag: String,
local: bool
) -> Result<Vec<Status>>
[src]
&self,
hashtag: String,
local: bool
) -> Result<Vec<Status>>
Get timeline filtered by a hashtag(eg. #coffee
) either locally or
federated.
fn statuses(
&self,
id: &str,
only_media: bool,
exclude_replies: bool
) -> Result<Page<Status>>
[src]
&self,
id: &str,
only_media: bool,
exclude_replies: bool
) -> Result<Page<Status>>
Get statuses of a single account by id. Optionally only with pictures and or excluding replies.
fn relationships(&self, ids: &[&str]) -> Result<Page<Relationship>>
[src]
Returns the client account's relationship to a list of other accounts. Such as whether they follow them or vice versa.
fn search_accounts(
&self,
query: &str,
limit: Option<u64>,
following: bool
) -> Result<Page<Account>>
[src]
&self,
query: &str,
limit: Option<u64>,
following: bool
) -> Result<Page<Account>>
Search for accounts by their name.
Will lookup an account remotely if the search term is in the
username@domain
format and not yet in the database.
Trait Implementations
impl Clone for Mastodon
[src]
fn clone(&self) -> Mastodon
[src]
Returns a copy of the value. Read more
fn clone_from(&mut self, source: &Self)
1.0.0[src]
Performs copy-assignment from source
. Read more