universal-mcp-applications 0.1.13__py3-none-any.whl → 0.1.14__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.

Files changed (54) hide show
  1. universal_mcp/applications/aws_s3/app.py +71 -71
  2. universal_mcp/applications/calendly/app.py +199 -199
  3. universal_mcp/applications/canva/app.py +189 -189
  4. universal_mcp/applications/domain_checker/app.py +31 -24
  5. universal_mcp/applications/e2b/app.py +6 -7
  6. universal_mcp/applications/elevenlabs/app.py +24 -20
  7. universal_mcp/applications/exa/app.py +25 -20
  8. universal_mcp/applications/falai/app.py +44 -41
  9. universal_mcp/applications/file_system/app.py +20 -12
  10. universal_mcp/applications/firecrawl/app.py +46 -47
  11. universal_mcp/applications/fireflies/app.py +79 -79
  12. universal_mcp/applications/fpl/app.py +83 -74
  13. universal_mcp/applications/github/README.md +0 -1028
  14. universal_mcp/applications/github/app.py +55 -50227
  15. universal_mcp/applications/google_calendar/app.py +63 -65
  16. universal_mcp/applications/google_docs/app.py +78 -78
  17. universal_mcp/applications/google_drive/app.py +361 -440
  18. universal_mcp/applications/google_gemini/app.py +34 -17
  19. universal_mcp/applications/google_mail/app.py +117 -117
  20. universal_mcp/applications/google_searchconsole/app.py +41 -47
  21. universal_mcp/applications/google_sheet/app.py +157 -164
  22. universal_mcp/applications/http_tools/app.py +16 -16
  23. universal_mcp/applications/linkedin/app.py +26 -31
  24. universal_mcp/applications/ms_teams/app.py +190 -190
  25. universal_mcp/applications/openai/app.py +55 -56
  26. universal_mcp/applications/outlook/app.py +57 -57
  27. universal_mcp/applications/perplexity/app.py +17 -17
  28. universal_mcp/applications/reddit/app.py +225 -4053
  29. universal_mcp/applications/replicate/app.py +40 -42
  30. universal_mcp/applications/resend/app.py +157 -154
  31. universal_mcp/applications/scraper/app.py +24 -24
  32. universal_mcp/applications/serpapi/app.py +18 -20
  33. universal_mcp/applications/sharepoint/app.py +46 -36
  34. universal_mcp/applications/slack/app.py +66 -66
  35. universal_mcp/applications/tavily/app.py +7 -7
  36. universal_mcp/applications/twitter/api_segments/compliance_api.py +17 -20
  37. universal_mcp/applications/twitter/api_segments/dm_conversations_api.py +35 -40
  38. universal_mcp/applications/twitter/api_segments/dm_events_api.py +18 -21
  39. universal_mcp/applications/twitter/api_segments/likes_api.py +19 -22
  40. universal_mcp/applications/twitter/api_segments/lists_api.py +59 -68
  41. universal_mcp/applications/twitter/api_segments/spaces_api.py +36 -42
  42. universal_mcp/applications/twitter/api_segments/trends_api.py +7 -8
  43. universal_mcp/applications/twitter/api_segments/tweets_api.py +159 -185
  44. universal_mcp/applications/twitter/api_segments/usage_api.py +5 -6
  45. universal_mcp/applications/twitter/api_segments/users_api.py +230 -264
  46. universal_mcp/applications/unipile/app.py +99 -105
  47. universal_mcp/applications/whatsapp/app.py +86 -82
  48. universal_mcp/applications/whatsapp_business/app.py +147 -147
  49. universal_mcp/applications/youtube/app.py +290 -290
  50. universal_mcp/applications/zenquotes/app.py +6 -6
  51. {universal_mcp_applications-0.1.13.dist-info → universal_mcp_applications-0.1.14.dist-info}/METADATA +1 -1
  52. {universal_mcp_applications-0.1.13.dist-info → universal_mcp_applications-0.1.14.dist-info}/RECORD +54 -54
  53. {universal_mcp_applications-0.1.13.dist-info → universal_mcp_applications-0.1.14.dist-info}/WHEEL +0 -0
  54. {universal_mcp_applications-0.1.13.dist-info → universal_mcp_applications-0.1.14.dist-info}/licenses/LICENSE +0 -0
@@ -7,26 +7,25 @@ class UsersApi(APISegmentBase):
7
7
  def __init__(self, main_app_client: Any):
8
8
  super().__init__(main_app_client)
9
9
 
