universal-mcp-applications 0.1.20__py3-none-any.whl → 0.1.22__py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Potentially problematic release.
This version of universal-mcp-applications might be problematic. Click here for more details.
- universal_mcp/applications/BEST_PRACTICES.md +166 -0
- universal_mcp/applications/airtable/app.py +0 -1
- universal_mcp/applications/apollo/app.py +0 -1
- universal_mcp/applications/aws_s3/app.py +40 -39
- universal_mcp/applications/browser_use/README.md +1 -0
- universal_mcp/applications/browser_use/__init__.py +0 -0
- universal_mcp/applications/browser_use/app.py +76 -0
- universal_mcp/applications/calendly/app.py +125 -125
- universal_mcp/applications/canva/app.py +95 -99
- universal_mcp/applications/confluence/app.py +0 -1
- universal_mcp/applications/contentful/app.py +4 -5
- universal_mcp/applications/domain_checker/app.py +11 -15
- universal_mcp/applications/e2b/app.py +4 -4
- universal_mcp/applications/elevenlabs/app.py +18 -15
- universal_mcp/applications/exa/app.py +17 -17
- universal_mcp/applications/falai/app.py +28 -29
- universal_mcp/applications/file_system/app.py +9 -9
- universal_mcp/applications/firecrawl/app.py +36 -36
- universal_mcp/applications/fireflies/app.py +55 -56
- universal_mcp/applications/fpl/app.py +49 -50
- universal_mcp/applications/ghost_content/app.py +0 -1
- universal_mcp/applications/github/app.py +41 -43
- universal_mcp/applications/google_calendar/app.py +40 -39
- universal_mcp/applications/google_docs/app.py +56 -56
- universal_mcp/applications/google_drive/app.py +212 -215
- universal_mcp/applications/google_gemini/app.py +1 -5
- universal_mcp/applications/google_mail/app.py +91 -90
- universal_mcp/applications/google_searchconsole/app.py +29 -29
- universal_mcp/applications/google_sheet/app.py +115 -115
- universal_mcp/applications/hashnode/README.md +6 -3
- universal_mcp/applications/hashnode/app.py +174 -25
- universal_mcp/applications/http_tools/app.py +10 -11
- universal_mcp/applications/hubspot/__init__.py +1 -1
- universal_mcp/applications/hubspot/api_segments/api_segment_base.py +36 -7
- universal_mcp/applications/hubspot/api_segments/crm_api.py +368 -368
- universal_mcp/applications/hubspot/api_segments/marketing_api.py +115 -115
- universal_mcp/applications/hubspot/app.py +131 -72
- universal_mcp/applications/jira/app.py +0 -1
- universal_mcp/applications/linkedin/app.py +20 -20
- universal_mcp/applications/markitdown/app.py +10 -5
- universal_mcp/applications/ms_teams/app.py +123 -123
- universal_mcp/applications/openai/app.py +40 -39
- universal_mcp/applications/outlook/app.py +32 -32
- universal_mcp/applications/perplexity/app.py +4 -4
- universal_mcp/applications/reddit/app.py +69 -70
- universal_mcp/applications/resend/app.py +116 -117
- universal_mcp/applications/rocketlane/app.py +0 -1
- universal_mcp/applications/scraper/__init__.py +1 -1
- universal_mcp/applications/scraper/app.py +234 -16
- universal_mcp/applications/serpapi/app.py +14 -14
- universal_mcp/applications/sharepoint/app.py +19 -20
- universal_mcp/applications/shopify/app.py +0 -1
- universal_mcp/applications/slack/app.py +48 -48
- universal_mcp/applications/tavily/app.py +4 -4
- universal_mcp/applications/twitter/api_segments/compliance_api.py +13 -15
- universal_mcp/applications/twitter/api_segments/dm_conversations_api.py +20 -20
- universal_mcp/applications/twitter/api_segments/dm_events_api.py +12 -12
- universal_mcp/applications/twitter/api_segments/likes_api.py +12 -12
- universal_mcp/applications/twitter/api_segments/lists_api.py +37 -39
- universal_mcp/applications/twitter/api_segments/spaces_api.py +24 -24
- universal_mcp/applications/twitter/api_segments/trends_api.py +4 -4
- universal_mcp/applications/twitter/api_segments/tweets_api.py +105 -105
- universal_mcp/applications/twitter/api_segments/usage_api.py +4 -4
- universal_mcp/applications/twitter/api_segments/users_api.py +136 -136
- universal_mcp/applications/twitter/app.py +6 -2
- universal_mcp/applications/unipile/app.py +321 -71
- universal_mcp/applications/whatsapp/app.py +53 -54
- universal_mcp/applications/whatsapp/audio.py +39 -35
- universal_mcp/applications/whatsapp/whatsapp.py +176 -154
- universal_mcp/applications/whatsapp_business/app.py +92 -92
- universal_mcp/applications/yahoo_finance/app.py +105 -63
- universal_mcp/applications/youtube/app.py +206 -199
- universal_mcp/applications/zenquotes/__init__.py +2 -0
- universal_mcp/applications/zenquotes/app.py +3 -3
- {universal_mcp_applications-0.1.20.dist-info → universal_mcp_applications-0.1.22.dist-info}/METADATA +2 -1
- {universal_mcp_applications-0.1.20.dist-info → universal_mcp_applications-0.1.22.dist-info}/RECORD +78 -74
- {universal_mcp_applications-0.1.20.dist-info → universal_mcp_applications-0.1.22.dist-info}/WHEEL +0 -0
- {universal_mcp_applications-0.1.20.dist-info → universal_mcp_applications-0.1.22.dist-info}/licenses/LICENSE +0 -0
|
@@ -12,20 +12,20 @@ class UsersApi(APISegmentBase):
|
|
|
12
12
|
) -> dict[str, Any]:
|
|
13
13
|
"""
|
|
14
14
|
Retrieves detailed information for multiple users in a single API request, specified by a list of their unique IDs. Unlike `find_user_by_id`, which fetches a single user, this function performs a bulk lookup and allows for response customization with optional fields and expansions.
|
|
15
|
-
|
|
15
|
+
|
|
16
16
|
Args:
|
|
17
17
|
ids (array): A required query parameter specifying an array of user IDs to retrieve information for multiple users in a single request. Example: '2244994945,6253282,12'.
|
|
18
18
|
user_fields (array): A comma separated list of User fields to display. Example: "['affiliation', 'connection_status', 'created_at', 'description', 'entities', 'id', 'location', 'most_recent_tweet_id', 'name', 'pinned_tweet_id', 'profile_banner_url', 'profile_image_url', 'protected', 'public_metrics', 'receives_your_dm', 'subscription_type', 'url', 'username', 'verified', 'verified_type', 'withheld']".
|
|
19
19
|
expansions (array): A comma separated list of fields to expand. Example: "['affiliation.user_id', 'most_recent_tweet_id', 'pinned_tweet_id']".
|
|
20
20
|
tweet_fields (array): A comma separated list of Tweet fields to display. Example: "['article', 'attachments', 'author_id', 'card_uri', 'context_annotations', 'conversation_id', 'created_at', 'edit_controls', 'edit_history_tweet_ids', 'entities', 'geo', 'id', 'in_reply_to_user_id', 'lang', 'non_public_metrics', 'note_tweet', 'organic_metrics', 'possibly_sensitive', 'promoted_metrics', 'public_metrics', 'referenced_tweets', 'reply_settings', 'scopes', 'source', 'text', 'username', 'withheld']".
|
|
21
|
-
|
|
21
|
+
|
|
22
22
|
Returns:
|
|
23
23
|
dict[str, Any]: The request has succeeded.
|
|
24
|
-
|
|
24
|
+
|
|
25
25
|
Raises:
|
|
26
26
|
HTTPError: Raised when the API request fails (e.g., non-2XX status code).
|
|
27
27
|
JSONDecodeError: Raised if the response body cannot be parsed as JSON.
|
|
28
|
-
|
|
28
|
+
|
|
29
29
|
Tags:
|
|
30
30
|
Users
|
|
31
31
|
"""
|
|
@@ -49,20 +49,20 @@ class UsersApi(APISegmentBase):
|
|
|
49
49
|
) -> dict[str, Any]:
|
|
50
50
|
"""
|
|
51
51
|
Fetches public data for a batch of users specified by their usernames. This function supports retrieving multiple users in a single request, unlike `find_user_by_username`. It allows for data customization through optional fields and expansions.
|
|
52
|
-
|
|
52
|
+
|
|
53
53
|
Args:
|
|
54
54
|
usernames (array): Required array of usernames to filter users by. Example: 'TwitterDev,TwitterAPI'.
|
|
55
55
|
user_fields (array): A comma separated list of User fields to display. Example: "['affiliation', 'connection_status', 'created_at', 'description', 'entities', 'id', 'location', 'most_recent_tweet_id', 'name', 'pinned_tweet_id', 'profile_banner_url', 'profile_image_url', 'protected', 'public_metrics', 'receives_your_dm', 'subscription_type', 'url', 'username', 'verified', 'verified_type', 'withheld']".
|
|
56
56
|
expansions (array): A comma separated list of fields to expand. Example: "['affiliation.user_id', 'most_recent_tweet_id', 'pinned_tweet_id']".
|
|
57
57
|
tweet_fields (array): A comma separated list of Tweet fields to display. Example: "['article', 'attachments', 'author_id', 'card_uri', 'context_annotations', 'conversation_id', 'created_at', 'edit_controls', 'edit_history_tweet_ids', 'entities', 'geo', 'id', 'in_reply_to_user_id', 'lang', 'non_public_metrics', 'note_tweet', 'organic_metrics', 'possibly_sensitive', 'promoted_metrics', 'public_metrics', 'referenced_tweets', 'reply_settings', 'scopes', 'source', 'text', 'username', 'withheld']".
|
|
58
|
-
|
|
58
|
+
|
|
59
59
|
Returns:
|
|
60
60
|
dict[str, Any]: The request has succeeded.
|
|
61
|
-
|
|
61
|
+
|
|
62
62
|
Raises:
|
|
63
63
|
HTTPError: Raised when the API request fails (e.g., non-2XX status code).
|
|
64
64
|
JSONDecodeError: Raised if the response body cannot be parsed as JSON.
|
|
65
|
-
|
|
65
|
+
|
|
66
66
|
Tags:
|
|
67
67
|
Users
|
|
68
68
|
"""
|
|
@@ -86,20 +86,20 @@ class UsersApi(APISegmentBase):
|
|
|
86
86
|
) -> dict[str, Any]:
|
|
87
87
|
"""
|
|
88
88
|
Retrieves detailed information for a single user specified by their username, with options to include additional user, tweet, and expansion fields. This differs from `find_users_by_username`, which fetches data for multiple users in a single request.
|
|
89
|
-
|
|
89
|
+
|
|
90
90
|
Args:
|
|
91
91
|
username (string): username
|
|
92
92
|
user_fields (array): A comma separated list of User fields to display. Example: "['affiliation', 'connection_status', 'created_at', 'description', 'entities', 'id', 'location', 'most_recent_tweet_id', 'name', 'pinned_tweet_id', 'profile_banner_url', 'profile_image_url', 'protected', 'public_metrics', 'receives_your_dm', 'subscription_type', 'url', 'username', 'verified', 'verified_type', 'withheld']".
|
|
93
93
|
expansions (array): A comma separated list of fields to expand. Example: "['affiliation.user_id', 'most_recent_tweet_id', 'pinned_tweet_id']".
|
|
94
94
|
tweet_fields (array): A comma separated list of Tweet fields to display. Example: "['article', 'attachments', 'author_id', 'card_uri', 'context_annotations', 'conversation_id', 'created_at', 'edit_controls', 'edit_history_tweet_ids', 'entities', 'geo', 'id', 'in_reply_to_user_id', 'lang', 'non_public_metrics', 'note_tweet', 'organic_metrics', 'possibly_sensitive', 'promoted_metrics', 'public_metrics', 'referenced_tweets', 'reply_settings', 'scopes', 'source', 'text', 'username', 'withheld']".
|
|
95
|
-
|
|
95
|
+
|
|
96
96
|
Returns:
|
|
97
97
|
dict[str, Any]: The request has succeeded.
|
|
98
|
-
|
|
98
|
+
|
|
99
99
|
Raises:
|
|
100
100
|
HTTPError: Raised when the API request fails (e.g., non-2XX status code).
|
|
101
101
|
JSONDecodeError: Raised if the response body cannot be parsed as JSON.
|
|
102
|
-
|
|
102
|
+
|
|
103
103
|
Tags:
|
|
104
104
|
Users
|
|
105
105
|
"""
|
|
@@ -124,20 +124,20 @@ class UsersApi(APISegmentBase):
|
|
|
124
124
|
) -> Any:
|
|
125
125
|
"""
|
|
126
126
|
Streams real-time user compliance events, such as account deletions or suspensions, from a specified data partition. Allows for backfilling missed data after a disconnection and filtering the event stream by a specific time range for targeted data retrieval.
|
|
127
|
-
|
|
127
|
+
|
|
128
128
|
Args:
|
|
129
129
|
partition (integer): The "partition" parameter is a required integer query parameter that determines which partition of the compliance stream data to retrieve.
|
|
130
130
|
backfill_minutes (integer): Optional integer parameter to specify the number of minutes of missed data to recover after a disconnection; valid values are between 1 and 5 minutes.
|
|
131
131
|
start_time (string): Optional start time in string format for filtering the compliance stream. Example: '2021-02-01T18:40:40.000Z'.
|
|
132
132
|
end_time (string): Optional end time for filtering the compliance stream data, specified as a string. Example: '2021-02-01T18:40:40.000Z'.
|
|
133
|
-
|
|
133
|
+
|
|
134
134
|
Returns:
|
|
135
135
|
Any: The request has succeeded.
|
|
136
|
-
|
|
136
|
+
|
|
137
137
|
Raises:
|
|
138
138
|
HTTPError: Raised when the API request fails (e.g., non-2XX status code).
|
|
139
139
|
JSONDecodeError: Raised if the response body cannot be parsed as JSON.
|
|
140
|
-
|
|
140
|
+
|
|
141
141
|
Tags:
|
|
142
142
|
Compliance
|
|
143
143
|
"""
|
|
@@ -161,19 +161,19 @@ class UsersApi(APISegmentBase):
|
|
|
161
161
|
) -> dict[str, Any]:
|
|
162
162
|
"""
|
|
163
163
|
Retrieves detailed information about the authenticated user making the request. Optional parameters allow for customizing the returned user and tweet data fields and including expanded objects. This differs from other 'find' functions as it requires no ID or username.
|
|
164
|
-
|
|
164
|
+
|
|
165
165
|
Args:
|
|
166
166
|
user_fields (array): A comma separated list of User fields to display. Example: "['affiliation', 'connection_status', 'created_at', 'description', 'entities', 'id', 'location', 'most_recent_tweet_id', 'name', 'pinned_tweet_id', 'profile_banner_url', 'profile_image_url', 'protected', 'public_metrics', 'receives_your_dm', 'subscription_type', 'url', 'username', 'verified', 'verified_type', 'withheld']".
|
|
167
167
|
expansions (array): A comma separated list of fields to expand. Example: "['affiliation.user_id', 'most_recent_tweet_id', 'pinned_tweet_id']".
|
|
168
168
|
tweet_fields (array): A comma separated list of Tweet fields to display. Example: "['article', 'attachments', 'author_id', 'card_uri', 'context_annotations', 'conversation_id', 'created_at', 'edit_controls', 'edit_history_tweet_ids', 'entities', 'geo', 'id', 'in_reply_to_user_id', 'lang', 'non_public_metrics', 'note_tweet', 'organic_metrics', 'possibly_sensitive', 'promoted_metrics', 'public_metrics', 'referenced_tweets', 'reply_settings', 'scopes', 'source', 'text', 'username', 'withheld']".
|
|
169
|
-
|
|
169
|
+
|
|
170
170
|
Returns:
|
|
171
171
|
dict[str, Any]: The request has succeeded.
|
|
172
|
-
|
|
172
|
+
|
|
173
173
|
Raises:
|
|
174
174
|
HTTPError: Raised when the API request fails (e.g., non-2XX status code).
|
|
175
175
|
JSONDecodeError: Raised if the response body cannot be parsed as JSON.
|
|
176
|
-
|
|
176
|
+
|
|
177
177
|
Tags:
|
|
178
178
|
Users
|
|
179
179
|
"""
|
|
@@ -202,7 +202,7 @@ class UsersApi(APISegmentBase):
|
|
|
202
202
|
) -> dict[str, Any]:
|
|
203
203
|
"""
|
|
204
204
|
Searches for users matching a specific query string. Supports pagination and allows customizing the response by specifying which user, tweet, and expansion fields to include in the results, providing a flexible way to discover users.
|
|
205
|
-
|
|
205
|
+
|
|
206
206
|
Args:
|
|
207
207
|
query (string): Search query to filter users based on specific criteria. Example: 'someXUser'.
|
|
208
208
|
max_results (integer): Maximum number of results to return in the search query, with a default of 100.
|
|
@@ -210,14 +210,14 @@ class UsersApi(APISegmentBase):
|
|
|
210
210
|
user_fields (array): A comma separated list of User fields to display. Example: "['affiliation', 'connection_status', 'created_at', 'description', 'entities', 'id', 'location', 'most_recent_tweet_id', 'name', 'pinned_tweet_id', 'profile_banner_url', 'profile_image_url', 'protected', 'public_metrics', 'receives_your_dm', 'subscription_type', 'url', 'username', 'verified', 'verified_type', 'withheld']".
|
|
211
211
|
expansions (array): A comma separated list of fields to expand. Example: "['affiliation.user_id', 'most_recent_tweet_id', 'pinned_tweet_id']".
|
|
212
212
|
tweet_fields (array): A comma separated list of Tweet fields to display. Example: "['article', 'attachments', 'author_id', 'card_uri', 'context_annotations', 'conversation_id', 'created_at', 'edit_controls', 'edit_history_tweet_ids', 'entities', 'geo', 'id', 'in_reply_to_user_id', 'lang', 'non_public_metrics', 'note_tweet', 'organic_metrics', 'possibly_sensitive', 'promoted_metrics', 'public_metrics', 'referenced_tweets', 'reply_settings', 'scopes', 'source', 'text', 'username', 'withheld']".
|
|
213
|
-
|
|
213
|
+
|
|
214
214
|
Returns:
|
|
215
215
|
dict[str, Any]: The request has succeeded.
|
|
216
|
-
|
|
216
|
+
|
|
217
217
|
Raises:
|
|
218
218
|
HTTPError: Raised when the API request fails (e.g., non-2XX status code).
|
|
219
219
|
JSONDecodeError: Raised if the response body cannot be parsed as JSON.
|
|
220
|
-
|
|
220
|
+
|
|
221
221
|
Tags:
|
|
222
222
|
Users
|
|
223
223
|
"""
|
|
@@ -243,20 +243,20 @@ class UsersApi(APISegmentBase):
|
|
|
243
243
|
) -> dict[str, Any]:
|
|
244
244
|
"""
|
|
245
245
|
Retrieves detailed information for a single user specified by their unique ID. This function allows for response customization using optional fields and expansions. It differs from `find_users_by_id`, which fetches data for multiple users in a single request.
|
|
246
|
-
|
|
246
|
+
|
|
247
247
|
Args:
|
|
248
248
|
id (string): id
|
|
249
249
|
user_fields (array): A comma separated list of User fields to display. Example: "['affiliation', 'connection_status', 'created_at', 'description', 'entities', 'id', 'location', 'most_recent_tweet_id', 'name', 'pinned_tweet_id', 'profile_banner_url', 'profile_image_url', 'protected', 'public_metrics', 'receives_your_dm', 'subscription_type', 'url', 'username', 'verified', 'verified_type', 'withheld']".
|
|
250
250
|
expansions (array): A comma separated list of fields to expand. Example: "['affiliation.user_id', 'most_recent_tweet_id', 'pinned_tweet_id']".
|
|
251
251
|
tweet_fields (array): A comma separated list of Tweet fields to display. Example: "['article', 'attachments', 'author_id', 'card_uri', 'context_annotations', 'conversation_id', 'created_at', 'edit_controls', 'edit_history_tweet_ids', 'entities', 'geo', 'id', 'in_reply_to_user_id', 'lang', 'non_public_metrics', 'note_tweet', 'organic_metrics', 'possibly_sensitive', 'promoted_metrics', 'public_metrics', 'referenced_tweets', 'reply_settings', 'scopes', 'source', 'text', 'username', 'withheld']".
|
|
252
|
-
|
|
252
|
+
|
|
253
253
|
Returns:
|
|
254
254
|
dict[str, Any]: The request has succeeded.
|
|
255
|
-
|
|
255
|
+
|
|
256
256
|
Raises:
|
|
257
257
|
HTTPError: Raised when the API request fails (e.g., non-2XX status code).
|
|
258
258
|
JSONDecodeError: Raised if the response body cannot be parsed as JSON.
|
|
259
|
-
|
|
259
|
+
|
|
260
260
|
Tags:
|
|
261
261
|
Users
|
|
262
262
|
"""
|
|
@@ -287,7 +287,7 @@ class UsersApi(APISegmentBase):
|
|
|
287
287
|
) -> dict[str, Any]:
|
|
288
288
|
"""
|
|
289
289
|
Retrieves a paginated list of users blocked by a specified user ID. The response can be customized by specifying additional fields for users, tweets, and expansions to tailor the returned data objects.
|
|
290
|
-
|
|
290
|
+
|
|
291
291
|
Args:
|
|
292
292
|
id (string): id
|
|
293
293
|
max_results (integer): Limits the number of user blocking records returned in the response, with no default value set and requiring an integer input.
|
|
@@ -295,14 +295,14 @@ class UsersApi(APISegmentBase):
|
|
|
295
295
|
user_fields (array): A comma separated list of User fields to display. Example: "['affiliation', 'connection_status', 'created_at', 'description', 'entities', 'id', 'location', 'most_recent_tweet_id', 'name', 'pinned_tweet_id', 'profile_banner_url', 'profile_image_url', 'protected', 'public_metrics', 'receives_your_dm', 'subscription_type', 'url', 'username', 'verified', 'verified_type', 'withheld']".
|
|
296
296
|
expansions (array): A comma separated list of fields to expand. Example: "['affiliation.user_id', 'most_recent_tweet_id', 'pinned_tweet_id']".
|
|
297
297
|
tweet_fields (array): A comma separated list of Tweet fields to display. Example: "['article', 'attachments', 'author_id', 'card_uri', 'context_annotations', 'conversation_id', 'created_at', 'edit_controls', 'edit_history_tweet_ids', 'entities', 'geo', 'id', 'in_reply_to_user_id', 'lang', 'non_public_metrics', 'note_tweet', 'organic_metrics', 'possibly_sensitive', 'promoted_metrics', 'public_metrics', 'referenced_tweets', 'reply_settings', 'scopes', 'source', 'text', 'username', 'withheld']".
|
|
298
|
-
|
|
298
|
+
|
|
299
299
|
Returns:
|
|
300
300
|
dict[str, Any]: The request has succeeded.
|
|
301
|
-
|
|
301
|
+
|
|
302
302
|
Raises:
|
|
303
303
|
HTTPError: Raised when the API request fails (e.g., non-2XX status code).
|
|
304
304
|
JSONDecodeError: Raised if the response body cannot be parsed as JSON.
|
|
305
|
-
|
|
305
|
+
|
|
306
306
|
Tags:
|
|
307
307
|
Users
|
|
308
308
|
"""
|
|
@@ -338,7 +338,7 @@ class UsersApi(APISegmentBase):
|
|
|
338
338
|
) -> dict[str, Any]:
|
|
339
339
|
"""
|
|
340
340
|
Retrieves a paginated list of tweets bookmarked by a specified user. Allows extensive customization of the response data by specifying tweet, media, user, and place fields, as well as object expansions.
|
|
341
|
-
|
|
341
|
+
|
|
342
342
|
Args:
|
|
343
343
|
id (string): id
|
|
344
344
|
max_results (integer): The "max_results" parameter, an optional integer query parameter with a default value of 2, limits the number of bookmark results returned when retrieving a user's bookmarks via the GET operation at "/2/users/{id}/bookmarks".
|
|
@@ -349,14 +349,14 @@ class UsersApi(APISegmentBase):
|
|
|
349
349
|
poll_fields (array): A comma separated list of Poll fields to display. Example: "['duration_minutes', 'end_datetime', 'id', 'options', 'voting_status']".
|
|
350
350
|
user_fields (array): A comma separated list of User fields to display. Example: "['affiliation', 'connection_status', 'created_at', 'description', 'entities', 'id', 'location', 'most_recent_tweet_id', 'name', 'pinned_tweet_id', 'profile_banner_url', 'profile_image_url', 'protected', 'public_metrics', 'receives_your_dm', 'subscription_type', 'url', 'username', 'verified', 'verified_type', 'withheld']".
|
|
351
351
|
place_fields (array): A comma separated list of Place fields to display. Example: "['contained_within', 'country', 'country_code', 'full_name', 'geo', 'id', 'name', 'place_type']".
|
|
352
|
-
|
|
352
|
+
|
|
353
353
|
Returns:
|
|
354
354
|
dict[str, Any]: The request has succeeded.
|
|
355
|
-
|
|
355
|
+
|
|
356
356
|
Raises:
|
|
357
357
|
HTTPError: Raised when the API request fails (e.g., non-2XX status code).
|
|
358
358
|
JSONDecodeError: Raised if the response body cannot be parsed as JSON.
|
|
359
|
-
|
|
359
|
+
|
|
360
360
|
Tags:
|
|
361
361
|
Bookmarks
|
|
362
362
|
"""
|
|
@@ -384,18 +384,18 @@ class UsersApi(APISegmentBase):
|
|
|
384
384
|
def bookmark_tweet(self, id, tweet_id) -> dict[str, Any]:
|
|
385
385
|
"""
|
|
386
386
|
Bookmarks a specific tweet for a user. This action adds the tweet, identified by `tweet_id`, to the bookmarks of the user specified by their unique `id`, making a POST request to the bookmarks endpoint.
|
|
387
|
-
|
|
387
|
+
|
|
388
388
|
Args:
|
|
389
389
|
id (string): id
|
|
390
390
|
tweet_id (string): Unique identifier of this Tweet. This is returned as a string in order to avoid complications with languages and tools that cannot handle large integers. Example: '1346889436626259968'.
|
|
391
|
-
|
|
391
|
+
|
|
392
392
|
Returns:
|
|
393
393
|
dict[str, Any]: The request has succeeded.
|
|
394
|
-
|
|
394
|
+
|
|
395
395
|
Raises:
|
|
396
396
|
HTTPError: Raised when the API request fails (e.g., non-2XX status code).
|
|
397
397
|
JSONDecodeError: Raised if the response body cannot be parsed as JSON.
|
|
398
|
-
|
|
398
|
+
|
|
399
399
|
Tags:
|
|
400
400
|
Bookmarks
|
|
401
401
|
"""
|
|
@@ -420,18 +420,18 @@ class UsersApi(APISegmentBase):
|
|
|
420
420
|
def remove_bookmark(self, id, tweet_id) -> dict[str, Any]:
|
|
421
421
|
"""
|
|
422
422
|
Deletes a bookmarked tweet for a specified user. This action requires both the user's ID and the tweet's ID to target the correct bookmark for removal via an API DELETE request. It is the inverse of `post_users_id_bookmarks`.
|
|
423
|
-
|
|
423
|
+
|
|
424
424
|
Args:
|
|
425
425
|
id (string): id
|
|
426
426
|
tweet_id (string): tweet_id
|
|
427
|
-
|
|
427
|
+
|
|
428
428
|
Returns:
|
|
429
429
|
dict[str, Any]: The request has succeeded.
|
|
430
|
-
|
|
430
|
+
|
|
431
431
|
Raises:
|
|
432
432
|
HTTPError: Raised when the API request fails (e.g., non-2XX status code).
|
|
433
433
|
JSONDecodeError: Raised if the response body cannot be parsed as JSON.
|
|
434
|
-
|
|
434
|
+
|
|
435
435
|
Tags:
|
|
436
436
|
Bookmarks
|
|
437
437
|
"""
|
|
@@ -456,7 +456,7 @@ class UsersApi(APISegmentBase):
|
|
|
456
456
|
) -> dict[str, Any]:
|
|
457
457
|
"""
|
|
458
458
|
Retrieves a paginated list of Twitter Lists that a specified user follows. Identified by user ID, this function allows response customization with optional parameters for pagination, expansions, and specific list or user fields to include in the results.
|
|
459
|
-
|
|
459
|
+
|
|
460
460
|
Args:
|
|
461
461
|
id (string): id
|
|
462
462
|
max_results (integer): Specifies the maximum number of followed lists to return per page, with a default value of 100.
|
|
@@ -464,14 +464,14 @@ class UsersApi(APISegmentBase):
|
|
|
464
464
|
list_fields (array): A comma separated list of List fields to display. Example: "['created_at', 'description', 'follower_count', 'id', 'member_count', 'name', 'owner_id', 'private']".
|
|
465
465
|
expansions (array): A comma separated list of fields to expand. Example: "['owner_id']".
|
|
466
466
|
user_fields (array): A comma separated list of User fields to display. Example: "['affiliation', 'connection_status', 'created_at', 'description', 'entities', 'id', 'location', 'most_recent_tweet_id', 'name', 'pinned_tweet_id', 'profile_banner_url', 'profile_image_url', 'protected', 'public_metrics', 'receives_your_dm', 'subscription_type', 'url', 'username', 'verified', 'verified_type', 'withheld']".
|
|
467
|
-
|
|
467
|
+
|
|
468
468
|
Returns:
|
|
469
469
|
dict[str, Any]: The request has succeeded.
|
|
470
|
-
|
|
470
|
+
|
|
471
471
|
Raises:
|
|
472
472
|
HTTPError: Raised when the API request fails (e.g., non-2XX status code).
|
|
473
473
|
JSONDecodeError: Raised if the response body cannot be parsed as JSON.
|
|
474
|
-
|
|
474
|
+
|
|
475
475
|
Tags:
|
|
476
476
|
Lists
|
|
477
477
|
"""
|
|
@@ -496,18 +496,18 @@ class UsersApi(APISegmentBase):
|
|
|
496
496
|
def follow_list(self, id, list_id=None) -> dict[str, Any]:
|
|
497
497
|
"""
|
|
498
498
|
Causes a specified user to follow a particular Twitter List. It sends a POST request to the `/users/{id}/followed_lists` endpoint with the list's ID. This contrasts with `user_followed_lists`, which retrieves the lists a user already follows, and `list_user_unfollow`, which removes a list.
|
|
499
|
-
|
|
499
|
+
|
|
500
500
|
Args:
|
|
501
501
|
id (string): id
|
|
502
502
|
list_id (string): The unique identifier of this List. Example: '1146654567674912769'.
|
|
503
|
-
|
|
503
|
+
|
|
504
504
|
Returns:
|
|
505
505
|
dict[str, Any]: The request has succeeded.
|
|
506
|
-
|
|
506
|
+
|
|
507
507
|
Raises:
|
|
508
508
|
HTTPError: Raised when the API request fails (e.g., non-2XX status code).
|
|
509
509
|
JSONDecodeError: Raised if the response body cannot be parsed as JSON.
|
|
510
|
-
|
|
510
|
+
|
|
511
511
|
Tags:
|
|
512
512
|
Lists
|
|
513
513
|
"""
|
|
@@ -532,18 +532,18 @@ class UsersApi(APISegmentBase):
|
|
|
532
532
|
def unfollow_list(self, id, list_id) -> dict[str, Any]:
|
|
533
533
|
"""
|
|
534
534
|
Causes a user, specified by their ID, to unfollow a particular Twitter List, identified by its list ID. This action sends a DELETE request to the API, removing the follow relationship between the user and the list.
|
|
535
|
-
|
|
535
|
+
|
|
536
536
|
Args:
|
|
537
537
|
id (string): id
|
|
538
538
|
list_id (string): list_id
|
|
539
|
-
|
|
539
|
+
|
|
540
540
|
Returns:
|
|
541
541
|
dict[str, Any]: The request has succeeded.
|
|
542
|
-
|
|
542
|
+
|
|
543
543
|
Raises:
|
|
544
544
|
HTTPError: Raised when the API request fails (e.g., non-2XX status code).
|
|
545
545
|
JSONDecodeError: Raised if the response body cannot be parsed as JSON.
|
|
546
|
-
|
|
546
|
+
|
|
547
547
|
Tags:
|
|
548
548
|
Lists
|
|
549
549
|
"""
|
|
@@ -568,7 +568,7 @@ class UsersApi(APISegmentBase):
|
|
|
568
568
|
) -> dict[str, Any]:
|
|
569
569
|
"""
|
|
570
570
|
Fetches a paginated list of users who follow a specified user ID. The response can be customized with optional parameters to control the number of results, expand related objects, and specify which user or tweet fields to return.
|
|
571
|
-
|
|
571
|
+
|
|
572
572
|
Args:
|
|
573
573
|
id (string): id
|
|
574
574
|
max_results (integer): The maximum number of follower results to return in the response.
|
|
@@ -576,14 +576,14 @@ class UsersApi(APISegmentBase):
|
|
|
576
576
|
user_fields (array): A comma separated list of User fields to display. Example: "['affiliation', 'connection_status', 'created_at', 'description', 'entities', 'id', 'location', 'most_recent_tweet_id', 'name', 'pinned_tweet_id', 'profile_banner_url', 'profile_image_url', 'protected', 'public_metrics', 'receives_your_dm', 'subscription_type', 'url', 'username', 'verified', 'verified_type', 'withheld']".
|
|
577
577
|
expansions (array): A comma separated list of fields to expand. Example: "['affiliation.user_id', 'most_recent_tweet_id', 'pinned_tweet_id']".
|
|
578
578
|
tweet_fields (array): A comma separated list of Tweet fields to display. Example: "['article', 'attachments', 'author_id', 'card_uri', 'context_annotations', 'conversation_id', 'created_at', 'edit_controls', 'edit_history_tweet_ids', 'entities', 'geo', 'id', 'in_reply_to_user_id', 'lang', 'non_public_metrics', 'note_tweet', 'organic_metrics', 'possibly_sensitive', 'promoted_metrics', 'public_metrics', 'referenced_tweets', 'reply_settings', 'scopes', 'source', 'text', 'username', 'withheld']".
|
|
579
|
-
|
|
579
|
+
|
|
580
580
|
Returns:
|
|
581
581
|
dict[str, Any]: The request has succeeded.
|
|
582
|
-
|
|
582
|
+
|
|
583
583
|
Raises:
|
|
584
584
|
HTTPError: Raised when the API request fails (e.g., non-2XX status code).
|
|
585
585
|
JSONDecodeError: Raised if the response body cannot be parsed as JSON.
|
|
586
|
-
|
|
586
|
+
|
|
587
587
|
Tags:
|
|
588
588
|
Users
|
|
589
589
|
"""
|
|
@@ -616,7 +616,7 @@ class UsersApi(APISegmentBase):
|
|
|
616
616
|
) -> dict[str, Any]:
|
|
617
617
|
"""
|
|
618
618
|
Retrieves a paginated list of users followed by a specific user ID. The response can be customized by requesting additional user fields, tweet fields, and data expansions to include more detailed information about the followed accounts.
|
|
619
|
-
|
|
619
|
+
|
|
620
620
|
Args:
|
|
621
621
|
id (string): id
|
|
622
622
|
max_results (integer): Optional parameter to limit the number of results returned in the response for the GET operation at "/2/users/{id}/following", specified as an integer.
|
|
@@ -624,14 +624,14 @@ class UsersApi(APISegmentBase):
|
|
|
624
624
|
user_fields (array): A comma separated list of User fields to display. Example: "['affiliation', 'connection_status', 'created_at', 'description', 'entities', 'id', 'location', 'most_recent_tweet_id', 'name', 'pinned_tweet_id', 'profile_banner_url', 'profile_image_url', 'protected', 'public_metrics', 'receives_your_dm', 'subscription_type', 'url', 'username', 'verified', 'verified_type', 'withheld']".
|
|
625
625
|
expansions (array): A comma separated list of fields to expand. Example: "['affiliation.user_id', 'most_recent_tweet_id', 'pinned_tweet_id']".
|
|
626
626
|
tweet_fields (array): A comma separated list of Tweet fields to display. Example: "['article', 'attachments', 'author_id', 'card_uri', 'context_annotations', 'conversation_id', 'created_at', 'edit_controls', 'edit_history_tweet_ids', 'entities', 'geo', 'id', 'in_reply_to_user_id', 'lang', 'non_public_metrics', 'note_tweet', 'organic_metrics', 'possibly_sensitive', 'promoted_metrics', 'public_metrics', 'referenced_tweets', 'reply_settings', 'scopes', 'source', 'text', 'username', 'withheld']".
|
|
627
|
-
|
|
627
|
+
|
|
628
628
|
Returns:
|
|
629
629
|
dict[str, Any]: The request has succeeded.
|
|
630
|
-
|
|
630
|
+
|
|
631
631
|
Raises:
|
|
632
632
|
HTTPError: Raised when the API request fails (e.g., non-2XX status code).
|
|
633
633
|
JSONDecodeError: Raised if the response body cannot be parsed as JSON.
|
|
634
|
-
|
|
634
|
+
|
|
635
635
|
Tags:
|
|
636
636
|
Users
|
|
637
637
|
"""
|
|
@@ -656,18 +656,18 @@ class UsersApi(APISegmentBase):
|
|
|
656
656
|
def follow_user(self, id, target_user_id=None) -> dict[str, Any]:
|
|
657
657
|
"""
|
|
658
658
|
Causes a source user, specified by `id`, to follow a target user (`target_user_id`). It sends a POST request to the `/2/users/{id}/following` endpoint to create the follow relationship, distinct from `users_id_following` which retrieves a list of followed users.
|
|
659
|
-
|
|
659
|
+
|
|
660
660
|
Args:
|
|
661
661
|
id (string): id
|
|
662
662
|
target_user_id (string): Unique identifier of this User. This is returned as a string in order to avoid complications with languages and tools that cannot handle large integers. Example: '2244994945'.
|
|
663
|
-
|
|
663
|
+
|
|
664
664
|
Returns:
|
|
665
665
|
dict[str, Any]: The request has succeeded.
|
|
666
|
-
|
|
666
|
+
|
|
667
667
|
Raises:
|
|
668
668
|
HTTPError: Raised when the API request fails (e.g., non-2XX status code).
|
|
669
669
|
JSONDecodeError: Raised if the response body cannot be parsed as JSON.
|
|
670
|
-
|
|
670
|
+
|
|
671
671
|
Tags:
|
|
672
672
|
Users
|
|
673
673
|
"""
|
|
@@ -703,7 +703,7 @@ class UsersApi(APISegmentBase):
|
|
|
703
703
|
) -> dict[str, Any]:
|
|
704
704
|
"""
|
|
705
705
|
Fetches a list of tweets liked by a specified user ID. This function supports pagination and allows for extensive customization of the returned data, including expansions and specific fields for tweets, media, users, polls, and places.
|
|
706
|
-
|
|
706
|
+
|
|
707
707
|
Args:
|
|
708
708
|
id (string): id
|
|
709
709
|
max_results (integer): Optional integer parameter to limit the number of liked tweets returned in the response.
|
|
@@ -714,14 +714,14 @@ class UsersApi(APISegmentBase):
|
|
|
714
714
|
poll_fields (array): A comma separated list of Poll fields to display. Example: "['duration_minutes', 'end_datetime', 'id', 'options', 'voting_status']".
|
|
715
715
|
user_fields (array): A comma separated list of User fields to display. Example: "['affiliation', 'connection_status', 'created_at', 'description', 'entities', 'id', 'location', 'most_recent_tweet_id', 'name', 'pinned_tweet_id', 'profile_banner_url', 'profile_image_url', 'protected', 'public_metrics', 'receives_your_dm', 'subscription_type', 'url', 'username', 'verified', 'verified_type', 'withheld']".
|
|
716
716
|
place_fields (array): A comma separated list of Place fields to display. Example: "['contained_within', 'country', 'country_code', 'full_name', 'geo', 'id', 'name', 'place_type']".
|
|
717
|
-
|
|
717
|
+
|
|
718
718
|
Returns:
|
|
719
719
|
dict[str, Any]: The request has succeeded.
|
|
720
|
-
|
|
720
|
+
|
|
721
721
|
Raises:
|
|
722
722
|
HTTPError: Raised when the API request fails (e.g., non-2XX status code).
|
|
723
723
|
JSONDecodeError: Raised if the response body cannot be parsed as JSON.
|
|
724
|
-
|
|
724
|
+
|
|
725
725
|
Tags:
|
|
726
726
|
Tweets
|
|
727
727
|
"""
|
|
@@ -749,18 +749,18 @@ class UsersApi(APISegmentBase):
|
|
|
749
749
|
def like_tweet(self, id, tweet_id=None) -> dict[str, Any]:
|
|
750
750
|
"""
|
|
751
751
|
Causes a user, specified by `id`, to like a tweet, specified by `tweet_id`. This function sends a POST request to add a like, contrasting with `users_id_unlike` which removes a like and `users_id_liked_tweets` which retrieves a list of liked tweets.
|
|
752
|
-
|
|
752
|
+
|
|
753
753
|
Args:
|
|
754
754
|
id (string): id
|
|
755
755
|
tweet_id (string): Unique identifier of this Tweet. This is returned as a string in order to avoid complications with languages and tools that cannot handle large integers. Example: '1346889436626259968'.
|
|
756
|
-
|
|
756
|
+
|
|
757
757
|
Returns:
|
|
758
758
|
dict[str, Any]: The request has succeeded.
|
|
759
|
-
|
|
759
|
+
|
|
760
760
|
Raises:
|
|
761
761
|
HTTPError: Raised when the API request fails (e.g., non-2XX status code).
|
|
762
762
|
JSONDecodeError: Raised if the response body cannot be parsed as JSON.
|
|
763
|
-
|
|
763
|
+
|
|
764
764
|
Tags:
|
|
765
765
|
Tweets
|
|
766
766
|
"""
|
|
@@ -785,18 +785,18 @@ class UsersApi(APISegmentBase):
|
|
|
785
785
|
def unlike_tweet(self, id, tweet_id) -> dict[str, Any]:
|
|
786
786
|
"""
|
|
787
787
|
Removes a like from a tweet on behalf of an authenticated user. This function identifies the specific like to be deleted using the user's ID and the tweet's ID, then sends a corresponding DELETE request to the Twitter API.
|
|
788
|
-
|
|
788
|
+
|
|
789
789
|
Args:
|
|
790
790
|
id (string): id
|
|
791
791
|
tweet_id (string): tweet_id
|
|
792
|
-
|
|
792
|
+
|
|
793
793
|
Returns:
|
|
794
794
|
dict[str, Any]: The request has succeeded.
|
|
795
|
-
|
|
795
|
+
|
|
796
796
|
Raises:
|
|
797
797
|
HTTPError: Raised when the API request fails (e.g., non-2XX status code).
|
|
798
798
|
JSONDecodeError: Raised if the response body cannot be parsed as JSON.
|
|
799
|
-
|
|
799
|
+
|
|
800
800
|
Tags:
|
|
801
801
|
Tweets
|
|
802
802
|
"""
|
|
@@ -821,7 +821,7 @@ class UsersApi(APISegmentBase):
|
|
|
821
821
|
) -> dict[str, Any]:
|
|
822
822
|
"""
|
|
823
823
|
Retrieves all Twitter Lists of which a specific user is a member. Supports pagination and allows for response customization by specifying which list fields, user fields, and expansions to return, differentiating it from functions that get followed, owned, or pinned lists.
|
|
824
|
-
|
|
824
|
+
|
|
825
825
|
Args:
|
|
826
826
|
id (string): id
|
|
827
827
|
max_results (integer): The maximum number of membership results to return, defaulting to 100 if not specified.
|
|
@@ -829,14 +829,14 @@ class UsersApi(APISegmentBase):
|
|
|
829
829
|
list_fields (array): A comma separated list of List fields to display. Example: "['created_at', 'description', 'follower_count', 'id', 'member_count', 'name', 'owner_id', 'private']".
|
|
830
830
|
expansions (array): A comma separated list of fields to expand. Example: "['owner_id']".
|
|
831
831
|
user_fields (array): A comma separated list of User fields to display. Example: "['affiliation', 'connection_status', 'created_at', 'description', 'entities', 'id', 'location', 'most_recent_tweet_id', 'name', 'pinned_tweet_id', 'profile_banner_url', 'profile_image_url', 'protected', 'public_metrics', 'receives_your_dm', 'subscription_type', 'url', 'username', 'verified', 'verified_type', 'withheld']".
|
|
832
|
-
|
|
832
|
+
|
|
833
833
|
Returns:
|
|
834
834
|
dict[str, Any]: The request has succeeded.
|
|
835
|
-
|
|
835
|
+
|
|
836
836
|
Raises:
|
|
837
837
|
HTTPError: Raised when the API request fails (e.g., non-2XX status code).
|
|
838
838
|
JSONDecodeError: Raised if the response body cannot be parsed as JSON.
|
|
839
|
-
|
|
839
|
+
|
|
840
840
|
Tags:
|
|
841
841
|
Lists
|
|
842
842
|
"""
|
|
@@ -876,7 +876,7 @@ class UsersApi(APISegmentBase):
|
|
|
876
876
|
) -> dict[str, Any]:
|
|
877
877
|
"""
|
|
878
878
|
Retrieves a timeline of tweets mentioning a specified user, identified by their ID. Allows for pagination and filtering by time or tweet ID, with options to customize the returned data fields for tweets, users, media, and other entities.
|
|
879
|
-
|
|
879
|
+
|
|
880
880
|
Args:
|
|
881
881
|
id (string): id
|
|
882
882
|
since_id (string): Optional parameter to return results with an ID greater than (i.e., more recent than) the specified ID. Example: '1346889436626259968'.
|
|
@@ -891,14 +891,14 @@ class UsersApi(APISegmentBase):
|
|
|
891
891
|
poll_fields (array): A comma separated list of Poll fields to display. Example: "['duration_minutes', 'end_datetime', 'id', 'options', 'voting_status']".
|
|
892
892
|
user_fields (array): A comma separated list of User fields to display. Example: "['affiliation', 'connection_status', 'created_at', 'description', 'entities', 'id', 'location', 'most_recent_tweet_id', 'name', 'pinned_tweet_id', 'profile_banner_url', 'profile_image_url', 'protected', 'public_metrics', 'receives_your_dm', 'subscription_type', 'url', 'username', 'verified', 'verified_type', 'withheld']".
|
|
893
893
|
place_fields (array): A comma separated list of Place fields to display. Example: "['contained_within', 'country', 'country_code', 'full_name', 'geo', 'id', 'name', 'place_type']".
|
|
894
|
-
|
|
894
|
+
|
|
895
895
|
Returns:
|
|
896
896
|
dict[str, Any]: The request has succeeded.
|
|
897
|
-
|
|
897
|
+
|
|
898
898
|
Raises:
|
|
899
899
|
HTTPError: Raised when the API request fails (e.g., non-2XX status code).
|
|
900
900
|
JSONDecodeError: Raised if the response body cannot be parsed as JSON.
|
|
901
|
-
|
|
901
|
+
|
|
902
902
|
Tags:
|
|
903
903
|
Tweets
|
|
904
904
|
"""
|
|
@@ -938,7 +938,7 @@ class UsersApi(APISegmentBase):
|
|
|
938
938
|
) -> dict[str, Any]:
|
|
939
939
|
"""
|
|
940
940
|
Retrieves a list of users muted by a specific user, identified by ID. Supports pagination and allows for customizing the returned data, including user fields, expansions, and tweet fields, to tailor the response.
|
|
941
|
-
|
|
941
|
+
|
|
942
942
|
Args:
|
|
943
943
|
id (string): id
|
|
944
944
|
max_results (integer): The "max_results" parameter limits the number of results returned in the response for the GET operation at "/2/users/{id}/muting", with a default value of 100.
|
|
@@ -946,14 +946,14 @@ class UsersApi(APISegmentBase):
|
|
|
946
946
|
user_fields (array): A comma separated list of User fields to display. Example: "['affiliation', 'connection_status', 'created_at', 'description', 'entities', 'id', 'location', 'most_recent_tweet_id', 'name', 'pinned_tweet_id', 'profile_banner_url', 'profile_image_url', 'protected', 'public_metrics', 'receives_your_dm', 'subscription_type', 'url', 'username', 'verified', 'verified_type', 'withheld']".
|
|
947
947
|
expansions (array): A comma separated list of fields to expand. Example: "['affiliation.user_id', 'most_recent_tweet_id', 'pinned_tweet_id']".
|
|
948
948
|
tweet_fields (array): A comma separated list of Tweet fields to display. Example: "['article', 'attachments', 'author_id', 'card_uri', 'context_annotations', 'conversation_id', 'created_at', 'edit_controls', 'edit_history_tweet_ids', 'entities', 'geo', 'id', 'in_reply_to_user_id', 'lang', 'non_public_metrics', 'note_tweet', 'organic_metrics', 'possibly_sensitive', 'promoted_metrics', 'public_metrics', 'referenced_tweets', 'reply_settings', 'scopes', 'source', 'text', 'username', 'withheld']".
|
|
949
|
-
|
|
949
|
+
|
|
950
950
|
Returns:
|
|
951
951
|
dict[str, Any]: The request has succeeded.
|
|
952
|
-
|
|
952
|
+
|
|
953
953
|
Raises:
|
|
954
954
|
HTTPError: Raised when the API request fails (e.g., non-2XX status code).
|
|
955
955
|
JSONDecodeError: Raised if the response body cannot be parsed as JSON.
|
|
956
|
-
|
|
956
|
+
|
|
957
957
|
Tags:
|
|
958
958
|
Users
|
|
959
959
|
"""
|
|
@@ -978,18 +978,18 @@ class UsersApi(APISegmentBase):
|
|
|
978
978
|
def mute_user(self, id, target_user_id=None) -> dict[str, Any]:
|
|
979
979
|
"""
|
|
980
980
|
Mutes a target user on behalf of an authenticated user. This action requires the authenticated user's ID and the target user's ID. It differs from `users_id_unmute` (which unmutes) and `users_id_muting` (which lists muted users) by performing the actual mute operation via POST request.
|
|
981
|
-
|
|
981
|
+
|
|
982
982
|
Args:
|
|
983
983
|
id (string): id
|
|
984
984
|
target_user_id (string): Unique identifier of this User. This is returned as a string in order to avoid complications with languages and tools that cannot handle large integers. Example: '2244994945'.
|
|
985
|
-
|
|
985
|
+
|
|
986
986
|
Returns:
|
|
987
987
|
dict[str, Any]: The request has succeeded.
|
|
988
|
-
|
|
988
|
+
|
|
989
989
|
Raises:
|
|
990
990
|
HTTPError: Raised when the API request fails (e.g., non-2XX status code).
|
|
991
991
|
JSONDecodeError: Raised if the response body cannot be parsed as JSON.
|
|
992
|
-
|
|
992
|
+
|
|
993
993
|
Tags:
|
|
994
994
|
Users
|
|
995
995
|
"""
|
|
@@ -1022,7 +1022,7 @@ class UsersApi(APISegmentBase):
|
|
|
1022
1022
|
) -> dict[str, Any]:
|
|
1023
1023
|
"""
|
|
1024
1024
|
Retrieves all Twitter Lists owned by a specified user ID. Supports pagination and custom data fields for detailed results. This function fetches lists created by the user, distinguishing it from methods that retrieve lists the user follows (`user_followed_lists`) or has pinned (`list_user_pinned_lists`).
|
|
1025
|
-
|
|
1025
|
+
|
|
1026
1026
|
Args:
|
|
1027
1027
|
id (string): id
|
|
1028
1028
|
max_results (integer): Maximum number of owned lists to return in the response; defaults to 100 if not specified.
|
|
@@ -1030,14 +1030,14 @@ class UsersApi(APISegmentBase):
|
|
|
1030
1030
|
list_fields (array): A comma separated list of List fields to display. Example: "['created_at', 'description', 'follower_count', 'id', 'member_count', 'name', 'owner_id', 'private']".
|
|
1031
1031
|
expansions (array): A comma separated list of fields to expand. Example: "['owner_id']".
|
|
1032
1032
|
user_fields (array): A comma separated list of User fields to display. Example: "['affiliation', 'connection_status', 'created_at', 'description', 'entities', 'id', 'location', 'most_recent_tweet_id', 'name', 'pinned_tweet_id', 'profile_banner_url', 'profile_image_url', 'protected', 'public_metrics', 'receives_your_dm', 'subscription_type', 'url', 'username', 'verified', 'verified_type', 'withheld']".
|
|
1033
|
-
|
|
1033
|
+
|
|
1034
1034
|
Returns:
|
|
1035
1035
|
dict[str, Any]: The request has succeeded.
|
|
1036
|
-
|
|
1036
|
+
|
|
1037
1037
|
Raises:
|
|
1038
1038
|
HTTPError: Raised when the API request fails (e.g., non-2XX status code).
|
|
1039
1039
|
JSONDecodeError: Raised if the response body cannot be parsed as JSON.
|
|
1040
|
-
|
|
1040
|
+
|
|
1041
1041
|
Tags:
|
|
1042
1042
|
Lists
|
|
1043
1043
|
"""
|
|
@@ -1064,20 +1064,20 @@ class UsersApi(APISegmentBase):
|
|
|
1064
1064
|
) -> dict[str, Any]:
|
|
1065
1065
|
"""
|
|
1066
1066
|
Retrieves the collection of lists pinned by a specific user, identified by their ID. Optional parameters allow for customizing the returned list and user data fields, and including expansions. This is distinct from fetching lists a user follows or owns.
|
|
1067
|
-
|
|
1067
|
+
|
|
1068
1068
|
Args:
|
|
1069
1069
|
id (string): id
|
|
1070
1070
|
list_fields (array): A comma separated list of List fields to display. Example: "['created_at', 'description', 'follower_count', 'id', 'member_count', 'name', 'owner_id', 'private']".
|
|
1071
1071
|
expansions (array): A comma separated list of fields to expand. Example: "['owner_id']".
|
|
1072
1072
|
user_fields (array): A comma separated list of User fields to display. Example: "['affiliation', 'connection_status', 'created_at', 'description', 'entities', 'id', 'location', 'most_recent_tweet_id', 'name', 'pinned_tweet_id', 'profile_banner_url', 'profile_image_url', 'protected', 'public_metrics', 'receives_your_dm', 'subscription_type', 'url', 'username', 'verified', 'verified_type', 'withheld']".
|
|
1073
|
-
|
|
1073
|
+
|
|
1074
1074
|
Returns:
|
|
1075
1075
|
dict[str, Any]: The request has succeeded.
|
|
1076
|
-
|
|
1076
|
+
|
|
1077
1077
|
Raises:
|
|
1078
1078
|
HTTPError: Raised when the API request fails (e.g., non-2XX status code).
|
|
1079
1079
|
JSONDecodeError: Raised if the response body cannot be parsed as JSON.
|
|
1080
|
-
|
|
1080
|
+
|
|
1081
1081
|
Tags:
|
|
1082
1082
|
Lists
|
|
1083
1083
|
"""
|
|
@@ -1100,18 +1100,18 @@ class UsersApi(APISegmentBase):
|
|
|
1100
1100
|
def pin_list(self, id, list_id) -> dict[str, Any]:
|
|
1101
1101
|
"""
|
|
1102
1102
|
Pins a specified list to a user's profile via a POST request, using the user and list IDs. This creates a new pin, differing from `list_user_unpin` which removes a pin and `list_user_pinned_lists` which retrieves all of a user's currently pinned lists.
|
|
1103
|
-
|
|
1103
|
+
|
|
1104
1104
|
Args:
|
|
1105
1105
|
id (string): id
|
|
1106
1106
|
list_id (string): The unique identifier of this List. Example: '1146654567674912769'.
|
|
1107
|
-
|
|
1107
|
+
|
|
1108
1108
|
Returns:
|
|
1109
1109
|
dict[str, Any]: The request has succeeded.
|
|
1110
|
-
|
|
1110
|
+
|
|
1111
1111
|
Raises:
|
|
1112
1112
|
HTTPError: Raised when the API request fails (e.g., non-2XX status code).
|
|
1113
1113
|
JSONDecodeError: Raised if the response body cannot be parsed as JSON.
|
|
1114
|
-
|
|
1114
|
+
|
|
1115
1115
|
Tags:
|
|
1116
1116
|
Lists
|
|
1117
1117
|
"""
|
|
@@ -1136,18 +1136,18 @@ class UsersApi(APISegmentBase):
|
|
|
1136
1136
|
def unpin_list(self, id, list_id) -> dict[str, Any]:
|
|
1137
1137
|
"""
|
|
1138
1138
|
Unpins a specific list from a user's profile, identified by their user ID and the list's ID. This action sends a DELETE request to the API, removing the specified list from the user's collection of pinned lists.
|
|
1139
|
-
|
|
1139
|
+
|
|
1140
1140
|
Args:
|
|
1141
1141
|
id (string): id
|
|
1142
1142
|
list_id (string): list_id
|
|
1143
|
-
|
|
1143
|
+
|
|
1144
1144
|
Returns:
|
|
1145
1145
|
dict[str, Any]: The request has succeeded.
|
|
1146
|
-
|
|
1146
|
+
|
|
1147
1147
|
Raises:
|
|
1148
1148
|
HTTPError: Raised when the API request fails (e.g., non-2XX status code).
|
|
1149
1149
|
JSONDecodeError: Raised if the response body cannot be parsed as JSON.
|
|
1150
|
-
|
|
1150
|
+
|
|
1151
1151
|
Tags:
|
|
1152
1152
|
Lists
|
|
1153
1153
|
"""
|
|
@@ -1164,18 +1164,18 @@ class UsersApi(APISegmentBase):
|
|
|
1164
1164
|
def create_retweet(self, id, tweet_id=None) -> dict[str, Any]:
|
|
1165
1165
|
"""
|
|
1166
1166
|
Causes a user, identified by `id`, to retweet a specific tweet. This action sends a POST request to the `/2/users/{id}/retweets` endpoint, requiring the `tweet_id` of the tweet to be retweeted. It is the opposite of the `users_id_unretweets` function, which deletes a retweet.
|
|
1167
|
-
|
|
1167
|
+
|
|
1168
1168
|
Args:
|
|
1169
1169
|
id (string): id
|
|
1170
1170
|
tweet_id (string): Unique identifier of this Tweet. This is returned as a string in order to avoid complications with languages and tools that cannot handle large integers. Example: '1346889436626259968'.
|
|
1171
|
-
|
|
1171
|
+
|
|
1172
1172
|
Returns:
|
|
1173
1173
|
dict[str, Any]: The request has succeeded.
|
|
1174
|
-
|
|
1174
|
+
|
|
1175
1175
|
Raises:
|
|
1176
1176
|
HTTPError: Raised when the API request fails (e.g., non-2XX status code).
|
|
1177
1177
|
JSONDecodeError: Raised if the response body cannot be parsed as JSON.
|
|
1178
|
-
|
|
1178
|
+
|
|
1179
1179
|
Tags:
|
|
1180
1180
|
Tweets
|
|
1181
1181
|
"""
|
|
@@ -1200,18 +1200,18 @@ class UsersApi(APISegmentBase):
|
|
|
1200
1200
|
def delete_retweet(self, id, source_tweet_id) -> dict[str, Any]:
|
|
1201
1201
|
"""
|
|
1202
1202
|
Removes a retweet for a specified user by sending a DELETE request to the Twitter API. It requires the user's ID and the ID of the original tweet that was retweeted to successfully undo the action.
|
|
1203
|
-
|
|
1203
|
+
|
|
1204
1204
|
Args:
|
|
1205
1205
|
id (string): id
|
|
1206
1206
|
source_tweet_id (string): source_tweet_id
|
|
1207
|
-
|
|
1207
|
+
|
|
1208
1208
|
Returns:
|
|
1209
1209
|
dict[str, Any]: The request has succeeded.
|
|
1210
|
-
|
|
1210
|
+
|
|
1211
1211
|
Raises:
|
|
1212
1212
|
HTTPError: Raised when the API request fails (e.g., non-2XX status code).
|
|
1213
1213
|
JSONDecodeError: Raised if the response body cannot be parsed as JSON.
|
|
1214
|
-
|
|
1214
|
+
|
|
1215
1215
|
Tags:
|
|
1216
1216
|
Tweets
|
|
1217
1217
|
"""
|
|
@@ -1244,7 +1244,7 @@ class UsersApi(APISegmentBase):
|
|
|
1244
1244
|
) -> dict[str, Any]:
|
|
1245
1245
|
"""
|
|
1246
1246
|
Retrieves tweets from a user's timeline in reverse chronological order. Supports filtering by time or tweet ID, pagination, and excluding replies or retweets. Optional parameters allow for expanding returned data with additional tweet, user, and media fields.
|
|
1247
|
-
|
|
1247
|
+
|
|
1248
1248
|
Args:
|
|
1249
1249
|
id (string): id
|
|
1250
1250
|
since_id (string): The `since_id` parameter specifies the smallest ID of the statuses to be returned, retrieving the newest statuses first, but it may not return all statuses if there are too many between the newest and the specified ID. Example: '791775337160081409'.
|
|
@@ -1260,14 +1260,14 @@ class UsersApi(APISegmentBase):
|
|
|
1260
1260
|
poll_fields (array): A comma separated list of Poll fields to display. Example: "['duration_minutes', 'end_datetime', 'id', 'options', 'voting_status']".
|
|
1261
1261
|
user_fields (array): A comma separated list of User fields to display. Example: "['affiliation', 'connection_status', 'created_at', 'description', 'entities', 'id', 'location', 'most_recent_tweet_id', 'name', 'pinned_tweet_id', 'profile_banner_url', 'profile_image_url', 'protected', 'public_metrics', 'receives_your_dm', 'subscription_type', 'url', 'username', 'verified', 'verified_type', 'withheld']".
|
|
1262
1262
|
place_fields (array): A comma separated list of Place fields to display. Example: "['contained_within', 'country', 'country_code', 'full_name', 'geo', 'id', 'name', 'place_type']".
|
|
1263
|
-
|
|
1263
|
+
|
|
1264
1264
|
Returns:
|
|
1265
1265
|
dict[str, Any]: The request has succeeded.
|
|
1266
|
-
|
|
1266
|
+
|
|
1267
1267
|
Raises:
|
|
1268
1268
|
HTTPError: Raised when the API request fails (e.g., non-2XX status code).
|
|
1269
1269
|
JSONDecodeError: Raised if the response body cannot be parsed as JSON.
|
|
1270
|
-
|
|
1270
|
+
|
|
1271
1271
|
Tags:
|
|
1272
1272
|
Tweets
|
|
1273
1273
|
"""
|
|
@@ -1316,7 +1316,7 @@ class UsersApi(APISegmentBase):
|
|
|
1316
1316
|
) -> dict[str, Any]:
|
|
1317
1317
|
"""
|
|
1318
1318
|
Retrieves tweets authored by a specific user, identified by their ID. Supports pagination and filtering by time range, allowing response customization to exclude replies or retweets. This fetches tweets composed by the user, unlike the more general `users_id_timeline` function which includes retweets.
|
|
1319
|
-
|
|
1319
|
+
|
|
1320
1320
|
Args:
|
|
1321
1321
|
id (string): id
|
|
1322
1322
|
since_id (string): Returns only Tweets with IDs greater than (more recent than) the specified ID, allowing retrieval of Tweets posted after that ID. Example: '791775337160081409'.
|
|
@@ -1332,14 +1332,14 @@ class UsersApi(APISegmentBase):
|
|
|
1332
1332
|
poll_fields (array): A comma separated list of Poll fields to display. Example: "['duration_minutes', 'end_datetime', 'id', 'options', 'voting_status']".
|
|
1333
1333
|
user_fields (array): A comma separated list of User fields to display. Example: "['affiliation', 'connection_status', 'created_at', 'description', 'entities', 'id', 'location', 'most_recent_tweet_id', 'name', 'pinned_tweet_id', 'profile_banner_url', 'profile_image_url', 'protected', 'public_metrics', 'receives_your_dm', 'subscription_type', 'url', 'username', 'verified', 'verified_type', 'withheld']".
|
|
1334
1334
|
place_fields (array): A comma separated list of Place fields to display. Example: "['contained_within', 'country', 'country_code', 'full_name', 'geo', 'id', 'name', 'place_type']".
|
|
1335
|
-
|
|
1335
|
+
|
|
1336
1336
|
Returns:
|
|
1337
1337
|
dict[str, Any]: The request has succeeded.
|
|
1338
|
-
|
|
1338
|
+
|
|
1339
1339
|
Raises:
|
|
1340
1340
|
HTTPError: Raised when the API request fails (e.g., non-2XX status code).
|
|
1341
1341
|
JSONDecodeError: Raised if the response body cannot be parsed as JSON.
|
|
1342
|
-
|
|
1342
|
+
|
|
1343
1343
|
Tags:
|
|
1344
1344
|
Tweets
|
|
1345
1345
|
"""
|
|
@@ -1372,18 +1372,18 @@ class UsersApi(APISegmentBase):
|
|
|
1372
1372
|
def unfollow_user(self, source_user_id, target_user_id) -> dict[str, Any]:
|
|
1373
1373
|
"""
|
|
1374
1374
|
Causes a specified user (`source_user_id`) to unfollow another user (`target_user_id`). This function sends a DELETE API request to remove the follow relationship, requiring both user IDs to successfully complete the action.
|
|
1375
|
-
|
|
1375
|
+
|
|
1376
1376
|
Args:
|
|
1377
1377
|
source_user_id (string): source_user_id
|
|
1378
1378
|
target_user_id (string): target_user_id
|
|
1379
|
-
|
|
1379
|
+
|
|
1380
1380
|
Returns:
|
|
1381
1381
|
dict[str, Any]: The request has succeeded.
|
|
1382
|
-
|
|
1382
|
+
|
|
1383
1383
|
Raises:
|
|
1384
1384
|
HTTPError: Raised when the API request fails (e.g., non-2XX status code).
|
|
1385
1385
|
JSONDecodeError: Raised if the response body cannot be parsed as JSON.
|
|
1386
|
-
|
|
1386
|
+
|
|
1387
1387
|
Tags:
|
|
1388
1388
|
Users
|
|
1389
1389
|
"""
|
|
@@ -1400,18 +1400,18 @@ class UsersApi(APISegmentBase):
|
|
|
1400
1400
|
def unmute_user(self, source_user_id, target_user_id) -> dict[str, Any]:
|
|
1401
1401
|
"""
|
|
1402
1402
|
Allows an authenticated user (source) to unmute another user (target). This action removes the specified target user from the source user's mute list, reversing a previous mute action.
|
|
1403
|
-
|
|
1403
|
+
|
|
1404
1404
|
Args:
|
|
1405
1405
|
source_user_id (string): source_user_id
|
|
1406
1406
|
target_user_id (string): target_user_id
|
|
1407
|
-
|
|
1407
|
+
|
|
1408
1408
|
Returns:
|
|
1409
1409
|
dict[str, Any]: The request has succeeded.
|
|
1410
|
-
|
|
1410
|
+
|
|
1411
1411
|
Raises:
|
|
1412
1412
|
HTTPError: Raised when the API request fails (e.g., non-2XX status code).
|
|
1413
1413
|
JSONDecodeError: Raised if the response body cannot be parsed as JSON.
|
|
1414
|
-
|
|
1414
|
+
|
|
1415
1415
|
Tags:
|
|
1416
1416
|
Users
|
|
1417
1417
|
"""
|