[][src]Struct snoo::reddit::Reddit

pub struct Reddit { /* fields omitted */ }

Reddit client instance

Implementations

impl Reddit[src]

pub fn new() -> Result<Reddit>[src]

pub fn from_app(app: RedditApp) -> Result<Reddit>[src]

pub fn bind<'r, T: AbstractedApi<'r>>(
    &'r self,
    api_data: T::ApiType
) -> T::AbstractedType
[src]

Takes a Api model and binds it to the Reddit instance so api calls can be made.

pub fn ep(&self, builder: EndpointBuilder) -> Result<Endpoint>[src]

Builds a new ep

pub fn ep_str(&self, str_ep: &str) -> Result<Endpoint>[src]

Builds a new ep from a string

pub fn rate_limit_off(self) -> Self[src]

No rate limiting.

pub fn rate_limit_bacthed(self) -> Self[src]

Make requests as quick as possable until limit is reached, then wait for reset.

pub fn rate_limit_paced(self) -> Self[src]

Every request will wait (requests_avalible) / (time_avalible) so the delays are evenly spaced.

pub fn user(&self, username: &str) -> RedditUserLink[src]

pub fn subreddit(&self, name: &str) -> SubredditLink[src]

pub async fn search<'r, 's>(
    &'r self,
    query: &'s str,
    sort: SearchSort
) -> Result<RedditSearch<'r, 's, Post<'r>>>
[src]

Search over all of reddit

pub async fn search_subreddits<'r, 's>(
    &'r self,
    query: &'s str,
    sort: SearchSort
) -> Result<RedditSearch<'r, 's, Subreddit<'r>>>
[src]

Search for a subreddit

pub async fn search_users<'r, 's>(
    &'r self,
    query: &'s str,
    sort: SearchSort
) -> Result<RedditSearch<'r, 's, RedditUser<'r>>>
[src]

Search for a subreddit

Get post info a "Submission" is a post + comments

Trait Implementations

impl Clone for Reddit[src]

Auto Trait Implementations

impl !RefUnwindSafe for Reddit

impl Send for Reddit

impl Sync for Reddit

impl Unpin for Reddit

impl !UnwindSafe for Reddit

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> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

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.