pub struct XApiHttpClient { /* private fields */ }Expand description
HTTP client for the X API v2.
Uses reqwest with Bearer token authentication. The access token
is stored behind an Arc<RwLock> so the token manager can
update it transparently after a refresh.
Implementations§
Source§impl XApiHttpClient
impl XApiHttpClient
Sourcepub fn new(access_token: String) -> Self
pub fn new(access_token: String) -> Self
Create a new X API HTTP client with the given access token.
Sourcepub fn with_base_url(access_token: String, base_url: String) -> Self
pub fn with_base_url(access_token: String, base_url: String) -> Self
Create a new client with a custom base URL (for testing with wiremock).
Sourcepub async fn set_pool(&self, pool: DbPool)
pub async fn set_pool(&self, pool: DbPool)
Set the database pool for usage tracking.
Called after DB initialization to enable fire-and-forget recording of every X API call.
Sourcepub fn access_token_lock(&self) -> Arc<RwLock<String>>
pub fn access_token_lock(&self) -> Arc<RwLock<String>>
Get a shared reference to the access token lock for token manager integration.
Sourcepub async fn set_access_token(&self, token: String)
pub async fn set_access_token(&self, token: String)
Update the access token (used by token manager after refresh).
Trait Implementations§
Source§impl XApiClient for XApiHttpClient
impl XApiClient for XApiHttpClient
Source§fn search_tweets<'life0, 'life1, 'life2, 'life3, 'async_trait>(
&'life0 self,
query: &'life1 str,
max_results: u32,
since_id: Option<&'life2 str>,
pagination_token: Option<&'life3 str>,
) -> Pin<Box<dyn Future<Output = Result<SearchResponse, XApiError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
'life3: 'async_trait,
fn search_tweets<'life0, 'life1, 'life2, 'life3, 'async_trait>(
&'life0 self,
query: &'life1 str,
max_results: u32,
since_id: Option<&'life2 str>,
pagination_token: Option<&'life3 str>,
) -> Pin<Box<dyn Future<Output = Result<SearchResponse, XApiError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
'life3: 'async_trait,
Search recent tweets matching the given query. Read more
Source§fn get_mentions<'life0, 'life1, 'life2, 'life3, 'async_trait>(
&'life0 self,
user_id: &'life1 str,
since_id: Option<&'life2 str>,
pagination_token: Option<&'life3 str>,
) -> Pin<Box<dyn Future<Output = Result<MentionResponse, XApiError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
'life3: 'async_trait,
fn get_mentions<'life0, 'life1, 'life2, 'life3, 'async_trait>(
&'life0 self,
user_id: &'life1 str,
since_id: Option<&'life2 str>,
pagination_token: Option<&'life3 str>,
) -> Pin<Box<dyn Future<Output = Result<MentionResponse, XApiError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
'life3: 'async_trait,
Get mentions for the authenticated user. Read more
Source§fn post_tweet<'life0, 'life1, 'async_trait>(
&'life0 self,
text: &'life1 str,
) -> Pin<Box<dyn Future<Output = Result<PostedTweet, XApiError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn post_tweet<'life0, 'life1, 'async_trait>(
&'life0 self,
text: &'life1 str,
) -> Pin<Box<dyn Future<Output = Result<PostedTweet, XApiError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
Post a new tweet.
Source§fn reply_to_tweet<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
text: &'life1 str,
in_reply_to_id: &'life2 str,
) -> Pin<Box<dyn Future<Output = Result<PostedTweet, XApiError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
fn reply_to_tweet<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
text: &'life1 str,
in_reply_to_id: &'life2 str,
) -> Pin<Box<dyn Future<Output = Result<PostedTweet, XApiError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
Reply to an existing tweet.
Source§fn upload_media<'life0, 'life1, 'async_trait>(
&'life0 self,
data: &'life1 [u8],
media_type: MediaType,
) -> Pin<Box<dyn Future<Output = Result<MediaId, XApiError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn upload_media<'life0, 'life1, 'async_trait>(
&'life0 self,
data: &'life1 [u8],
media_type: MediaType,
) -> Pin<Box<dyn Future<Output = Result<MediaId, XApiError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
Upload media to X API for attaching to tweets. Read more
Source§fn post_tweet_with_media<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
text: &'life1 str,
media_ids: &'life2 [String],
) -> Pin<Box<dyn Future<Output = Result<PostedTweet, XApiError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
fn post_tweet_with_media<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
text: &'life1 str,
media_ids: &'life2 [String],
) -> Pin<Box<dyn Future<Output = Result<PostedTweet, XApiError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
Post a new tweet with media attachments. Read more
Source§fn reply_to_tweet_with_media<'life0, 'life1, 'life2, 'life3, 'async_trait>(
&'life0 self,
text: &'life1 str,
in_reply_to_id: &'life2 str,
media_ids: &'life3 [String],
) -> Pin<Box<dyn Future<Output = Result<PostedTweet, XApiError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
'life3: 'async_trait,
fn reply_to_tweet_with_media<'life0, 'life1, 'life2, 'life3, 'async_trait>(
&'life0 self,
text: &'life1 str,
in_reply_to_id: &'life2 str,
media_ids: &'life3 [String],
) -> Pin<Box<dyn Future<Output = Result<PostedTweet, XApiError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
'life3: 'async_trait,
Reply to an existing tweet with media attachments. Read more
Source§fn get_tweet<'life0, 'life1, 'async_trait>(
&'life0 self,
tweet_id: &'life1 str,
) -> Pin<Box<dyn Future<Output = Result<Tweet, XApiError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn get_tweet<'life0, 'life1, 'async_trait>(
&'life0 self,
tweet_id: &'life1 str,
) -> Pin<Box<dyn Future<Output = Result<Tweet, XApiError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
Get a single tweet by ID.
Source§fn get_me<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = Result<User, XApiError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn get_me<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = Result<User, XApiError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Get the authenticated user’s profile.
Source§fn get_user_tweets<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
user_id: &'life1 str,
max_results: u32,
pagination_token: Option<&'life2 str>,
) -> Pin<Box<dyn Future<Output = Result<SearchResponse, XApiError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
fn get_user_tweets<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
user_id: &'life1 str,
max_results: u32,
pagination_token: Option<&'life2 str>,
) -> Pin<Box<dyn Future<Output = Result<SearchResponse, XApiError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
Get recent tweets from a specific user.
Source§fn get_user_by_username<'life0, 'life1, 'async_trait>(
&'life0 self,
username: &'life1 str,
) -> Pin<Box<dyn Future<Output = Result<User, XApiError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn get_user_by_username<'life0, 'life1, 'async_trait>(
&'life0 self,
username: &'life1 str,
) -> Pin<Box<dyn Future<Output = Result<User, XApiError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
Look up a user by their username.
Source§fn quote_tweet<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
text: &'life1 str,
quoted_tweet_id: &'life2 str,
) -> Pin<Box<dyn Future<Output = Result<PostedTweet, XApiError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
fn quote_tweet<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
text: &'life1 str,
quoted_tweet_id: &'life2 str,
) -> Pin<Box<dyn Future<Output = Result<PostedTweet, XApiError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
Post a quote tweet referencing another tweet.
Source§fn like_tweet<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
user_id: &'life1 str,
tweet_id: &'life2 str,
) -> Pin<Box<dyn Future<Output = Result<bool, XApiError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
fn like_tweet<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
user_id: &'life1 str,
tweet_id: &'life2 str,
) -> Pin<Box<dyn Future<Output = Result<bool, XApiError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
Like a tweet on behalf of the authenticated user.
Source§fn follow_user<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
user_id: &'life1 str,
target_user_id: &'life2 str,
) -> Pin<Box<dyn Future<Output = Result<bool, XApiError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
fn follow_user<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
user_id: &'life1 str,
target_user_id: &'life2 str,
) -> Pin<Box<dyn Future<Output = Result<bool, XApiError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
Follow a user on behalf of the authenticated user.
Source§fn unfollow_user<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
user_id: &'life1 str,
target_user_id: &'life2 str,
) -> Pin<Box<dyn Future<Output = Result<bool, XApiError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
fn unfollow_user<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
user_id: &'life1 str,
target_user_id: &'life2 str,
) -> Pin<Box<dyn Future<Output = Result<bool, XApiError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
Unfollow a user on behalf of the authenticated user.
Source§fn retweet<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
user_id: &'life1 str,
tweet_id: &'life2 str,
) -> Pin<Box<dyn Future<Output = Result<bool, XApiError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
fn retweet<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
user_id: &'life1 str,
tweet_id: &'life2 str,
) -> Pin<Box<dyn Future<Output = Result<bool, XApiError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
Retweet a tweet on behalf of the authenticated user.
Source§fn unretweet<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
user_id: &'life1 str,
tweet_id: &'life2 str,
) -> Pin<Box<dyn Future<Output = Result<bool, XApiError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
fn unretweet<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
user_id: &'life1 str,
tweet_id: &'life2 str,
) -> Pin<Box<dyn Future<Output = Result<bool, XApiError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
Undo a retweet on behalf of the authenticated user.
Source§fn delete_tweet<'life0, 'life1, 'async_trait>(
&'life0 self,
tweet_id: &'life1 str,
) -> Pin<Box<dyn Future<Output = Result<bool, XApiError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn delete_tweet<'life0, 'life1, 'async_trait>(
&'life0 self,
tweet_id: &'life1 str,
) -> Pin<Box<dyn Future<Output = Result<bool, XApiError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
Delete a tweet by its ID.
Source§fn get_home_timeline<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
user_id: &'life1 str,
max_results: u32,
pagination_token: Option<&'life2 str>,
) -> Pin<Box<dyn Future<Output = Result<SearchResponse, XApiError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
fn get_home_timeline<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
user_id: &'life1 str,
max_results: u32,
pagination_token: Option<&'life2 str>,
) -> Pin<Box<dyn Future<Output = Result<SearchResponse, XApiError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
Get the authenticated user’s home timeline (reverse chronological).
Source§fn unlike_tweet<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
user_id: &'life1 str,
tweet_id: &'life2 str,
) -> Pin<Box<dyn Future<Output = Result<bool, XApiError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
fn unlike_tweet<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
user_id: &'life1 str,
tweet_id: &'life2 str,
) -> Pin<Box<dyn Future<Output = Result<bool, XApiError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
Unlike a tweet on behalf of the authenticated user.
Source§fn get_followers<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
user_id: &'life1 str,
max_results: u32,
pagination_token: Option<&'life2 str>,
) -> Pin<Box<dyn Future<Output = Result<UsersResponse, XApiError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
fn get_followers<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
user_id: &'life1 str,
max_results: u32,
pagination_token: Option<&'life2 str>,
) -> Pin<Box<dyn Future<Output = Result<UsersResponse, XApiError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
Get followers of a user.
Source§fn get_following<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
user_id: &'life1 str,
max_results: u32,
pagination_token: Option<&'life2 str>,
) -> Pin<Box<dyn Future<Output = Result<UsersResponse, XApiError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
fn get_following<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
user_id: &'life1 str,
max_results: u32,
pagination_token: Option<&'life2 str>,
) -> Pin<Box<dyn Future<Output = Result<UsersResponse, XApiError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
Get accounts a user is following.
Source§fn get_user_by_id<'life0, 'life1, 'async_trait>(
&'life0 self,
user_id: &'life1 str,
) -> Pin<Box<dyn Future<Output = Result<User, XApiError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn get_user_by_id<'life0, 'life1, 'async_trait>(
&'life0 self,
user_id: &'life1 str,
) -> Pin<Box<dyn Future<Output = Result<User, XApiError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
Get a user by their ID.
Source§fn get_liked_tweets<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
user_id: &'life1 str,
max_results: u32,
pagination_token: Option<&'life2 str>,
) -> Pin<Box<dyn Future<Output = Result<SearchResponse, XApiError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
fn get_liked_tweets<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
user_id: &'life1 str,
max_results: u32,
pagination_token: Option<&'life2 str>,
) -> Pin<Box<dyn Future<Output = Result<SearchResponse, XApiError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
Get tweets liked by a user.
Source§fn get_bookmarks<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
user_id: &'life1 str,
max_results: u32,
pagination_token: Option<&'life2 str>,
) -> Pin<Box<dyn Future<Output = Result<SearchResponse, XApiError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
fn get_bookmarks<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
user_id: &'life1 str,
max_results: u32,
pagination_token: Option<&'life2 str>,
) -> Pin<Box<dyn Future<Output = Result<SearchResponse, XApiError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
Get the authenticated user’s bookmarks.
Source§fn bookmark_tweet<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
user_id: &'life1 str,
tweet_id: &'life2 str,
) -> Pin<Box<dyn Future<Output = Result<bool, XApiError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
fn bookmark_tweet<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
user_id: &'life1 str,
tweet_id: &'life2 str,
) -> Pin<Box<dyn Future<Output = Result<bool, XApiError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
Bookmark a tweet.
Source§fn unbookmark_tweet<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
user_id: &'life1 str,
tweet_id: &'life2 str,
) -> Pin<Box<dyn Future<Output = Result<bool, XApiError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
fn unbookmark_tweet<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
user_id: &'life1 str,
tweet_id: &'life2 str,
) -> Pin<Box<dyn Future<Output = Result<bool, XApiError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
Remove a bookmark.
Source§fn get_users_by_ids<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
user_ids: &'life1 [&'life2 str],
) -> Pin<Box<dyn Future<Output = Result<UsersResponse, XApiError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
fn get_users_by_ids<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
user_ids: &'life1 [&'life2 str],
) -> Pin<Box<dyn Future<Output = Result<UsersResponse, XApiError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
Get multiple users by their IDs.
Source§fn get_tweet_liking_users<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
tweet_id: &'life1 str,
max_results: u32,
pagination_token: Option<&'life2 str>,
) -> Pin<Box<dyn Future<Output = Result<UsersResponse, XApiError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
fn get_tweet_liking_users<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
tweet_id: &'life1 str,
max_results: u32,
pagination_token: Option<&'life2 str>,
) -> Pin<Box<dyn Future<Output = Result<UsersResponse, XApiError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
Get users who liked a specific tweet.
Source§fn raw_request<'life0, 'life1, 'life2, 'life3, 'life4, 'life5, 'async_trait>(
&'life0 self,
method: &'life1 str,
url: &'life2 str,
query: Option<&'life3 [(String, String)]>,
body: Option<&'life4 str>,
headers: Option<&'life5 [(String, String)]>,
) -> Pin<Box<dyn Future<Output = Result<RawApiResponse, XApiError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
'life3: 'async_trait,
'life4: 'async_trait,
'life5: 'async_trait,
fn raw_request<'life0, 'life1, 'life2, 'life3, 'life4, 'life5, 'async_trait>(
&'life0 self,
method: &'life1 str,
url: &'life2 str,
query: Option<&'life3 [(String, String)]>,
body: Option<&'life4 str>,
headers: Option<&'life5 [(String, String)]>,
) -> Pin<Box<dyn Future<Output = Result<RawApiResponse, XApiError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
'life3: 'async_trait,
'life4: 'async_trait,
'life5: 'async_trait,
Execute a raw HTTP request against the X API. Read more
Auto Trait Implementations§
impl Freeze for XApiHttpClient
impl !RefUnwindSafe for XApiHttpClient
impl Send for XApiHttpClient
impl Sync for XApiHttpClient
impl Unpin for XApiHttpClient
impl UnsafeUnpin for XApiHttpClient
impl !UnwindSafe for XApiHttpClient
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
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more