10
- def find_users_by_id(
10
+ def get_users_by_ids(
11
11
  self, ids, user_fields=None, expansions=None, tweet_fields=None
12
12
  ) -> dict[str, Any]:
13
13
  """
14
-
15
- Retrieves information about one or more users specified by their IDs, allowing for customization with user fields and expansions.
16
-
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
+
17
16
  Args:
18
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'.
19
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']".
20
19
  expansions (array): A comma separated list of fields to expand. Example: "['affiliation.user_id', 'most_recent_tweet_id', 'pinned_tweet_id']".
21
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']".
22
-
21
+
23
22
  Returns:
24
23
  dict[str, Any]: The request has succeeded.
25
-
24
+
26
25
  Raises:
27
26
  HTTPError: Raised when the API request fails (e.g., non-2XX status code).
28
27
  JSONDecodeError: Raised if the response body cannot be parsed as JSON.
29
-
28
+
30
29
  Tags:
31
30
  Users
32
31
  """
@@ -45,26 +44,25 @@ class UsersApi(APISegmentBase):
45
44
  response.raise_for_status()
46
45
  return response.json()
47
46
 
48
- def find_users_by_username(
47
+ def get_users_by_usernames(
49
48
  self, usernames, user_fields=None, expansions=None, tweet_fields=None
50
49
  ) -> dict[str, Any]:
51
50
  """
52
-
53
- Retrieves information about one or more users specified by their usernames using the Twitter API, allowing optional specification of additional user fields and expansions.
54
-
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
+
55
53
  Args:
56
54
  usernames (array): Required array of usernames to filter users by. Example: 'TwitterDev,TwitterAPI'.
57
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']".
58
56
  expansions (array): A comma separated list of fields to expand. Example: "['affiliation.user_id', 'most_recent_tweet_id', 'pinned_tweet_id']".
59
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']".
60
-
58
+
61
59
  Returns:
62
60
  dict[str, Any]: The request has succeeded.
63
-
61
+
64
62
  Raises:
65
63
  HTTPError: Raised when the API request fails (e.g., non-2XX status code).
66
64
  JSONDecodeError: Raised if the response body cannot be parsed as JSON.
67
-
65
+
68
66
  Tags:
69
67
  Users
70
68
  """
@@ -87,22 +85,21 @@ class UsersApi(APISegmentBase):
87
85
  self, username, user_fields=None, expansions=None, tweet_fields=None
88
86
  ) -> dict[str, Any]:
89
87
  """
90
-
91
- Retrieves information about a user specified by their username, optionally including additional fields and expansions, using the "GET" method with authentication.
92
-
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
+
93
90
  Args:
94
91
  username (string): username
95
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']".
96
93
  expansions (array): A comma separated list of fields to expand. Example: "['affiliation.user_id', 'most_recent_tweet_id', 'pinned_tweet_id']".
97
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']".
98
-
95
+
99
96
  Returns:
100
97
  dict[str, Any]: The request has succeeded.
101
-
98
+
102
99
  Raises:
103
100
  HTTPError: Raised when the API request fails (e.g., non-2XX status code).
104
101
  JSONDecodeError: Raised if the response body cannot be parsed as JSON.
105
-
102
+
106
103
  Tags:
107
104
  Users
108
105
  """
@@ -126,22 +123,21 @@ class UsersApi(APISegmentBase):
126
123
  self, partition, backfill_minutes=None, start_time=None, end_time=None
127
124
  ) -> Any:
128
125
  """
129
-
130
- Streams compliance data for users using the "GET" method, supporting optional backfill minutes, start and end times, and requiring a partition parameter.
131
-
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
+
132
128
  Args:
133
129
  partition (integer): The "partition" parameter is a required integer query parameter that determines which partition of the compliance stream data to retrieve.
134
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.
135
131
  start_time (string): Optional start time in string format for filtering the compliance stream. Example: '2021-02-01T18:40:40.000Z'.
136
132
  end_time (string): Optional end time for filtering the compliance stream data, specified as a string. Example: '2021-02-01T18:40:40.000Z'.
137
-
133
+
138
134
  Returns:
139
135
  Any: The request has succeeded.
140
-
136
+
141
137
  Raises:
142
138
  HTTPError: Raised when the API request fails (e.g., non-2XX status code).
143
139
  JSONDecodeError: Raised if the response body cannot be parsed as JSON.
144
-
140
+
145
141
  Tags:
146
142
  Compliance
147
143
  """
@@ -160,25 +156,24 @@ class UsersApi(APISegmentBase):
160
156
  response.raise_for_status()
161
157
  return response.json()
162
158
 
