Struct kuon::HomeTimeline[][src]

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

Example

let api = kuon::TwitterAPI::new_using_env().await?;
let res = api.home_timeline().count(10).send().await?;
for tweet in res {
    println!("{}", tweet.text);
}

GET statuses/home_timeline

Returns a collection of the most recent Tweets and Retweets posted by the authenticating user and the users they follow. The home timeline is central to how most users interact with the Twitter service. Up to 800 Tweets are obtainable on the home timeline. It is more volatile for users that follow many users or follow users who Tweet frequently.

See Working with Timelines for instructions on traversing timelines efficiently.

Resource Information

Q.A.
Requires authentication?Yes (user context only)
Rate limited?Yes
Requests / 15-min window (user auth)15

https://developer.twitter.com/en/docs/twitter-api/v1/tweets/timelines/api-reference/get-statuses-home_timeline

Implementations

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

pub fn count(&mut self, count: u64) -> &mut Self[src]

Specifies the number of records to retrieve. Must be less than or equal to 200. Defaults to 20. The value of count is best thought of as a limit to the number of tweets to return because suspended or deleted content is removed after the count has been applied.

pub fn since_id(&mut self, since_id: u64) -> &mut Self[src]

Returns results with an ID greater than (that is, more recent than) the specified ID. There are limits to the number of Tweets which can be accessed through the API. If the limit of Tweets has occured since the since_id, the since_id will be forced to the oldest ID available.

pub fn max_id(&mut self, max_id: u64) -> &mut Self[src]

Returns results with an ID less than (that is, older than) or equal to the specified ID.

pub fn trim_user(&mut self, trim_user: impl Into<bool>) -> &mut Self[src]

When set to either true , t or 1 , each Tweet returned in a timeline will include a user object including only the status authors numerical ID. Omit this parameter to receive the complete user object.

pub fn exclude_replies(&mut self, exclude_replies: impl Into<bool>) -> &mut Self[src]

This parameter will prevent replies from appearing in the returned timeline. Using exclude_replies with the count parameter will mean you will receive up-to count Tweets — this is because the count parameter retrieves that many Tweets before filtering out retweets and replies.

pub fn include_entities(
    &mut self,
    include_entities: impl Into<bool>
) -> &mut Self
[src]

The entities node will not be included when set to false.

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

pub async fn send(&self) -> Result<Vec<TrimTweet>, Error>[src]

Trait Implementations

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

fn clone(&self) -> HomeTimeline<'a>[src]

Returns a copy of the value. Read more

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

Performs copy-assignment from source. Read more

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

fn fmt(&self, f: &mut Formatter<'_>) -> Result[src]

Formats the value using the given formatter. Read more

Auto Trait Implementations

impl<'a> !RefUnwindSafe for HomeTimeline<'a>

impl<'a> Send for HomeTimeline<'a>

impl<'a> Sync for HomeTimeline<'a>

impl<'a> Unpin for HomeTimeline<'a>

impl<'a> !UnwindSafe for HomeTimeline<'a>

Blanket Implementations

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

pub fn type_id(&self) -> TypeId[src]

Gets the TypeId of self. Read more

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

pub fn borrow(&self) -> &T[src]

Immutably borrows from an owned value. Read more

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

pub fn borrow_mut(&mut self) -> &mut T[src]

Mutably borrows from an owned value. Read more

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

pub fn from(t: T) -> T[src]

Performs the conversion.

impl<T> Instrument for T[src]

fn instrument(self, span: Span) -> Instrumented<Self>[src]

Instruments this type with the provided Span, returning an Instrumented wrapper. Read more

fn in_current_span(self) -> Instrumented<Self>[src]

Instruments this type with the current Span, returning an Instrumented wrapper. Read more

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

pub fn into(self) -> U[src]

Performs the conversion.

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

type Owned = T

The resulting type after obtaining ownership.

pub fn to_owned(&self) -> T[src]

Creates owned data from borrowed data, usually by cloning. Read more

pub fn clone_into(&self, target: &mut T)[src]

🔬 This is a nightly-only experimental API. (toowned_clone_into)

recently added

Uses borrowed data to replace owned data, usually by cloning. Read more

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.

pub fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>[src]

Performs the conversion.

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.

pub fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>[src]

Performs the conversion.