[][src]Struct furbooru::Client

pub struct Client { /* fields omitted */ }

Implementations

impl Client[src]

pub async fn comment<'_>(&'_ self, id: u64) -> Result<Comment>[src]

Fetch an individual comment by ID.

Search for comments.

impl Client[src]

pub async fn filter<'_>(&'_ self, id: u64) -> Result<Filter>[src]

Fetch a filter by its ID.

pub async fn system_filters<'_>(&'_ self) -> Result<Vec<Filter>>[src]

Fetch the list of system filters.

pub async fn user_filters<'_>(&'_ self, page: u64) -> Result<Vec<Filter>>[src]

Fetch the list of user-level filters.

impl Client[src]

pub async fn firehose<'_, F, Fut>(&'_ self, callback: F) -> Result<()> where
    F: Fn(Message) -> Fut,
    Fut: Future<Output = Result<()>>, 
[src]

On every new site event, call callback. Explode if the callback explodes.

impl Client[src]

pub async fn forums<'_>(&'_ self) -> Result<Vec<Forum>>[src]

Get the list of forums.

pub async fn forum<'_, T: Into<String>>(&'_ self, id: T) -> Result<Forum>[src]

Get details about an individual forum by ID.

impl Client[src]

pub async fn featured_image<'_>(&'_ self) -> Result<Image>[src]

Get information about the currently featured image.

pub async fn image<'_>(&'_ self, id: u64) -> Result<Image>[src]

Get information about an image by ID.

Search for images that match a set of tags.

impl Client[src]

pub async fn post<'_>(&'_ self, id: u64) -> Result<Post>[src]

Fetches a forum post by ID.

pub async fn forum_thread<'_, T: Into<String>>(
    &'_ self,
    forum: T,
    thread: T,
    page: u64
) -> Result<Vec<Post>>
[src]

Fetches page n of posts in a thread in a forum.

impl Client[src]

pub async fn profile<'_>(&'_ self, id: u64) -> Result<User>[src]

Get information about a user's profile by ID.

impl Client[src]

pub async fn tag<'_, T: Into<String>>(&'_ self, name: T) -> Result<Tag>[src]

impl Client[src]

pub async fn topic<'_, T: Into<String>>(
    &'_ self,
    forum: T,
    thread: T
) -> Result<Topic>
[src]

impl Client[src]

pub fn new<T: Into<String>>(user_agent: T, token: T) -> Result<Self>[src]

Create a new client targeting Furbooru.

pub fn derpi<T: Into<String>>(user_agent: T, token: T) -> Result<Self>[src]

Create a new client targeting Derpibooru.

pub fn with_baseurl<T: Into<String>>(
    user_agent: T,
    token: T,
    api_base: T
) -> Result<Self>
[src]

Create a new client targeting any server you want.

Auto Trait Implementations

impl !RefUnwindSafe for Client

impl Send for Client

impl Sync for Client

impl Unpin for Client

impl !UnwindSafe for Client

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> Same<T> for T

type Output = T

Should always be Self

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.

impl<V, T> VZip<V> for T where
    V: MultiLane<T>,