[][src]Struct elefren::StatusesRequest

pub struct StatusesRequest<'a> { /* fields omitted */ }

Builder for making a client.statuses() call

Example

let mut request = StatusesRequest::new();
request.only_media().pinned().since_id("foo");

Methods

impl<'a> StatusesRequest<'a>[src]

pub fn new() -> Self[src]

Construct a new StatusesRequest object

Example

let request = StatusesRequest::new();

pub fn only_media(&mut self) -> &mut Self[src]

Set the ?only_media=1 flag for the .statuses() request

Example

let mut request = StatusesRequest::new();
assert_eq!(&request.only_media().to_querystring().expect("Couldn't serialize qs"), "?only_media=1");

pub fn exclude_replies(&mut self) -> &mut Self[src]

Set the ?exclude_replies=1 flag for the .statuses() request

Example

let mut request = StatusesRequest::new();
assert_eq!(
    &request
        .exclude_replies()
        .to_querystring()
        .expect("Couldn't serialize qs"),
    "?exclude_replies=1"
);

pub fn pinned(&mut self) -> &mut Self[src]

Set the ?pinned=1 flag for the .statuses() request

Example

let mut request = StatusesRequest::new();
assert_eq!(
    &request
        .pinned()
        .to_querystring()
        .expect("Couldn't serialize qs"),
    "?pinned=1"
);

pub fn max_id<S: Into<Cow<'a, str>>>(&mut self, max_id: S) -> &mut Self[src]

Set the ?max_id=:max_id flag for the .statuses() request

Example

let mut request = StatusesRequest::new();
assert_eq!(
    &request
        .max_id("foo")
        .to_querystring()
        .expect("Couldn't serialize qs"),
    "?max_id=foo"
);

pub fn since_id<S: Into<Cow<'a, str>>>(&mut self, since_id: S) -> &mut Self[src]

Set the ?since_id=:since_id flag for the .statuses() request

Example

let mut request = StatusesRequest::new();
assert_eq!(
    &request
        .since_id("foo")
        .to_querystring()
        .expect("Couldn't serialize qs"),
    "?since_id=foo"
);

pub fn limit(&mut self, limit: usize) -> &mut Self[src]

Set the ?limit=:limit flag for the .statuses() request

Example

let mut request = StatusesRequest::new();
assert_eq!(
    &request
        .limit(10)
        .to_querystring()
        .expect("Couldn't serialize qs"),
    "?limit=10"
);

pub fn min_id<S: Into<Cow<'a, str>>>(&mut self, min_id: S) -> &mut Self[src]

Set the ?min_id=:min_id flag for the .statuses() request

Example

let mut request = StatusesRequest::new();
assert_eq!(
    &request
        .min_id("foobar")
        .to_querystring()
        .expect("Couldn't serialize qs"),
    "?min_id=foobar"
);

pub fn to_querystring(&self) -> Result<String, Error>[src]

Turns this builder into a querystring

Example

let mut request = StatusesRequest::new();
assert_eq!(
    &request
        .limit(10)
        .pinned()
        .to_querystring()
        .expect("Couldn't serialize qs"),
    "?pinned=1&limit=10"
);

Trait Implementations

impl<'a> PartialEq<StatusesRequest<'a>> for StatusesRequest<'a>[src]

impl<'a> Default for StatusesRequest<'a>[src]

impl<'a> Clone for StatusesRequest<'a>[src]

fn clone_from(&mut self, source: &Self)
1.0.0
[src]

Performs copy-assignment from source. Read more

impl<'a> Into<Option<StatusesRequest<'a>>> for &'a mut StatusesRequest<'a>[src]

impl<'a> Debug for StatusesRequest<'a>[src]

impl<'a> Serialize for StatusesRequest<'a>[src]

Auto Trait Implementations

impl<'a> Send for StatusesRequest<'a>

impl<'a> Sync for StatusesRequest<'a>

Blanket Implementations

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

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

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

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<T> BorrowMut<T> for T where
    T: ?Sized
[src]

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

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

impl<T> Erased for T

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

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