pub struct Scraper {
pub twitter_client: TwitterApiClient,
pub auth: Box<dyn TwitterAuth + Send + Sync>,
}Fields§
§twitter_client: TwitterApiClient§auth: Box<dyn TwitterAuth + Send + Sync>Implementations§
Source§impl Scraper
impl Scraper
pub async fn new() -> Result<Self>
pub async fn login( &mut self, username: String, password: String, email: Option<String>, two_factor_secret: Option<String>, ) -> Result<()>
pub async fn get_profile(&self, username: &str) -> Result<Profile>
pub async fn send_tweet( &self, text: &str, reply_to: Option<&str>, media_data: Option<Vec<(Vec<u8>, String)>>, ) -> Result<Value>
pub async fn get_home_timeline( &self, count: i32, seen_tweet_ids: Vec<String>, ) -> Result<Vec<Value>>
pub async fn get_followers( &self, user_id: &str, count: i32, cursor: Option<String>, ) -> Result<(Vec<Profile>, Option<String>)>
pub async fn get_following( &self, user_id: &str, count: i32, cursor: Option<String>, ) -> Result<(Vec<Profile>, Option<String>)>
pub async fn follow_user(&self, username: &str) -> Result<()>
pub async fn unfollow_user(&self, username: &str) -> Result<()>
pub async fn send_quote_tweet( &self, text: &str, quoted_tweet_id: &str, media_data: Option<Vec<(Vec<u8>, String)>>, ) -> Result<Value>
pub async fn fetch_tweets_and_replies( &self, username: &str, max_tweets: i32, cursor: Option<&str>, ) -> Result<V2QueryTweetsResponse>
pub async fn fetch_tweets_and_replies_by_user_id( &self, user_id: &str, max_tweets: i32, cursor: Option<&str>, ) -> Result<V2QueryTweetsResponse>
pub async fn fetch_list_tweets( &self, list_id: &str, max_tweets: i32, cursor: Option<&str>, ) -> Result<Value>
pub async fn like_tweet(&self, tweet_id: &str) -> Result<Value>
pub async fn retweet(&self, tweet_id: &str) -> Result<Value>
pub async fn create_long_tweet( &self, text: &str, reply_to: Option<&str>, media_ids: Option<Vec<String>>, ) -> Result<Value>
pub async fn get_tweet(&self, id: &str) -> Result<Tweet>
pub async fn search_tweets( &self, query: &str, max_tweets: i32, search_mode: SearchMode, cursor: Option<String>, ) -> Result<QueryTweetsResponse>
pub async fn search_profiles( &self, query: &str, max_profiles: i32, cursor: Option<String>, ) -> Result<QueryProfilesResponse>
pub async fn get_user_tweets( &self, user_id: &str, count: i32, cursor: Option<String>, ) -> Result<V2QueryTweetsResponse>
Auto Trait Implementations§
impl Freeze for Scraper
impl !RefUnwindSafe for Scraper
impl Send for Scraper
impl Sync for Scraper
impl Unpin for Scraper
impl !UnwindSafe for Scraper
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more