[−][src]Struct snoo::reddit::Reddit
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]
&'r self,
api_data: T::ApiType
) -> T::AbstractedType
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]
&'r self,
query: &'s str,
sort: SearchSort
) -> Result<RedditSearch<'r, 's, Post<'r>>>
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]
&'r self,
query: &'s str,
sort: SearchSort
) -> Result<RedditSearch<'r, 's, Subreddit<'r>>>
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]
&'r self,
query: &'s str,
sort: SearchSort
) -> Result<RedditSearch<'r, 's, RedditUser<'r>>>
Search for a subreddit
pub async fn submission_from_link<'_, '_, '_>(
&'_ self,
url: &'_ str
) -> Result<Submission<'_>>
[src]
&'_ self,
url: &'_ str
) -> Result<Submission<'_>>
Get post info a "Submission" is a post + comments
Trait Implementations
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]
T: 'static + ?Sized,
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> 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>,