163
- def find_my_user(
159
+ def get_authenticated_user(
164
160
  self, user_fields=None, expansions=None, tweet_fields=None
165
161
  ) -> dict[str, Any]:
166
162
  """
167
-
168
- Retrieves detailed information about the authenticated user, including optional expansions and fields for user and tweet data.
169
-
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
+
170
165
  Args:
171
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']".
172
167
  expansions (array): A comma separated list of fields to expand. Example: "['affiliation.user_id', 'most_recent_tweet_id', 'pinned_tweet_id']".
173
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']".
174
-
169
+
175
170
  Returns:
176
171
  dict[str, Any]: The request has succeeded.
177
-
172
+
178
173
  Raises:
179
174
  HTTPError: Raised when the API request fails (e.g., non-2XX status code).
180
175
  JSONDecodeError: Raised if the response body cannot be parsed as JSON.
181
-
176
+
182
177
  Tags:
183
178
  Users
184
179
  """
@@ -196,7 +191,7 @@ class UsersApi(APISegmentBase):
196
191
  response.raise_for_status()
197
192
  return response.json()
198
193
 
199
- def search_user_by_query(
194
+ def search_users_by_query(
200
195
  self,
201
196
  query,
202
197
  max_results=None,
@@ -206,9 +201,8 @@ class UsersApi(APISegmentBase):
206
201
  tweet_fields=None,
207
202
  ) -> dict[str, Any]:
208
203
  """
209
-
210
- Searches for users using a query string, returning a list of matching users with optional fields for user details, expansions, and related tweet fields.
211
-
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
+
212
206
  Args:
213
207
  query (string): Search query to filter users based on specific criteria. Example: 'someXUser'.
214
208
  max_results (integer): Maximum number of results to return in the search query, with a default of 100.
@@ -216,14 +210,14 @@ class UsersApi(APISegmentBase):
216
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']".
217
211
  expansions (array): A comma separated list of fields to expand. Example: "['affiliation.user_id', 'most_recent_tweet_id', 'pinned_tweet_id']".
218
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']".
219
-
213
+
220
214
  Returns:
221
215
  dict[str, Any]: The request has succeeded.
222
-
216
+
223
217
  Raises:
224
218
  HTTPError: Raised when the API request fails (e.g., non-2XX status code).
225
219
  JSONDecodeError: Raised if the response body cannot be parsed as JSON.
226
-
220
+
227
221
  Tags:
228
222
  Users
229
223
  """
@@ -248,22 +242,21 @@ class UsersApi(APISegmentBase):
248
242
  self, id, user_fields=None, expansions=None, tweet_fields=None
249
243
  ) -> dict[str, Any]:
250
244
  """
251
-
252
- Retrieves information about a user specified by their ID, with optional parameters for specifying additional user fields, expansions, and tweet fields.
253
-
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
+
254
247
  Args:
255
248
  id (string): id
256
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']".
257
250
  expansions (array): A comma separated list of fields to expand. Example: "['affiliation.user_id', 'most_recent_tweet_id', 'pinned_tweet_id']".
258
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']".
259
-
252
+
260
253
  Returns:
261
254
  dict[str, Any]: The request has succeeded.
262
-
255
+
263
256
  Raises:
264
257
  HTTPError: Raised when the API request fails (e.g., non-2XX status code).
265
258
  JSONDecodeError: Raised if the response body cannot be parsed as JSON.
266
-
259
+
267
260
  Tags:
268
261
  Users
269
262
  """
@@ -283,7 +276,7 @@ class UsersApi(APISegmentBase):
283
276
  response.raise_for_status()
284
277
  return response.json()
285
278
 
286
- def users_id_blocking(
279
+ def list_blocked_users(
287
280
  self,
288
281
  id,
289
282
  max_results=None,
@@ -293,9 +286,8 @@ class UsersApi(APISegmentBase):
293
286
  tweet_fields=None,
294
287
  ) -> dict[str, Any]:
295
288
  """
296
-
297
- Retrieves a list of user objects that are blocked by the specified user ID, allowing for additional fields and expansions to be specified.
298
-
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
+
299
291
  Args:
300
292
  id (string): id
301
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.
@@ -303,14 +295,14 @@ class UsersApi(APISegmentBase):
303
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']".
304
296
  expansions (array): A comma separated list of fields to expand. Example: "['affiliation.user_id', 'most_recent_tweet_id', 'pinned_tweet_id']".
305
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']".
306
-
298
+
307
299
  Returns:
308
300
  dict[str, Any]: The request has succeeded.
309
-
301
+
310
302
  Raises:
311
303
  HTTPError: Raised when the API request fails (e.g., non-2XX status code).
312
304
  JSONDecodeError: Raised if the response body cannot be parsed as JSON.
313
-
305
+
314
306
  Tags:
315
307
  Users
316
308
  """
@@ -332,7 +324,7 @@ class UsersApi(APISegmentBase):
332
324
  response.raise_for_status()
333
325
  return response.json()
334
326
 
335
- def get_users_id_bookmarks(
327
+ def list_user_bookmarks(
336
328
  self,
337
329
  id,
338
330
  max_results=None,
@@ -345,9 +337,8 @@ class UsersApi(APISegmentBase):
345
337
  place_fields=None,
346
338
  ) -> dict[str, Any]:
347
339
  """
348
-
349
- Retrieves a list of bookmarks for a user with the specified ID, allowing optional pagination and customization of returned fields.
350
-
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
+
351
342
  Args:
352
343
  id (string): id
353
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".
@@ -358,14 +349,14 @@ class UsersApi(APISegmentBase):
358
349
  poll_fields (array): A comma separated list of Poll fields to display. Example: "['duration_minutes', 'end_datetime', 'id', 'options', 'voting_status']".
359
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']".
360
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']".
361
-
352
+
362
353
  Returns:
363
354
  dict[str, Any]: The request has succeeded.
364
-
355
+
365
356
  Raises:
366
357
  HTTPError: Raised when the API request fails (e.g., non-2XX status code).
367
358
  JSONDecodeError: Raised if the response body cannot be parsed as JSON.
368
-
359
+
369
360
  Tags:
370
361
  Bookmarks
371
362
  """
@@ -390,22 +381,21 @@ class UsersApi(APISegmentBase):
390
381
  response.raise_for_status()
391
382
  return response.json()
392
383
 
393
- def post_users_id_bookmarks(self, id, tweet_id) -> dict[str, Any]:
384
+ def bookmark_tweet(self, id, tweet_id) -> dict[str, Any]:
394
385
  """
395
-
396
- Adds bookmarks for a specified user using the provided JSON data and returns a successful response upon completion.
397
-
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
+
398
388
  Args:
399
389
  id (string): id
400
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'.
401
-
391
+
402
392
  Returns:
403
393
  dict[str, Any]: The request has succeeded.
404
-
394
+
405
395
  Raises:
406
396
  HTTPError: Raised when the API request fails (e.g., non-2XX status code).
407
397
  JSONDecodeError: Raised if the response body cannot be parsed as JSON.
408
-
398
+
409
399
  Tags:
410
400
  Bookmarks
411
401
  """
@@ -427,22 +417,21 @@ class UsersApi(APISegmentBase):
427
417
  response.raise_for_status()
428
418
  return response.json()
429
419
 
430
- def users_id_bookmarks_delete(self, id, tweet_id) -> dict[str, Any]:
420
+ def remove_bookmark(self, id, tweet_id) -> dict[str, Any]:
431
421
  """
432
-
433
- Deletes a bookmarked tweet for a specified user using the "DELETE" method.
434
-
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
+
435
424
  Args:
436
425
  id (string): id
437
426
  tweet_id (string): tweet_id
438
-
427
+
439
428
  Returns:
440
429
  dict[str, Any]: The request has succeeded.
441
-
430
+
442
431
  Raises:
443
432
  HTTPError: Raised when the API request fails (e.g., non-2XX status code).
444
433
  JSONDecodeError: Raised if the response body cannot be parsed as JSON.
445
-
434
+
446
435
  Tags:
447
436
  Bookmarks
448
437
  """
@@ -456,7 +445,7 @@ class UsersApi(APISegmentBase):
456
445
  response.raise_for_status()
457
446
  return response.json()
458
447
 
459
- def user_followed_lists(
448
+ def get_user_followed_lists(
460
449
  self,
461
450
  id,
462
451
  max_results=None,
@@ -466,9 +455,8 @@ class UsersApi(APISegmentBase):
466
455
  user_fields=None,
467
456
  ) -> dict[str, Any]:
468
457
  """
469
-
470
- Retrieves a list of Twitter lists followed by a specified user, with optional parameters for pagination, list fields, and user fields.
471
-
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
+
472
460
  Args:
473
461
  id (string): id
474
462
  max_results (integer): Specifies the maximum number of followed lists to return per page, with a default value of 100.
@@ -476,14 +464,14 @@ class UsersApi(APISegmentBase):
476
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']".
477
465
  expansions (array): A comma separated list of fields to expand. Example: "['owner_id']".
478
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']".
479
-
467
+
480
468
  Returns:
481
469
  dict[str, Any]: The request has succeeded.
482
-
470
+
483
471
  Raises:
484
472
  HTTPError: Raised when the API request fails (e.g., non-2XX status code).
485
473
  JSONDecodeError: Raised if the response body cannot be parsed as JSON.
486
-
474
+
487
475
  Tags:
488
476
  Lists
489
477
  """
@@ -505,22 +493,21 @@ class UsersApi(APISegmentBase):
505
493
  response.raise_for_status()
506
494
  return response.json()
507
495
 
508
- def list_user_follow(self, id, list_id=None) -> dict[str, Any]:
496
+ def follow_list(self, id, list_id=None) -> dict[str, Any]:
509
497
  """
510
-
511
- Adds a Twitter user to a list of followed lists using the Twitter API and returns a status message.
512
-
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
+
513
500
  Args:
514
501
  id (string): id
515
502
  list_id (string): The unique identifier of this List. Example: '1146654567674912769'.
516
-
503
+
517
504
  Returns:
518
505
  dict[str, Any]: The request has succeeded.
519
-
506
+
520
507
  Raises:
521
508
  HTTPError: Raised when the API request fails (e.g., non-2XX status code).
522
509
  JSONDecodeError: Raised if the response body cannot be parsed as JSON.
523
-
510
+
524
511
  Tags:
525
512
  Lists
526
513
  """
@@ -542,22 +529,21 @@ class UsersApi(APISegmentBase):
542
529
  response.raise_for_status()
543
530
  return response.json()
544
531
 
545
- def list_user_unfollow(self, id, list_id) -> dict[str, Any]:
532
+ def unfollow_list(self, id, list_id) -> dict[str, Any]:
546
533
  """
547
-
548
- Deletes the specified list followed by the user identified by the given user ID and list ID.
549
-
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
+
550
536
  Args:
551
537
  id (string): id
552
538
  list_id (string): list_id
553
-
539
+
554
540
  Returns:
555
541
  dict[str, Any]: The request has succeeded.
556
-
542
+
557
543
  Raises:
558
544
  HTTPError: Raised when the API request fails (e.g., non-2XX status code).
559
545
  JSONDecodeError: Raised if the response body cannot be parsed as JSON.
560
-
546
+
561
547
  Tags:
562
548
  Lists
563
549
  """
@@ -571,7 +557,7 @@ class UsersApi(APISegmentBase):
571
557
  response.raise_for_status()
572
558
  return response.json()
573
559
 
574
- def users_id_followers(
560
+ def get_user_followers(
575
561
  self,
576
562
  id,
577
563
  max_results=None,
@@ -581,9 +567,8 @@ class UsersApi(APISegmentBase):
581
567
  tweet_fields=None,
582
568
  ) -> dict[str, Any]:
583
569
  """
584
-
585
- Retrieves a list of users who follow a specified user using the Twitter API, with optional parameters for result pagination and additional user or tweet fields.
586
-
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
+
587
572
  Args:
588
573
  id (string): id
589
574
  max_results (integer): The maximum number of follower results to return in the response.
@@ -591,14 +576,14 @@ class UsersApi(APISegmentBase):
591
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']".
592
577
  expansions (array): A comma separated list of fields to expand. Example: "['affiliation.user_id', 'most_recent_tweet_id', 'pinned_tweet_id']".
593
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']".
594
-
579
+
595
580
  Returns:
596
581
  dict[str, Any]: The request has succeeded.
597
-
582
+
598
583
  Raises:
599
584
  HTTPError: Raised when the API request fails (e.g., non-2XX status code).
600
585
  JSONDecodeError: Raised if the response body cannot be parsed as JSON.
601
-
586
+
602
587
  Tags:
603
588
  Users
604
589
  """
@@ -620,7 +605,7 @@ class UsersApi(APISegmentBase):
620
605
  response.raise_for_status()
621
606
  return response.json()
622
607
 
623
- def users_id_following(
608
+ def get_following_by_user_id(
624
609
  self,
625
610
  id,
626
611
  max_results=None,
@@ -630,9 +615,8 @@ class UsersApi(APISegmentBase):
630
615
  tweet_fields=None,
631
616
  ) -> dict[str, Any]:
632
617
  """
633
-
634
- Retrieves a list of users followed by the specified user ID, allowing optional parameters to customize the response with additional user fields, expansions, and tweet fields.
635
-
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
+
636
620
  Args:
637
621
  id (string): id
638
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.
@@ -640,14 +624,14 @@ class UsersApi(APISegmentBase):
640
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']".
641
625
  expansions (array): A comma separated list of fields to expand. Example: "['affiliation.user_id', 'most_recent_tweet_id', 'pinned_tweet_id']".
642
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']".
643
-
627
+
644
628
  Returns:
645
629
  dict[str, Any]: The request has succeeded.
646
-
630
+
647
631
  Raises:
648
632
  HTTPError: Raised when the API request fails (e.g., non-2XX status code).
649
633
  JSONDecodeError: Raised if the response body cannot be parsed as JSON.
650
-
634
+
651
635
  Tags:
652
636
  Users
653
637
  """
@@ -669,22 +653,21 @@ class UsersApi(APISegmentBase):
669
653
  response.raise_for_status()
670
654
  return response.json()
671
655
 
672
- def users_id_follow(self, id, target_user_id=None) -> dict[str, Any]:
656
+ def follow_user(self, id, target_user_id=None) -> dict[str, Any]:
673
657
  """
674
-
675
- Follows another user on behalf of the current user using the Twitter API, returning a status message indicating whether the action was successful.
676
-
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
+
677
660
  Args:
678
661
  id (string): id
679
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'.
680
-
663
+
681
664
  Returns:
682
665
  dict[str, Any]: The request has succeeded.
683
-
666
+
684
667
  Raises:
685
668
  HTTPError: Raised when the API request fails (e.g., non-2XX status code).
686
669
  JSONDecodeError: Raised if the response body cannot be parsed as JSON.
687
-
670
+
688
671
  Tags:
689
672
  Users
690
673
  """
@@ -706,7 +689,7 @@ class UsersApi(APISegmentBase):
706
689
  response.raise_for_status()
707
690
  return response.json()
708
691
 
709
- def users_id_liked_tweets(
692
+ def get_liked_tweets_by_user(
710
693
  self,
711
694
  id,
712
695
  max_results=None,
@@ -719,9 +702,8 @@ class UsersApi(APISegmentBase):
719
702
  place_fields=None,
720
703
  ) -> dict[str, Any]:
721
704
  """
722
-
723
- Retrieves a list of tweets liked by the specified user, supporting pagination and optional expansions and fields for tweets, users, media, polls, and places.
724
-
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
+
725
707
  Args:
726
708
  id (string): id
727
709
  max_results (integer): Optional integer parameter to limit the number of liked tweets returned in the response.
@@ -732,14 +714,14 @@ class UsersApi(APISegmentBase):
732
714
  poll_fields (array): A comma separated list of Poll fields to display. Example: "['duration_minutes', 'end_datetime', 'id', 'options', 'voting_status']".
733
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']".
734
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']".
735
-
717
+
736
718
  Returns:
737
719
  dict[str, Any]: The request has succeeded.
738
-
720
+
739
721
  Raises:
740
722
  HTTPError: Raised when the API request fails (e.g., non-2XX status code).
741
723
  JSONDecodeError: Raised if the response body cannot be parsed as JSON.
742
-
724
+
743
725
  Tags:
744
726
  Tweets
745
727
  """
@@ -764,22 +746,21 @@ class UsersApi(APISegmentBase):
764
746
  response.raise_for_status()
765
747
  return response.json()
766
748
 
767
- def users_id_like(self, id, tweet_id=None) -> dict[str, Any]:
749
+ def like_tweet(self, id, tweet_id=None) -> dict[str, Any]:
768
750
  """
769
-
770
- Creates a new like for a user's content using the provided user ID and returns a status message.
771
-
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
+
772
753
  Args:
773
754
  id (string): id
774
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'.
775
-
756
+
776
757
  Returns:
777
758
  dict[str, Any]: The request has succeeded.
778
-
759
+
779
760
  Raises:
780
761
  HTTPError: Raised when the API request fails (e.g., non-2XX status code).
781
762
  JSONDecodeError: Raised if the response body cannot be parsed as JSON.
782
-
763
+
783
764
  Tags:
784
765
  Tweets
785
766
  """
@@ -801,22 +782,21 @@ class UsersApi(APISegmentBase):
801
782
  response.raise_for_status()
802
783
  return response.json()
803
784
 
804
- def users_id_unlike(self, id, tweet_id) -> dict[str, Any]:
785
+ def unlike_tweet(self, id, tweet_id) -> dict[str, Any]:
805
786
  """
806
-
807
- Deletes a user's like on a specific tweet using the provided user ID and tweet ID, requiring OAuth2UserToken with "like.write," "tweet.read," and "users.read" permissions.
808
-
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
+
809
789
  Args:
810
790
  id (string): id
811
791
  tweet_id (string): tweet_id
812
-
792
+
813
793
  Returns:
814
794
  dict[str, Any]: The request has succeeded.
815
-
795
+
816
796
  Raises:
817
797
  HTTPError: Raised when the API request fails (e.g., non-2XX status code).
818
798
  JSONDecodeError: Raised if the response body cannot be parsed as JSON.
819
-
799
+
820
800
  Tags:
821
801
  Tweets
822
802
  """
@@ -840,9 +820,8 @@ class UsersApi(APISegmentBase):
840
820
  user_fields=None,
841
821
  ) -> dict[str, Any]:
842
822
  """
843
-
844
- Retrieves a list of memberships for a specified user using their ID, allowing for optional filtering by maximum results and pagination, and returns the membership details.
845
-
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
+
846
825
  Args:
847
826
  id (string): id
848
827
  max_results (integer): The maximum number of membership results to return, defaulting to 100 if not specified.
@@ -850,14 +829,14 @@ class UsersApi(APISegmentBase):
850
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']".
851
830
  expansions (array): A comma separated list of fields to expand. Example: "['owner_id']".
852
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']".
853
-
832
+
854
833
  Returns:
855
834
  dict[str, Any]: The request has succeeded.
856
-
835
+
857
836
  Raises:
858
837
  HTTPError: Raised when the API request fails (e.g., non-2XX status code).
859
838
  JSONDecodeError: Raised if the response body cannot be parsed as JSON.
860
-
839
+
861
840
  Tags:
862
841
  Lists
863
842
  """
@@ -879,7 +858,7 @@ class UsersApi(APISegmentBase):
879
858
  response.raise_for_status()
880
859
  return response.json()
881
860
 
882
- def users_id_mentions(
861
+ def get_user_mentions(
883
862
  self,
884
863
  id,
885
864
  since_id=None,
@@ -896,9 +875,8 @@ class UsersApi(APISegmentBase):
896
875
  place_fields=None,
897
876
  ) -> dict[str, Any]:
898
877
  """
899
-
900
- Retrieves the timeline of tweets that mention the user associated with the provided ID, allowing for customization with parameters such as since and until IDs, pagination tokens, and various field expansions.
901
-
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
+
902
880
  Args:
903
881
  id (string): id
904
882
  since_id (string): Optional parameter to return results with an ID greater than (i.e., more recent than) the specified ID. Example: '1346889436626259968'.
@@ -913,14 +891,14 @@ class UsersApi(APISegmentBase):
913
891
  poll_fields (array): A comma separated list of Poll fields to display. Example: "['duration_minutes', 'end_datetime', 'id', 'options', 'voting_status']".
914
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']".
915
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']".
916
-
894
+
917
895
  Returns:
918
896
  dict[str, Any]: The request has succeeded.
919
-
897
+
920
898
  Raises:
921
899
  HTTPError: Raised when the API request fails (e.g., non-2XX status code).
922
900
  JSONDecodeError: Raised if the response body cannot be parsed as JSON.
923
-
901
+
924
902
  Tags:
925
903
  Tweets
926
904
  """
@@ -949,7 +927,7 @@ class UsersApi(APISegmentBase):
949
927
  response.raise_for_status()
950
928
  return response.json()
951
929
 
952
- def users_id_muting(
930
+ def get_muted_users(
953
931
  self,
954
932
  id,
955
933
  max_results=None,
@@ -959,9 +937,8 @@ class UsersApi(APISegmentBase):
959
937
  tweet_fields=None,
960
938
  ) -> dict[str, Any]:
961
939
  """
962
-
963
- Retrieves a list of users muted by the specified user using the Twitter API with optional filtering by max results, pagination token, user fields, user expansions, tweet fields, and returns the response upon authorization with the required "mute.read," "tweet.read," and "users.read" scopes.
964
-
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
+
965
942
  Args:
966
943
  id (string): id
967
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.
@@ -969,14 +946,14 @@ class UsersApi(APISegmentBase):
969
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']".
970
947
  expansions (array): A comma separated list of fields to expand. Example: "['affiliation.user_id', 'most_recent_tweet_id', 'pinned_tweet_id']".
971
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']".
972
-
949
+
973
950
  Returns:
974
951
  dict[str, Any]: The request has succeeded.
975
-
952
+
976
953
  Raises:
977
954
  HTTPError: Raised when the API request fails (e.g., non-2XX status code).
978
955
  JSONDecodeError: Raised if the response body cannot be parsed as JSON.
979
-
956
+
980
957
  Tags:
981
958
  Users
982
959
  """
@@ -998,22 +975,21 @@ class UsersApi(APISegmentBase):
998
975
  response.raise_for_status()
999
976
  return response.json()
1000
977
 
1001
- def users_id_mute(self, id, target_user_id=None) -> dict[str, Any]:
978
+ def mute_user(self, id, target_user_id=None) -> dict[str, Any]:
1002
979
  """
1003
-
1004
- Mutes a user identified by their ID using the API, requiring a POST request with appropriate OAuth2 credentials.
1005
-
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
+
1006
982
  Args:
1007
983
  id (string): id
1008
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'.
1009
-
985
+
1010
986
  Returns:
1011
987
  dict[str, Any]: The request has succeeded.
1012
-
988
+
1013
989
  Raises:
1014
990
  HTTPError: Raised when the API request fails (e.g., non-2XX status code).
1015
991
  JSONDecodeError: Raised if the response body cannot be parsed as JSON.
1016
-
992
+
1017
993
  Tags:
1018
994
  Users
1019
995
  """
@@ -1035,7 +1011,7 @@ class UsersApi(APISegmentBase):
1035
1011
  response.raise_for_status()
1036
1012
  return response.json()
1037
1013
 
1038
- def list_user_owned_lists(
1014
+ def get_user_owned_lists(
1039
1015
  self,
1040
1016
  id,
1041
1017
  max_results=None,
@@ -1045,9 +1021,8 @@ class UsersApi(APISegmentBase):
1045
1021
  user_fields=None,
1046
1022
  ) -> dict[str, Any]:
1047
1023
  """
1048
-
1049
- Retrieves a list of Twitter Lists owned by the specified user, supporting optional pagination and field expansions.
1050
-
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
+
1051
1026
  Args:
1052
1027
  id (string): id
1053
1028
  max_results (integer): Maximum number of owned lists to return in the response; defaults to 100 if not specified.
@@ -1055,14 +1030,14 @@ class UsersApi(APISegmentBase):
1055
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']".
1056
1031
  expansions (array): A comma separated list of fields to expand. Example: "['owner_id']".
1057
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']".
1058
-
1033
+
1059
1034
  Returns:
1060
1035
  dict[str, Any]: The request has succeeded.
1061
-
1036
+
1062
1037
  Raises:
1063
1038
  HTTPError: Raised when the API request fails (e.g., non-2XX status code).
1064
1039
  JSONDecodeError: Raised if the response body cannot be parsed as JSON.
1065
-
1040
+
1066
1041
  Tags:
1067
1042
  Lists
1068
1043
  """
@@ -1084,26 +1059,25 @@ class UsersApi(APISegmentBase):
1084
1059
  response.raise_for_status()
1085
1060
  return response.json()
1086
1061
 
1087
- def list_user_pinned_lists(
1062
+ def get_user_pinned_lists(
1088
1063
  self, id, list_fields=None, expansions=None, user_fields=None
1089
1064
  ) -> dict[str, Any]:
1090
1065
  """
1091
-
1092
- Retrieves the pinned Lists of a specified user by their user ID, returning detailed information about each pinned List.
1093
-
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
+
1094
1068
  Args:
1095
1069
  id (string): id
1096
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']".
1097
1071
  expansions (array): A comma separated list of fields to expand. Example: "['owner_id']".
1098
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']".
1099
-
1073
+
1100
1074
  Returns:
1101
1075
  dict[str, Any]: The request has succeeded.
1102
-
1076
+
1103
1077
  Raises:
1104
1078
  HTTPError: Raised when the API request fails (e.g., non-2XX status code).
1105
1079
  JSONDecodeError: Raised if the response body cannot be parsed as JSON.
1106
-
1080
+
1107
1081
  Tags:
1108
1082
  Lists
1109
1083
  """
@@ -1123,22 +1097,21 @@ class UsersApi(APISegmentBase):
1123
1097
  response.raise_for_status()
1124
1098
  return response.json()
1125
1099
 
1126
- def list_user_pin(self, id, list_id) -> dict[str, Any]:
1100
+ def pin_list(self, id, list_id) -> dict[str, Any]:
1127
1101
  """
1128
-
1129
- Creates a pinned list for a user identified by {id} using JSON data and OAuth2UserToken or UserToken authentication.
1130
-
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
+
1131
1104
  Args:
1132
1105
  id (string): id
1133
1106
  list_id (string): The unique identifier of this List. Example: '1146654567674912769'.
1134
-
1107
+
1135
1108
  Returns:
1136
1109
  dict[str, Any]: The request has succeeded.
1137
-
1110
+
1138
1111
  Raises:
1139
1112
  HTTPError: Raised when the API request fails (e.g., non-2XX status code).
1140
1113
  JSONDecodeError: Raised if the response body cannot be parsed as JSON.
1141
-
1114
+
1142
1115
  Tags:
1143
1116
  Lists
1144
1117
  """
@@ -1160,22 +1133,21 @@ class UsersApi(APISegmentBase):
1160
1133
  response.raise_for_status()
1161
1134
  return response.json()
1162
1135
 
1163
- def list_user_unpin(self, id, list_id) -> dict[str, Any]:
1136
+ def unpin_list(self, id, list_id) -> dict[str, Any]:
1164
1137
  """
1165
-
1166
- Deletes a specified pinned list from a user's account by user ID and list ID.
1167
-
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
+
1168
1140
  Args:
1169
1141
  id (string): id
1170
1142
  list_id (string): list_id
1171
-
1143
+
1172
1144
  Returns:
1173
1145
  dict[str, Any]: The request has succeeded.
1174
-
1146
+
1175
1147
  Raises:
1176
1148
  HTTPError: Raised when the API request fails (e.g., non-2XX status code).
1177
1149
  JSONDecodeError: Raised if the response body cannot be parsed as JSON.
1178
-
1150
+
1179
1151
  Tags:
1180
1152
  Lists
1181
1153
  """
@@ -1189,22 +1161,21 @@ class UsersApi(APISegmentBase):
1189
1161
  response.raise_for_status()
1190
1162
  return response.json()
1191
1163
 
1192
- def users_id_retweets(self, id, tweet_id=None) -> dict[str, Any]:
1164
+ def create_retweet(self, id, tweet_id=None) -> dict[str, Any]:
1193
1165
  """
1194
-
1195
- Retweets a post using the X API on behalf of a specified user, requiring authentication with OAuth2UserToken and appropriate permissions.
1196
-
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
+
1197
1168
  Args:
1198
1169
  id (string): id
1199
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'.
1200
-
1171
+
1201
1172
  Returns:
1202
1173
  dict[str, Any]: The request has succeeded.
1203
-
1174
+
1204
1175
  Raises:
1205
1176
  HTTPError: Raised when the API request fails (e.g., non-2XX status code).
1206
1177
  JSONDecodeError: Raised if the response body cannot be parsed as JSON.
1207
-
1178
+
1208
1179
  Tags:
1209
1180
  Tweets
1210
1181
  """
@@ -1226,22 +1197,21 @@ class UsersApi(APISegmentBase):
1226
1197
  response.raise_for_status()
1227
1198
  return response.json()
1228
1199
 
1229
- def users_id_unretweets(self, id, source_tweet_id) -> dict[str, Any]:
1200
+ def delete_retweet(self, id, source_tweet_id) -> dict[str, Any]:
1230
1201
  """
1231
-
1232
- Undoes a retweet of a specified tweet by a user using the Twitter API v2, requiring OAuth authentication and user permissions.
1233
-
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
+
1234
1204
  Args:
1235
1205
  id (string): id
1236
1206
  source_tweet_id (string): source_tweet_id
1237
-
1207
+
1238
1208
  Returns:
1239
1209
  dict[str, Any]: The request has succeeded.
1240
-
1210
+
1241
1211
  Raises:
1242
1212
  HTTPError: Raised when the API request fails (e.g., non-2XX status code).
1243
1213
  JSONDecodeError: Raised if the response body cannot be parsed as JSON.
1244
-
1214
+
1245
1215
  Tags:
1246
1216
  Tweets
1247
1217
  """
@@ -1255,7 +1225,7 @@ class UsersApi(APISegmentBase):
1255
1225
  response.raise_for_status()
1256
1226
  return response.json()
1257
1227
 
1258
- def users_id_timeline(
1228
+ def get_user_tweet_timeline(
1259
1229
  self,
1260
1230
  id,
1261
1231
  since_id=None,
@@ -1273,9 +1243,8 @@ class UsersApi(APISegmentBase):
1273
1243
  place_fields=None,
1274
1244
  ) -> dict[str, Any]:
1275
1245
  """
1276
-
1277
- Retrieves a user's reverse chronological timeline, returning tweets in the order they were posted, with optional filtering by time range, tweet IDs, and additional metadata fields.
1278
-
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
+
1279
1248
  Args:
1280
1249
  id (string): id
1281
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'.
@@ -1291,14 +1260,14 @@ class UsersApi(APISegmentBase):
1291
1260
  poll_fields (array): A comma separated list of Poll fields to display. Example: "['duration_minutes', 'end_datetime', 'id', 'options', 'voting_status']".
1292
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']".
1293
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']".
1294
-
1263
+
1295
1264
  Returns:
1296
1265
  dict[str, Any]: The request has succeeded.
1297
-
1266
+
1298
1267
  Raises:
1299
1268
  HTTPError: Raised when the API request fails (e.g., non-2XX status code).
1300
1269
  JSONDecodeError: Raised if the response body cannot be parsed as JSON.
1301
-
1270
+
1302
1271
  Tags:
1303
1272
  Tweets
1304
1273
  """
@@ -1328,7 +1297,7 @@ class UsersApi(APISegmentBase):
1328
1297
  response.raise_for_status()
1329
1298
  return response.json()
1330
1299
 
1331
- def users_id_tweets(
1300
+ def get_tweets_by_user_id(
1332
1301
  self,
1333
1302
  id,
1334
1303
  since_id=None,
@@ -1346,9 +1315,8 @@ class UsersApi(APISegmentBase):
1346
1315
  place_fields=None,
1347
1316
  ) -> dict[str, Any]:
1348
1317
  """
1349
-
1350
- Retrieves a list of tweets for a user with the specified ID, allowing optional filtering by tweet ID range, result count, pagination token, excluded fields, and time range, using the "GET" method.
1351
-
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
+
1352
1320
  Args:
1353
1321
  id (string): id
1354
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'.
@@ -1364,14 +1332,14 @@ class UsersApi(APISegmentBase):
1364
1332
  poll_fields (array): A comma separated list of Poll fields to display. Example: "['duration_minutes', 'end_datetime', 'id', 'options', 'voting_status']".
1365
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']".
1366
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']".
1367
-
1335
+
1368
1336
  Returns:
1369
1337
  dict[str, Any]: The request has succeeded.
1370
-
1338
+
1371
1339
  Raises:
1372
1340
  HTTPError: Raised when the API request fails (e.g., non-2XX status code).
1373
1341
  JSONDecodeError: Raised if the response body cannot be parsed as JSON.
1374
-
1342
+
1375
1343
  Tags:
1376
1344
  Tweets
1377
1345
  """
@@ -1401,22 +1369,21 @@ class UsersApi(APISegmentBase):
1401
1369
  response.raise_for_status()
1402
1370
  return response.json()
1403
1371
 
1404
- def users_id_unfollow(self, source_user_id, target_user_id) -> dict[str, Any]:
1372
+ def unfollow_user(self, source_user_id, target_user_id) -> dict[str, Any]:
1405
1373
  """
1406
-
1407
- Unfollows a target user by deleting the follow relationship between the source user and the target user using the "DELETE" method.
1408
-
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
+
1409
1376
  Args:
1410
1377
  source_user_id (string): source_user_id
1411
1378
  target_user_id (string): target_user_id
1412
-
1379
+
1413
1380
  Returns:
1414
1381
  dict[str, Any]: The request has succeeded.
1415
-
1382
+
1416
1383
  Raises:
1417
1384
  HTTPError: Raised when the API request fails (e.g., non-2XX status code).
1418
1385
  JSONDecodeError: Raised if the response body cannot be parsed as JSON.
1419
-
1386
+
1420
1387
  Tags:
1421
1388
  Users
1422
1389
  """
@@ -1430,22 +1397,21 @@ class UsersApi(APISegmentBase):
1430
1397
  response.raise_for_status()
1431
1398
  return response.json()
1432
1399
 
1433
- def users_id_unmute(self, source_user_id, target_user_id) -> dict[str, Any]:
1400
+ def unmute_user(self, source_user_id, target_user_id) -> dict[str, Any]:
1434
1401
  """
1435
-
1436
- Unmutes a target user using the "DELETE" method on the "/2/users/{source_user_id}/muting/{target_user_id}" path, reversing the mute action applied by the source user to the target user.
1437
-
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
+
1438
1404
  Args:
1439
1405
  source_user_id (string): source_user_id
1440
1406
  target_user_id (string): target_user_id
1441
-
1407
+
1442
1408
  Returns:
1443
1409
  dict[str, Any]: The request has succeeded.
1444
-
1410
+
1445
1411
  Raises:
1446
1412
  HTTPError: Raised when the API request fails (e.g., non-2XX status code).
1447
1413
  JSONDecodeError: Raised if the response body cannot be parsed as JSON.
1448
-
1414
+
1449
1415
  Tags:
1450
1416
  Users
1451
1417
  """
@@ -1461,38 +1427,38 @@ class UsersApi(APISegmentBase):
1461
1427
 
1462
1428
  def list_tools(self):
1463
1429
  return [
1464
- self.find_users_by_id,
1465
- self.find_users_by_username,
1430
+ self.get_users_by_ids,
1431
+ self.get_users_by_usernames,
1466
1432
  self.find_user_by_username,
1467
1433
  self.get_users_compliance_stream,
1468
- self.find_my_user,
1469
- self.search_user_by_query,
1434
+ self.get_authenticated_user,
1435
+ self.search_users_by_query,
1470
1436
  self.find_user_by_id,
1471
- self.users_id_blocking,
1472
- self.get_users_id_bookmarks,
1473
- self.post_users_id_bookmarks,
1474
- self.users_id_bookmarks_delete,
1475
- self.user_followed_lists,
1476
- self.list_user_follow,
1477
- self.list_user_unfollow,
1478
- self.users_id_followers,
1479
- self.users_id_following,
1480
- self.users_id_follow,
1481
- self.users_id_liked_tweets,
1482
- self.users_id_like,
1483
- self.users_id_unlike,
1437
+ self.list_blocked_users,
1438
+ self.list_user_bookmarks,
1439
+ self.bookmark_tweet,
1440
+ self.remove_bookmark,
1441
+ self.get_user_followed_lists,
1442
+ self.follow_list,
1443
+ self.unfollow_list,
1444
+ self.get_user_followers,
1445
+ self.get_following_by_user_id,
1446
+ self.follow_user,
1447
+ self.get_liked_tweets_by_user,
1448
+ self.like_tweet,
1449
+ self.unlike_tweet,
1484
1450
  self.get_user_list_memberships,
1485
- self.users_id_mentions,
1486
- self.users_id_muting,
1487
- self.users_id_mute,
1488
- self.list_user_owned_lists,
1489
- self.list_user_pinned_lists,
1490
- self.list_user_pin,
1491
- self.list_user_unpin,
1492
- self.users_id_retweets,
1493
- self.users_id_unretweets,
1494
- self.users_id_timeline,
1495
- self.users_id_tweets,
1496
- self.users_id_unfollow,
1497
- self.users_id_unmute,
1451
+ self.get_user_mentions,
1452
+ self.get_muted_users,
1453
+ self.mute_user,
1454
+ self.get_user_owned_lists,
1455
+ self.get_user_pinned_lists,
1456
+ self.pin_list,
1457
+ self.unpin_list,
1458
+ self.create_retweet,
1459
+ self.delete_retweet,
1460
+ self.get_user_tweet_timeline,
1461
+ self.get_tweets_by_user_id,
1462
+ self.unfollow_user,
1463
+ self.unmute_user,
1498
1464
  ]