pub struct SearchBuilder { /* private fields */ }Expand description
Represents a tweet search query before being sent.
Implementations§
Source§impl SearchBuilder
impl SearchBuilder
Sourcepub fn lang<S: Into<Cow<'static, str>>>(self, lang: S) -> Self
pub fn lang<S: Into<Cow<'static, str>>>(self, lang: S) -> Self
Restrict search results to those that have been machine-parsed as the given two-letter language code.
Sourcepub fn result_type(self, result_type: ResultType) -> Self
pub fn result_type(self, result_type: ResultType) -> Self
Specify the type of search results to include. The default is Recent.
Sourcepub fn count(self, count: u32) -> Self
pub fn count(self, count: u32) -> Self
Set the number of tweets to return per-page, up to a maximum of 100. The default is 15.
Sourcepub fn until(self, year: u32, month: u32, day: u32) -> Self
pub fn until(self, year: u32, month: u32, day: u32) -> Self
Returns tweets created before the given date. Keep in mind that search is limited to the last 7 days of results, so giving a date here that’s older than a week will return no results.
Sourcepub fn geocode(self, latitude: f32, longitude: f32, radius: Distance) -> Self
pub fn geocode(self, latitude: f32, longitude: f32, radius: Distance) -> Self
Restricts results to users located within the given radius of the given coordinate. This is preferably populated from location-tagged tweets, but can be filled in from the user’s profile as a fallback.
Sourcepub fn since_tweet(self, since_id: u64) -> Self
pub fn since_tweet(self, since_id: u64) -> Self
Restricts results to those with higher IDs than (i.e. that were posted after) the given tweet ID.