pub struct TwitterApiClient {
pub client: Client,
pub auth: Box<dyn TwitterAuth + Send + Sync>,
}Fields§
§client: Client§auth: Box<dyn TwitterAuth + Send + Sync>Implementations§
Source§impl TwitterApiClient
impl TwitterApiClient
pub fn new(auth: Box<dyn TwitterAuth + Send + Sync>) -> Result<Self>
pub async fn send_tweet( &self, text: &str, media_ids: Option<Vec<String>>, ) -> Result<Tweet>
pub async fn get_tweet(&self, tweet_id: &str) -> Result<Tweet>
pub async fn get_user_tweets( &self, user_id: &str, limit: usize, ) -> Result<Vec<Tweet>>
pub async fn get<T: DeserializeOwned>(&self, endpoint: &str) -> Result<T>
pub async fn get_with_params<T: DeserializeOwned>( &self, endpoint: &str, params: Option<Value>, ) -> Result<T>
pub async fn post<T: DeserializeOwned>( &self, endpoint: &str, params: Option<Value>, ) -> Result<T>
pub async fn request<T: DeserializeOwned>( &self, method: Method, endpoint: &str, params: Option<Value>, ) -> Result<T>
Auto Trait Implementations§
impl Freeze for TwitterApiClient
impl !RefUnwindSafe for TwitterApiClient
impl Send for TwitterApiClient
impl Sync for TwitterApiClient
impl Unpin for TwitterApiClient
impl !UnwindSafe for TwitterApiClient
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