[−][src]Struct mammut::Mastodon
Your mastodon application client, handles all requests to and from Mastodon.
Fields
data: Data
Raw data about your mastodon instance.
Methods
impl Mastodon
[src]
pub fn from_data(data: Data) -> Self
[src]
Creates a mastodon instance from the data struct.
pub fn favourites(&self) -> Result<Page<Status>>
[src]
pub fn blocks(&self) -> Result<Page<Account>>
[src]
pub fn domain_blocks(&self) -> Result<Page<String>>
[src]
pub fn follow_requests(&self) -> Result<Page<Account>>
[src]
pub fn get_home_timeline(&self) -> Result<Page<Status>>
[src]
pub fn get_emojis(&self) -> Result<Page<Emoji>>
[src]
pub fn mutes(&self) -> Result<Page<Account>>
[src]
pub fn notifications(&self) -> Result<Page<Notification>>
[src]
pub fn reports(&self) -> Result<Page<Report>>
[src]
pub fn followers(&self, id: &str) -> Result<Page<Account>>
[src]
pub fn following(&self, id: &str) -> Result<Page<Account>>
[src]
pub fn reblogged_by(&self, id: &str) -> Result<Page<Account>>
[src]
pub fn favourited_by(&self, id: &str) -> Result<Page<Account>>
[src]
pub fn unblock_domain(&self, domain: String) -> Result<Empty>
[src]
pub fn instance(&self) -> Result<Instance>
[src]
pub fn verify_credentials(&self) -> Result<Account>
[src]
pub 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>
pub fn block_domain(&self, domain: String) -> Result<Empty>
[src]
pub fn authorize_follow_request(&self, id: &str) -> Result<Empty>
[src]
pub fn reject_follow_request(&self, id: &str) -> Result<Empty>
[src]
pub fn search(&self, q: String, resolve: bool) -> Result<SearchResult>
[src]
pub fn follows(&self, uri: Cow<'static, str>) -> Result<Account>
[src]
pub fn clear_notifications(&self) -> Result<Empty>
[src]
pub fn get_account(&self, id: &str) -> Result<Account>
[src]
pub fn follow(&self, id: &str) -> Result<Account>
[src]
pub fn unfollow(&self, id: &str) -> Result<Account>
[src]
pub fn block(&self, id: &str) -> Result<Account>
[src]
pub fn unblock(&self, id: &str) -> Result<Account>
[src]
pub fn mute(&self, id: &str) -> Result<Account>
[src]
pub fn unmute(&self, id: &str) -> Result<Account>
[src]
pub fn get_notification(&self, id: &str) -> Result<Notification>
[src]
pub fn get_status(&self, id: &str) -> Result<Status>
[src]
pub fn get_context(&self, id: &str) -> Result<Context>
[src]
pub fn get_card(&self, id: &str) -> Result<Card>
[src]
pub fn reblog(&self, id: &str) -> Result<Status>
[src]
pub fn unreblog(&self, id: &str) -> Result<Status>
[src]
pub fn favourite(&self, id: &str) -> Result<Status>
[src]
pub fn unfavourite(&self, id: &str) -> Result<Status>
[src]
pub fn delete_status(&self, id: &str) -> Result<Empty>
[src]
pub fn update_credentials(
&self,
changes: CredientialsBuilder
) -> Result<Account>
[src]
&self,
changes: CredientialsBuilder
) -> Result<Account>
pub fn new_status(&self, status: StatusBuilder) -> Result<Status>
[src]
Post a new status to the account.
pub fn get_public_timeline(&self, local: bool) -> Result<Vec<Status>>
[src]
Get the federated timeline for the instance.
pub 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.
pub fn statuses<'a, S>(&self, id: &str, request: S) -> Result<Page<Status>> where
S: Into<Option<StatusesRequest<'a>>>,
[src]
S: Into<Option<StatusesRequest<'a>>>,
Get statuses of a single account by id. Optionally only with pictures and or excluding replies.
Example
let client = Mastodon::from_data(data); let statuses = client.statuses("user-id", None)?;
let client = Mastodon::from_data(data); let request = StatusesRequest::default() .only_media(); let statuses = client.statuses("user-id", request)?;
pub 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.
pub 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.
pub fn media(&self, media_builder: MediaBuilder) -> Result<Attachment>
[src]
Equivalent to /api/v1/media
Trait Implementations
impl Clone for Mastodon
[src]
fn clone(&self) -> Mastodon
[src]
fn clone_from(&mut self, source: &Self)
1.0.0[src]
Performs copy-assignment from source
. Read more
impl Deref for Mastodon
[src]
impl Debug for Mastodon
[src]
Auto Trait Implementations
impl Send for Mastodon
impl Unpin for Mastodon
impl Sync for Mastodon
impl !UnwindSafe for Mastodon
impl !RefUnwindSafe for Mastodon
Blanket Implementations
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T> ToOwned for T where
T: Clone,
[src]
T: Clone,
type Owned = T
The resulting type after obtaining ownership.
fn to_owned(&self) -> T
[src]
fn clone_into(&self, target: &mut T)
[src]
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,
type Error = <U as TryFrom<T>>::Error
The type returned in the event of a conversion error.
fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>
[src]
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Erased for T
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
U: TryFrom<T>,