universal-mcp-applications 0.1.13__py3-none-any.whl → 0.1.15__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 +71 -71
  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.15.dist-info}/METADATA +2 -2
  52. {universal_mcp_applications-0.1.13.dist-info → universal_mcp_applications-0.1.15.dist-info}/RECORD +54 -54
  53. {universal_mcp_applications-0.1.13.dist-info → universal_mcp_applications-0.1.15.dist-info}/WHEEL +0 -0
  54. {universal_mcp_applications-0.1.13.dist-info → universal_mcp_applications-0.1.15.dist-info}/licenses/LICENSE +0 -0
@@ -7,25 +7,24 @@ class ListsApi(APISegmentBase):
7
7
  def __init__(self, main_app_client: Any):
8
8
  super().__init__(main_app_client)
9
9
 
10
- def list_id_create(
10
+ def create_list(
11
11
  self, description=None, name=None, private=None
12
12
  ) -> dict[str, Any]:
13
13
  """
14
-
15
- Creates a new Twitter list using the X API v2 and returns the newly created list's details.
16
-
14
+ Creates a new list on X (formerly Twitter) with an optional name, description, and privacy setting. It sends a POST request to the `/2/lists` endpoint and returns the JSON data of the newly created list upon success.
15
+
17
16
  Args:
18
17
  description (string): description
19
18
  name (string): name
20
19
  private (boolean): private
21
-
20
+
22
21
  Returns:
23
22
  dict[str, Any]: The request has succeeded.
24
-
23
+
25
24
  Raises:
26
25
  HTTPError: Raised when the API request fails (e.g., non-2XX status code).
27
26
  JSONDecodeError: Raised if the response body cannot be parsed as JSON.
28
-
27
+
29
28
  Tags:
30
29
  Lists, important
31
30
  """
@@ -49,21 +48,20 @@ class ListsApi(APISegmentBase):
49
48
  response.raise_for_status()
50
49
  return response.json()
51
50
 
52
- def list_id_delete(self, id) -> dict[str, Any]:
51
+ def delete_list(self, id) -> dict[str, Any]:
53
52
  """
54
-
55
- Deletes a list specified by its ID using the DELETE method.
56
-
53
+ Permanently deletes a specific Twitter List identified by its unique ID. This function sends an authorized DELETE request to the API's `/2/lists/{id}` endpoint, returning a confirmation response upon successful removal. It is distinct from `list_remove_member`, which only removes a user from a list.
54
+
57
55
  Args:
58
56
  id (string): id
59
-
57
+
60
58
  Returns:
61
59
  dict[str, Any]: The request has succeeded.
62
-
60
+
63
61
  Raises:
64
62
  HTTPError: Raised when the API request fails (e.g., non-2XX status code).
65
63
  JSONDecodeError: Raised if the response body cannot be parsed as JSON.
66
-
64
+
67
65
  Tags:
68
66
  Lists
69
67
  """
@@ -75,26 +73,25 @@ class ListsApi(APISegmentBase):
75
73
  response.raise_for_status()
76
74
  return response.json()
77
75
 
78
- def list_id_get(
76
+ def get_list_by_id(
79
77
  self, id, list_fields=None, expansions=None, user_fields=None
80
78
  ) -> dict[str, Any]:
81
79
  """
82
-
83
- Retrieves detailed information about a specific Twitter List by its unique identifier, including optional expansions and fields for lists and users.
84
-
80
+ Retrieves detailed information for a specific list by its ID. This function allows for response customization by specifying which list and user fields to return and supports expansions to include related objects like the owner's user data.
81
+
85
82
  Args:
86
83
  id (string): id
87
84
  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']".
88
85
  expansions (array): A comma separated list of fields to expand. Example: "['owner_id']".
89
86
  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']".
90
-
87
+
91
88
  Returns:
92
89
  dict[str, Any]: The request has succeeded.
93
-
90
+
94
91
  Raises:
95
92
  HTTPError: Raised when the API request fails (e.g., non-2XX status code).
96
93
  JSONDecodeError: Raised if the response body cannot be parsed as JSON.
97
-
94
+
98
95
  Tags:
99
96
  Lists
100
97
  """
@@ -114,26 +111,25 @@ class ListsApi(APISegmentBase):
114
111
  response.raise_for_status()
115
112
  return response.json()
116
113
 
117
- def list_id_update(
114
+ def update_list(
118
115
  self, id, description=None, name=None, private=None
119
116
  ) -> dict[str, Any]:
120
117
  """
121
-
122
- Updates a list specified by the ID using the provided JSON payload, authenticating with OAuth2 or user tokens.
123
-
118
+ Modifies an existing Twitter list identified by its unique ID. This function updates the list's name, description, or privacy status by sending a PUT request to the API and returns the updated list data upon success.
119
+
124
120
  Args:
125
121
  id (string): id
126
122
  description (string): description
127
123
  name (string): name
128
124
  private (boolean): private
129
-
125
+
130
126
  Returns:
131
127
  dict[str, Any]: The request has succeeded.
132
-
128
+
133
129
  Raises:
134
130
  HTTPError: Raised when the API request fails (e.g., non-2XX status code).
135
131
  JSONDecodeError: Raised if the response body cannot be parsed as JSON.
136
-
132
+
137
133
  Tags:
138
134
  Lists
139
135
  """
@@ -159,7 +155,7 @@ class ListsApi(APISegmentBase):
159
155
  response.raise_for_status()
160
156
  return response.json()
161
157
 
162
- def list_get_followers(
158
+ def get_list_followers(
163
159
  self,
164
160
  id,
165
161
  max_results=None,
@@ -169,9 +165,8 @@ class ListsApi(APISegmentBase):
169
165
  tweet_fields=None,
170
166
  ) -> dict[str, Any]:
171
167
  """
172
-
173
- Retrieves a list of users who follow a specified Twitter list using the list ID, with optional parameters for pagination and user data customization.
174
-
168
+ Retrieves the users who follow a specific list, identified by its ID. Supports pagination and allows for the customization of returned user, tweet, and expansion fields to tailor the response data, differentiating it from fetching list members.
169
+
175
170
  Args:
176
171
  id (string): id
177
172
  max_results (integer): Specifies the maximum number of follower results to return, with a default value of 100.
@@ -179,14 +174,14 @@ class ListsApi(APISegmentBase):
179
174
  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']".
180
175
  expansions (array): A comma separated list of fields to expand. Example: "['affiliation.user_id', 'most_recent_tweet_id', 'pinned_tweet_id']".
181
176
  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']".
182
-
177
+
183
178
  Returns:
184
179
  dict[str, Any]: The request has succeeded.
185
-
180
+
186
181
  Raises:
187
182
  HTTPError: Raised when the API request fails (e.g., non-2XX status code).
188
183
  JSONDecodeError: Raised if the response body cannot be parsed as JSON.
189
-
184
+
190
185
  Tags:
191
186
  Users
192
187
  """
@@ -218,9 +213,8 @@ class ListsApi(APISegmentBase):
218
213
  tweet_fields=None,
219
214
  ) -> dict[str, Any]:
220
215
  """
221
-
222
- Retrieves a list of User objects that are members of a specified Twitter List by the provided List ID.
223
-
216
+ Retrieves users who are members of a specific Twitter list, identified by its ID. Unlike `list_get_followers`, this returns users explicitly added to the list, not subscribers. Supports pagination and customization of the returned user data fields to include expanded objects and specific details.
217
+
224
218
  Args:
225
219
  id (string): id
226
220
  max_results (integer): The maximum number of list members to return per page, defaulting to 100.
@@ -228,14 +222,14 @@ class ListsApi(APISegmentBase):
228
222
  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']".
229
223
  expansions (array): A comma separated list of fields to expand. Example: "['affiliation.user_id', 'most_recent_tweet_id', 'pinned_tweet_id']".
230
224
  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']".
231
-
225
+
232
226
  Returns:
233
227
  dict[str, Any]: The request has succeeded.
234
-
228
+
235
229
  Raises:
236
230
  HTTPError: Raised when the API request fails (e.g., non-2XX status code).
237
231
  JSONDecodeError: Raised if the response body cannot be parsed as JSON.
238
-
232
+
239
233
  Tags:
240
234
  Users
241
235
  """
@@ -259,20 +253,19 @@ class ListsApi(APISegmentBase):
259
253
 
260
254
  def list_add_member(self, id, user_id=None) -> dict[str, Any]:
261
255
  """
262
-
263
- Adds one or more members to a specified list by list ID using the POST method.
264
-
256
+ Adds a user to a specified Twitter list via a POST request to the `/2/lists/{id}/members` endpoint, requiring list and user IDs. This function modifies a list's membership, distinguishing it from `list_get_members` (retrieves) and its counterpart `list_remove_member` (deletes).
257
+
265
258
  Args:
266
259
  id (string): id
267
260
  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'.
268
-
261
+
269
262
  Returns:
270
263
  dict[str, Any]: The request has succeeded.
271
-
264
+
272
265
  Raises:
273
266
  HTTPError: Raised when the API request fails (e.g., non-2XX status code).
274
267
  JSONDecodeError: Raised if the response body cannot be parsed as JSON.
275
-
268
+
276
269
  Tags:
277
270
  Lists
278
271
  """
@@ -294,22 +287,21 @@ class ListsApi(APISegmentBase):
294
287
  response.raise_for_status()
295
288
  return response.json()
296
289
 
297
- def list_remove_member(self, id, user_id) -> dict[str, Any]:
290
+ def delete_list_member(self, id, user_id) -> dict[str, Any]:
298
291
  """
299
-
300
- Removes a member from a list using the provided list ID and user ID, requiring appropriate permissions for the operation.
301
-
292
+ Removes a specific user from a Twitter list. This function sends a DELETE request to the `/2/lists/{id}/members/{user_id}` API endpoint, requiring both the list ID and the user ID to perform the action and confirm the member's removal.
293
+
302
294
  Args:
303
295
  id (string): id
304
296
  user_id (string): user_id
305
-
297
+
306
298
  Returns:
307
299
  dict[str, Any]: The request has succeeded.
308
-
300
+
309
301
  Raises:
310
302
  HTTPError: Raised when the API request fails (e.g., non-2XX status code).
311
303
  JSONDecodeError: Raised if the response body cannot be parsed as JSON.
312
-
304
+
313
305
  Tags:
314
306
  Lists
315
307
  """
@@ -323,7 +315,7 @@ class ListsApi(APISegmentBase):
323
315
  response.raise_for_status()
324
316
  return response.json()
325
317
 
326
- def lists_id_tweets(
318
+ def get_list_tweets(
327
319
  self,
328
320
  id,
329
321
  max_results=None,
@@ -336,9 +328,8 @@ class ListsApi(APISegmentBase):
336
328
  place_fields=None,
337
329
  ) -> dict[str, Any]:
338
330
  """
339
-
340
- Retrieves a list of tweets for a specified list by ID using the "GET" method, allowing optional parameters for pagination and field customization.
341
-
331
+ Retrieves tweets from a specified Twitter List using its ID. Supports pagination and allows extensive customization of returned fields for tweets, users, media, and other entities. This function uniquely fetches the list's tweet timeline, distinguishing it from functions that retrieve list members or followers.
332
+
342
333
  Args:
343
334
  id (string): id
344
335
  max_results (integer): The maximum number of tweets to return per request, with a default value of 100.
@@ -349,14 +340,14 @@ class ListsApi(APISegmentBase):
349
340
  poll_fields (array): A comma separated list of Poll fields to display. Example: "['duration_minutes', 'end_datetime', 'id', 'options', 'voting_status']".
350
341
  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
342
  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
-
343
+
353
344
  Returns:
354
345
  dict[str, Any]: The request has succeeded.
355
-
346
+
356
347
  Raises:
357
348
  HTTPError: Raised when the API request fails (e.g., non-2XX status code).
358
349
  JSONDecodeError: Raised if the response body cannot be parsed as JSON.
359
-
350
+
360
351
  Tags:
361
352
  Tweets
362
353
  """
@@ -383,13 +374,13 @@ class ListsApi(APISegmentBase):
383
374
 
384
375
  def list_tools(self):
385
376
  return [
386
- self.list_id_create,
387
- self.list_id_delete,
388
- self.list_id_get,
389
- self.list_id_update,
390
- self.list_get_followers,
377
+ self.create_list,
378
+ self.delete_list,
379
+ self.get_list_by_id,
380
+ self.update_list,
381
+ self.get_list_followers,
391
382
  self.list_get_members,
392
383
  self.list_add_member,
393
- self.list_remove_member,
394
- self.lists_id_tweets,
384
+ self.delete_list_member,
385
+ self.get_list_tweets,
395
386
  ]
@@ -16,23 +16,22 @@ class SpacesApi(APISegmentBase):
16
16
  topic_fields=None,
17
17
  ) -> dict[str, Any]:
18
18
  """
19
-
20
- Retrieves detailed information about specified spaces using the "GET" method, allowing customization through parameters such as space IDs, space fields, space expansions, user fields, and topic fields, while requiring authentication via Bearer or OAuth2 tokens for authorized access.
21
-
19
+ Retrieves detailed information for a batch of spaces, specified by a list of their unique IDs. Optional parameters allow for customizing the response by including specific fields and expansions. This method is distinct from `find_space_by_id`, which fetches only a single space per call.
20
+
22
21
  Args:
23
22
  ids (array): Required array of IDs for the requested spaces.
24
23
  space_fields (array): A comma separated list of Space fields to display. Example: "['created_at', 'creator_id', 'ended_at', 'host_ids', 'id', 'invited_user_ids', 'is_ticketed', 'lang', 'participant_count', 'scheduled_start', 'speaker_ids', 'started_at', 'state', 'subscriber_count', 'title', 'topic_ids', 'updated_at']".
25
24
  expansions (array): A comma separated list of fields to expand. Example: "['creator_id', 'host_ids', 'invited_user_ids', 'speaker_ids', 'topic_ids']".
26
25
  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']".
27
26
  topic_fields (array): A comma separated list of Topic fields to display. Example: "['description', 'id', 'name']".
28
-
27
+
29
28
  Returns:
30
29
  dict[str, Any]: The request has succeeded.
31
-
30
+
32
31
  Raises:
33
32
  HTTPError: Raised when the API request fails (e.g., non-2XX status code).
34
33
  JSONDecodeError: Raised if the response body cannot be parsed as JSON.
35
-
34
+
36
35
  Tags:
37
36
  Spaces
38
37
  """
@@ -61,23 +60,22 @@ class SpacesApi(APISegmentBase):
61
60
  topic_fields=None,
62
61
  ) -> dict[str, Any]:
63
62
  """
64
-
65
- Retrieves a list of spaces by their creator IDs using the specified user IDs, with optional filtering by space fields, space expansions, user fields, and topic fields.
66
-
63
+ Fetches a list of spaces created by specified users, identified by their user IDs. This function is distinct from `find_spaces_by_ids`, which retrieves spaces by their own unique IDs. Optional parameters allow for customizing the fields returned for spaces, users, and topics.
64
+
67
65
  Args:
68
66
  user_ids (array): **user_ids**: Required array of user IDs for filtering spaces by their creators.
69
67
  space_fields (array): A comma separated list of Space fields to display. Example: "['created_at', 'creator_id', 'ended_at', 'host_ids', 'id', 'invited_user_ids', 'is_ticketed', 'lang', 'participant_count', 'scheduled_start', 'speaker_ids', 'started_at', 'state', 'subscriber_count', 'title', 'topic_ids', 'updated_at']".
70
68
  expansions (array): A comma separated list of fields to expand. Example: "['creator_id', 'host_ids', 'invited_user_ids', 'speaker_ids', 'topic_ids']".
71
69
  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']".
72
70
  topic_fields (array): A comma separated list of Topic fields to display. Example: "['description', 'id', 'name']".
73
-
71
+
74
72
  Returns:
75
73
  dict[str, Any]: The request has succeeded.
76
-
74
+
77
75
  Raises:
78
76
  HTTPError: Raised when the API request fails (e.g., non-2XX status code).
79
77
  JSONDecodeError: Raised if the response body cannot be parsed as JSON.
80
-
78
+
81
79
  Tags:
82
80
  Spaces
83
81
  """
@@ -108,9 +106,8 @@ class SpacesApi(APISegmentBase):
108
106
  topic_fields=None,
109
107
  ) -> dict[str, Any]:
110
108
  """
111
-
112
- Searches for spaces using the specified query and optional filters like state, and returns the results with customizable fields and expansions.
113
-
109
+ Performs a keyword-based search for Twitter Spaces, allowing filters by state (e.g., 'live', 'scheduled'). The function supports customizing the response data by specifying fields for spaces, users, and topics, distinguishing it from methods that find spaces by specific IDs.
110
+
114
111
  Args:
115
112
  query (string): The "query" parameter is a required string input for the GET operation at path "/2/spaces/search", used to specify search terms for finding spaces. Example: 'crypto'.
116
113
  state (string): Optional query parameter to filter search results by space state, which can be "live," "scheduled," or "all" (default).
@@ -119,14 +116,14 @@ class SpacesApi(APISegmentBase):
119
116
  expansions (array): A comma separated list of fields to expand. Example: "['creator_id', 'host_ids', 'invited_user_ids', 'speaker_ids', 'topic_ids']".
120
117
  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']".
121
118
  topic_fields (array): A comma separated list of Topic fields to display. Example: "['description', 'id', 'name']".
122
-
119
+
123
120
  Returns:
124
121
  dict[str, Any]: The request has succeeded.
125
-
122
+
126
123
  Raises:
127
124
  HTTPError: Raised when the API request fails (e.g., non-2XX status code).
128
125
  JSONDecodeError: Raised if the response body cannot be parsed as JSON.
129
-
126
+
130
127
  Tags:
131
128
  Spaces
132
129
  """
@@ -148,7 +145,7 @@ class SpacesApi(APISegmentBase):
148
145
  response.raise_for_status()
149
146
  return response.json()
150
147
 
151
- def find_space_by_id(
148
+ def get_space_by_id(
152
149
  self,
153
150
  id,
154
151
  space_fields=None,
@@ -157,23 +154,22 @@ class SpacesApi(APISegmentBase):
157
154
  topic_fields=None,
158
155
  ) -> dict[str, Any]:
159
156
  """
160
-
161
- Retrieves details about a specific space by its ID, allowing optional customization through space fields, space expansions, user fields, and topic fields, using a Bearer or OAuth2 token for authentication.
162
-
157
+ Retrieves detailed information for a single space using its unique ID. Optional parameters allow customizing the response by specifying fields and expansions. Unlike `find_spaces_by_ids`, which fetches multiple spaces, this function targets only one specific space.
158
+
163
159
  Args:
164
160
  id (string): id
165
161
  space_fields (array): A comma separated list of Space fields to display. Example: "['created_at', 'creator_id', 'ended_at', 'host_ids', 'id', 'invited_user_ids', 'is_ticketed', 'lang', 'participant_count', 'scheduled_start', 'speaker_ids', 'started_at', 'state', 'subscriber_count', 'title', 'topic_ids', 'updated_at']".
166
162
  expansions (array): A comma separated list of fields to expand. Example: "['creator_id', 'host_ids', 'invited_user_ids', 'speaker_ids', 'topic_ids']".
167
163
  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']".
168
164
  topic_fields (array): A comma separated list of Topic fields to display. Example: "['description', 'id', 'name']".
169
-
165
+
170
166
  Returns:
171
167
  dict[str, Any]: The request has succeeded.
172
-
168
+
173
169
  Raises:
174
170
  HTTPError: Raised when the API request fails (e.g., non-2XX status code).
175
171
  JSONDecodeError: Raised if the response body cannot be parsed as JSON.
176
-
172
+
177
173
  Tags:
178
174
  Spaces
179
175
  """
@@ -194,7 +190,7 @@ class SpacesApi(APISegmentBase):
194
190
  response.raise_for_status()
195
191
  return response.json()
196
192
 
197
- def space_buyers(
193
+ def list_space_buyers(
198
194
  self,
199
195
  id,
200
196
  pagination_token=None,
@@ -204,9 +200,8 @@ class SpacesApi(APISegmentBase):
204
200
  tweet_fields=None,
205
201
  ) -> dict[str, Any]:
206
202
  """
207
-
208
- Retrieves a list of buyers for a specific space using the "GET" method, allowing optional pagination and customization of returned user and tweet fields.
209
-
203
+ Retrieves a list of users who have purchased tickets for a specific ticketed Space, identified by its ID. This function supports pagination and allows for the customization of user and tweet fields in the API response.
204
+
210
205
  Args:
211
206
  id (string): id
212
207
  pagination_token (string): Optional token used for pagination to retrieve the next set of results in a sequence.
@@ -214,14 +209,14 @@ class SpacesApi(APISegmentBase):
214
209
  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']".
215
210
  expansions (array): A comma separated list of fields to expand. Example: "['affiliation.user_id', 'most_recent_tweet_id', 'pinned_tweet_id']".
216
211
  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']".
217
-
212
+
218
213
  Returns:
219
214
  dict[str, Any]: The request has succeeded.
220
-
215
+
221
216
  Raises:
222
217
  HTTPError: Raised when the API request fails (e.g., non-2XX status code).
223
218
  JSONDecodeError: Raised if the response body cannot be parsed as JSON.
224
-
219
+
225
220
  Tags:
226
221
  Spaces, Tweets
227
222
  """
@@ -243,7 +238,7 @@ class SpacesApi(APISegmentBase):
243
238
  response.raise_for_status()
244
239
  return response.json()
245
240
 
246
- def space_tweets(
241
+ def list_tweets_from_space(
247
242
  self,
248
243
  id,
249
244
  max_results=None,
@@ -255,9 +250,8 @@ class SpacesApi(APISegmentBase):
255
250
  place_fields=None,
256
251
  ) -> dict[str, Any]:
257
252
  """
258
-
259
- Retrieves a list of tweets from a specified Twitter Space by its ID, with optional parameters to customize the fields and expansions included in the response.
260
-
253
+ Fetches tweets from a specific Space using its ID. Allows extensive customization of returned data fields (e.g., media, user) and limits results. Unlike `space_buyers`, which retrieves users who purchased tickets, this function returns the actual tweets shared within the Space.
254
+
261
255
  Args:
262
256
  id (string): id
263
257
  max_results (integer): The `max_results` parameter limits the number of tweets returned in the response for the GET operation at "/2/spaces/{id}/tweets", with a default of 100. Example: '25'.
@@ -267,14 +261,14 @@ class SpacesApi(APISegmentBase):
267
261
  poll_fields (array): A comma separated list of Poll fields to display. Example: "['duration_minutes', 'end_datetime', 'id', 'options', 'voting_status']".
268
262
  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']".
269
263
  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']".
270
-
264
+
271
265
  Returns:
272
266
  dict[str, Any]: The request has succeeded.
273
-
267
+
274
268
  Raises:
275
269
  HTTPError: Raised when the API request fails (e.g., non-2XX status code).
276
270
  JSONDecodeError: Raised if the response body cannot be parsed as JSON.
277
-
271
+
278
272
  Tags:
279
273
  Spaces, Tweets
280
274
  """
@@ -303,7 +297,7 @@ class SpacesApi(APISegmentBase):
303
297
  self.find_spaces_by_ids,
304
298
  self.find_spaces_by_creator_ids,
305
299
  self.search_spaces,
306
- self.find_space_by_id,
307
- self.space_buyers,
308
- self.space_tweets,
300
+ self.get_space_by_id,
301
+ self.list_space_buyers,
302
+ self.list_tweets_from_space,
309
303
  ]
@@ -7,22 +7,21 @@ class TrendsApi(APISegmentBase):
7
7
  def __init__(self, main_app_client: Any):
8
8
  super().__init__(main_app_client)
9
9
 
10
- def get_trends(self, woeid, trend_fields=None) -> dict[str, Any]:
10
+ def get_trends_by_woeid(self, woeid, trend_fields=None) -> dict[str, Any]:
11
11
  """
12
-
13
- Retrieves trending information by WOEID (Where On Earth ID) using the specified trend fields and returns a response with a valid Bearer token.
14
-
12
+ Fetches trending topics for a specific location identified by its Where On Earth ID (WOEID). It builds and executes an authenticated API request, optionally allowing users to specify which trend-related fields (e.g., 'tweet_count') to include in the returned JSON response.
13
+
15
14
  Args:
16
15
  woeid (string): woeid
17
16
  trend_fields (array): A comma separated list of Trend fields to display. Example: "['trend_name', 'tweet_count']".
18
-
17
+
19
18
  Returns:
20
19
  dict[str, Any]: The request has succeeded.
21
-
20
+
22
21
  Raises:
23
22
  HTTPError: Raised when the API request fails (e.g., non-2XX status code).
24
23
  JSONDecodeError: Raised if the response body cannot be parsed as JSON.
25
-
24
+
26
25
  Tags:
27
26
  Trends
28
27
  """
@@ -37,4 +36,4 @@ class TrendsApi(APISegmentBase):
37
36
  return response.json()
38
37
 
39
38
  def list_tools(self):
40
- return [self.get_trends]
39
+ return [self.get_trends_by_woeid]