universal-mcp-applications 0.1.20__py3-none-any.whl → 0.1.22__py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Potentially problematic release.
This version of universal-mcp-applications might be problematic. Click here for more details.
- universal_mcp/applications/BEST_PRACTICES.md +166 -0
- universal_mcp/applications/airtable/app.py +0 -1
- universal_mcp/applications/apollo/app.py +0 -1
- universal_mcp/applications/aws_s3/app.py +40 -39
- universal_mcp/applications/browser_use/README.md +1 -0
- universal_mcp/applications/browser_use/__init__.py +0 -0
- universal_mcp/applications/browser_use/app.py +76 -0
- universal_mcp/applications/calendly/app.py +125 -125
- universal_mcp/applications/canva/app.py +95 -99
- universal_mcp/applications/confluence/app.py +0 -1
- universal_mcp/applications/contentful/app.py +4 -5
- universal_mcp/applications/domain_checker/app.py +11 -15
- universal_mcp/applications/e2b/app.py +4 -4
- universal_mcp/applications/elevenlabs/app.py +18 -15
- universal_mcp/applications/exa/app.py +17 -17
- universal_mcp/applications/falai/app.py +28 -29
- universal_mcp/applications/file_system/app.py +9 -9
- universal_mcp/applications/firecrawl/app.py +36 -36
- universal_mcp/applications/fireflies/app.py +55 -56
- universal_mcp/applications/fpl/app.py +49 -50
- universal_mcp/applications/ghost_content/app.py +0 -1
- universal_mcp/applications/github/app.py +41 -43
- universal_mcp/applications/google_calendar/app.py +40 -39
- universal_mcp/applications/google_docs/app.py +56 -56
- universal_mcp/applications/google_drive/app.py +212 -215
- universal_mcp/applications/google_gemini/app.py +1 -5
- universal_mcp/applications/google_mail/app.py +91 -90
- universal_mcp/applications/google_searchconsole/app.py +29 -29
- universal_mcp/applications/google_sheet/app.py +115 -115
- universal_mcp/applications/hashnode/README.md +6 -3
- universal_mcp/applications/hashnode/app.py +174 -25
- universal_mcp/applications/http_tools/app.py +10 -11
- universal_mcp/applications/hubspot/__init__.py +1 -1
- universal_mcp/applications/hubspot/api_segments/api_segment_base.py +36 -7
- universal_mcp/applications/hubspot/api_segments/crm_api.py +368 -368
- universal_mcp/applications/hubspot/api_segments/marketing_api.py +115 -115
- universal_mcp/applications/hubspot/app.py +131 -72
- universal_mcp/applications/jira/app.py +0 -1
- universal_mcp/applications/linkedin/app.py +20 -20
- universal_mcp/applications/markitdown/app.py +10 -5
- universal_mcp/applications/ms_teams/app.py +123 -123
- universal_mcp/applications/openai/app.py +40 -39
- universal_mcp/applications/outlook/app.py +32 -32
- universal_mcp/applications/perplexity/app.py +4 -4
- universal_mcp/applications/reddit/app.py +69 -70
- universal_mcp/applications/resend/app.py +116 -117
- universal_mcp/applications/rocketlane/app.py +0 -1
- universal_mcp/applications/scraper/__init__.py +1 -1
- universal_mcp/applications/scraper/app.py +234 -16
- universal_mcp/applications/serpapi/app.py +14 -14
- universal_mcp/applications/sharepoint/app.py +19 -20
- universal_mcp/applications/shopify/app.py +0 -1
- universal_mcp/applications/slack/app.py +48 -48
- universal_mcp/applications/tavily/app.py +4 -4
- universal_mcp/applications/twitter/api_segments/compliance_api.py +13 -15
- universal_mcp/applications/twitter/api_segments/dm_conversations_api.py +20 -20
- universal_mcp/applications/twitter/api_segments/dm_events_api.py +12 -12
- universal_mcp/applications/twitter/api_segments/likes_api.py +12 -12
- universal_mcp/applications/twitter/api_segments/lists_api.py +37 -39
- universal_mcp/applications/twitter/api_segments/spaces_api.py +24 -24
- universal_mcp/applications/twitter/api_segments/trends_api.py +4 -4
- universal_mcp/applications/twitter/api_segments/tweets_api.py +105 -105
- universal_mcp/applications/twitter/api_segments/usage_api.py +4 -4
- universal_mcp/applications/twitter/api_segments/users_api.py +136 -136
- universal_mcp/applications/twitter/app.py +6 -2
- universal_mcp/applications/unipile/app.py +321 -71
- universal_mcp/applications/whatsapp/app.py +53 -54
- universal_mcp/applications/whatsapp/audio.py +39 -35
- universal_mcp/applications/whatsapp/whatsapp.py +176 -154
- universal_mcp/applications/whatsapp_business/app.py +92 -92
- universal_mcp/applications/yahoo_finance/app.py +105 -63
- universal_mcp/applications/youtube/app.py +206 -199
- universal_mcp/applications/zenquotes/__init__.py +2 -0
- universal_mcp/applications/zenquotes/app.py +3 -3
- {universal_mcp_applications-0.1.20.dist-info → universal_mcp_applications-0.1.22.dist-info}/METADATA +2 -1
- {universal_mcp_applications-0.1.20.dist-info → universal_mcp_applications-0.1.22.dist-info}/RECORD +78 -74
- {universal_mcp_applications-0.1.20.dist-info → universal_mcp_applications-0.1.22.dist-info}/WHEEL +0 -0
- {universal_mcp_applications-0.1.20.dist-info → universal_mcp_applications-0.1.22.dist-info}/licenses/LICENSE +0 -0
|
@@ -17,18 +17,18 @@ class SlackApp(APIApplication):
|
|
|
17
17
|
) -> dict[str, Any]:
|
|
18
18
|
"""
|
|
19
19
|
Deletes a specific message from a Slack channel. It identifies the message using its channel ID and timestamp (`ts`). This function is distinct from `chat_update` which modifies a message, and `chat_post_message` which sends a new one.
|
|
20
|
-
|
|
20
|
+
|
|
21
21
|
Args:
|
|
22
22
|
as_user (boolean): Pass true to delete the message as the authed user with `chat:write:user` scope. [Bot users](https://slack.dev) in this context are considered authed users. If unused or false, the message will be deleted with `chat:write:bot` scope.
|
|
23
23
|
channel (string): Channel containing the message to be deleted.
|
|
24
24
|
ts (number): Timestamp of the message to be deleted.
|
|
25
|
-
|
|
25
|
+
|
|
26
26
|
Returns:
|
|
27
27
|
dict[str, Any]: Typical success response
|
|
28
|
-
|
|
28
|
+
|
|
29
29
|
Raises:
|
|
30
30
|
HTTPStatusError: Raised when the API request fails with detailed error information including status code and response body.
|
|
31
|
-
|
|
31
|
+
|
|
32
32
|
Tags:
|
|
33
33
|
chat
|
|
34
34
|
"""
|
|
@@ -71,7 +71,7 @@ class SlackApp(APIApplication):
|
|
|
71
71
|
) -> dict[str, Any]:
|
|
72
72
|
"""
|
|
73
73
|
Posts a new message to a specified Slack channel. It supports rich content formats like text, attachments, and blocks, along with options for threading and authorship. This function creates new messages, unlike `chat_update` which modifies existing ones or `chat_delete` which removes them.
|
|
74
|
-
|
|
74
|
+
|
|
75
75
|
Args:
|
|
76
76
|
as_user (boolean): Pass true to post the message as the authed user, instead of as a bot. Defaults to false. See [authorship](https://slack.dev) below.
|
|
77
77
|
attachments (string): A JSON-based array of structured attachments, presented as a URL-encoded string.
|
|
@@ -88,13 +88,13 @@ class SlackApp(APIApplication):
|
|
|
88
88
|
unfurl_links (boolean): Pass true to enable unfurling of primarily text-based content.
|
|
89
89
|
unfurl_media (boolean): Pass false to disable unfurling of media content.
|
|
90
90
|
username (string): Set your bot's user name. Must be used in conjunction with `as_user` set to false, otherwise ignored. See [authorship](https://slack.dev) below.
|
|
91
|
-
|
|
91
|
+
|
|
92
92
|
Returns:
|
|
93
93
|
dict[str, Any]: Typical success response
|
|
94
|
-
|
|
94
|
+
|
|
95
95
|
Raises:
|
|
96
96
|
HTTPStatusError: Raised when the API request fails with detailed error information including status code and response body.
|
|
97
|
-
|
|
97
|
+
|
|
98
98
|
Tags:
|
|
99
99
|
chat
|
|
100
100
|
"""
|
|
@@ -142,7 +142,7 @@ class SlackApp(APIApplication):
|
|
|
142
142
|
) -> dict[str, Any]:
|
|
143
143
|
"""
|
|
144
144
|
Updates a specific, existing message in a Slack channel, identified by its timestamp. It modifies content such as text, blocks, or attachments by calling the `chat.update` API endpoint, distinguishing it from functions that create (`chat_post_message`) or delete (`chat_delete`) messages.
|
|
145
|
-
|
|
145
|
+
|
|
146
146
|
Args:
|
|
147
147
|
as_user (string): Pass true to update the message as the authed user. [Bot users](https://slack.dev) in this context are considered authed users.
|
|
148
148
|
attachments (string): A JSON-based array of structured attachments, presented as a URL-encoded string. This field is required when not presenting `text`. If you don't include this field, the message's previous `attachments` will be retained. To remove previous `attachments`, include an empty array for this field.
|
|
@@ -152,13 +152,13 @@ class SlackApp(APIApplication):
|
|
|
152
152
|
parse (string): Change how messages are treated. Defaults to `client`, unlike `chat.postMessage`. Accepts either `none` or `full`. If you do not specify a value for this field, the original value set for the message will be overwritten with the default, `client`.
|
|
153
153
|
text (string): New text for the message, using the [default formatting rules](https://slack.dev). It's not required when presenting `blocks` or `attachments`.
|
|
154
154
|
ts (string): Timestamp of the message to be updated.
|
|
155
|
-
|
|
155
|
+
|
|
156
156
|
Returns:
|
|
157
157
|
dict[str, Any]: Typical success response
|
|
158
|
-
|
|
158
|
+
|
|
159
159
|
Raises:
|
|
160
160
|
HTTPStatusError: Raised when the API request fails with detailed error information including status code and response body.
|
|
161
|
-
|
|
161
|
+
|
|
162
162
|
Tags:
|
|
163
163
|
chat, important
|
|
164
164
|
"""
|
|
@@ -198,7 +198,7 @@ class SlackApp(APIApplication):
|
|
|
198
198
|
) -> dict[str, Any]:
|
|
199
199
|
"""
|
|
200
200
|
Fetches the message history for a specific Slack conversation or channel. Supports filtering messages by timestamp and pagination using a cursor. This method retrieves messages *within* a conversation, unlike `conversations_list` which retrieves a list of available conversations.
|
|
201
|
-
|
|
201
|
+
|
|
202
202
|
Args:
|
|
203
203
|
token (string): Authentication token used to access conversation history.
|
|
204
204
|
channel (string): The ID of the channel to retrieve the conversation history from.
|
|
@@ -207,13 +207,13 @@ class SlackApp(APIApplication):
|
|
|
207
207
|
inclusive (boolean): Determines whether to include the messages at the end of the history range in the response.
|
|
208
208
|
limit (integer): Specifies the maximum number of conversation history entries to retrieve in a single API call.
|
|
209
209
|
cursor (string): A string token used for cursor-based pagination to fetch the next set of conversation history results starting from a specific point.
|
|
210
|
-
|
|
210
|
+
|
|
211
211
|
Returns:
|
|
212
212
|
dict[str, Any]: Typical success response containing a channel's messages
|
|
213
|
-
|
|
213
|
+
|
|
214
214
|
Raises:
|
|
215
215
|
HTTPStatusError: Raised when the API request fails with detailed error information including status code and response body.
|
|
216
|
-
|
|
216
|
+
|
|
217
217
|
Tags:
|
|
218
218
|
conversations
|
|
219
219
|
"""
|
|
@@ -244,20 +244,20 @@ class SlackApp(APIApplication):
|
|
|
244
244
|
) -> dict[str, Any]:
|
|
245
245
|
"""
|
|
246
246
|
Fetches a paginated list of channel-like conversations in a workspace. Allows filtering by type and excluding archived channels. This function lists available conversations, unlike `conversations_history` which retrieves the message history from within a specific conversation.
|
|
247
|
-
|
|
247
|
+
|
|
248
248
|
Args:
|
|
249
249
|
token (string): The token parameter in the query string is a string used for authentication to authorize and identify the client making the GET request to the /conversations.list endpoint.
|
|
250
250
|
exclude_archived (boolean): Exclude archived conversations from the list of results.
|
|
251
251
|
types (string): Specifies the types of conversations to include in the list, as a string query parameter.
|
|
252
252
|
limit (integer): Specifies the maximum number of conversations to return in the response, with a default value of 1.
|
|
253
253
|
cursor (string): A cursor string used for pagination to specify the position from which to continue retrieving the next set of conversation results.
|
|
254
|
-
|
|
254
|
+
|
|
255
255
|
Returns:
|
|
256
256
|
dict[str, Any]: Typical success response with only public channels
|
|
257
|
-
|
|
257
|
+
|
|
258
258
|
Raises:
|
|
259
259
|
HTTPStatusError: Raised when the API request fails with detailed error information including status code and response body.
|
|
260
|
-
|
|
260
|
+
|
|
261
261
|
Tags:
|
|
262
262
|
conversations
|
|
263
263
|
"""
|
|
@@ -279,18 +279,18 @@ class SlackApp(APIApplication):
|
|
|
279
279
|
def reactions_add(self, channel: str, name: str, timestamp: str) -> dict[str, Any]:
|
|
280
280
|
"""
|
|
281
281
|
Adds a specific emoji reaction to a message in a Slack channel, identifying the message by its channel ID and timestamp. This method creates a new reaction, unlike `reactions_get` or `reactions_list` which retrieve existing reaction data for items or users.
|
|
282
|
-
|
|
282
|
+
|
|
283
283
|
Args:
|
|
284
284
|
channel (string): Channel where the message to add reaction to was posted.
|
|
285
285
|
name (string): Reaction (emoji) name.
|
|
286
286
|
timestamp (string): Timestamp of the message to add reaction to.
|
|
287
|
-
|
|
287
|
+
|
|
288
288
|
Returns:
|
|
289
289
|
dict[str, Any]: Typical success response
|
|
290
|
-
|
|
290
|
+
|
|
291
291
|
Raises:
|
|
292
292
|
HTTPStatusError: Raised when the API request fails with detailed error information including status code and response body.
|
|
293
|
-
|
|
293
|
+
|
|
294
294
|
Tags:
|
|
295
295
|
reactions
|
|
296
296
|
"""
|
|
@@ -324,7 +324,7 @@ class SlackApp(APIApplication):
|
|
|
324
324
|
) -> dict[str, Any]:
|
|
325
325
|
"""
|
|
326
326
|
Retrieves all reactions for a single item, such as a message, file, or file comment. This function targets reactions *on* a specific item, unlike `reactions_list` which gets reactions created *by* a user.
|
|
327
|
-
|
|
327
|
+
|
|
328
328
|
Args:
|
|
329
329
|
token (string): The "token" parameter is a required string that must be provided in the query string for authentication purposes when using the GET operation at "/reactions.get" to authorize access to reaction data.
|
|
330
330
|
channel (string): The channel identifier to filter reactions by, specified as a string.
|
|
@@ -332,13 +332,13 @@ class SlackApp(APIApplication):
|
|
|
332
332
|
file_comment (string): A query parameter to filter reactions by a specific file comment.
|
|
333
333
|
full (boolean): Whether to return full reaction details or only basic reaction information.
|
|
334
334
|
timestamp (string): The timestamp parameter filters results based on a specific date and time value, expected in an ISO 8601 format string.
|
|
335
|
-
|
|
335
|
+
|
|
336
336
|
Returns:
|
|
337
337
|
dict[str, Any]: Typical success response
|
|
338
|
-
|
|
338
|
+
|
|
339
339
|
Raises:
|
|
340
340
|
HTTPStatusError: Raised when the API request fails with detailed error information including status code and response body.
|
|
341
|
-
|
|
341
|
+
|
|
342
342
|
Tags:
|
|
343
343
|
reactions
|
|
344
344
|
"""
|
|
@@ -370,7 +370,7 @@ class SlackApp(APIApplication):
|
|
|
370
370
|
) -> dict[str, Any]:
|
|
371
371
|
"""
|
|
372
372
|
Retrieves a paginated list of items (e.g., messages, files) that a specific user has reacted to. Unlike `reactions_get`, which fetches all reactions for a single item, this function lists all items a given user has reacted to across Slack.
|
|
373
|
-
|
|
373
|
+
|
|
374
374
|
Args:
|
|
375
375
|
token (string): Required authentication token passed as a query parameter to authenticate the request for listing reactions.
|
|
376
376
|
user (string): Filter reactions by specifying the user, which can be a username or identifier.
|
|
@@ -379,13 +379,13 @@ class SlackApp(APIApplication):
|
|
|
379
379
|
page (integer): The "page" parameter is an integer query parameter used to specify the page number for pagination in the list of reactions.
|
|
380
380
|
cursor (string): A string used to specify the position in the list of reactions for pagination, allowing retrieval of additional items after or before the specified cursor.
|
|
381
381
|
limit (integer): The `limit` parameter specifies the maximum number of reactions to return in the response.
|
|
382
|
-
|
|
382
|
+
|
|
383
383
|
Returns:
|
|
384
384
|
dict[str, Any]: Typical success response
|
|
385
|
-
|
|
385
|
+
|
|
386
386
|
Raises:
|
|
387
387
|
HTTPStatusError: Raised when the API request fails with detailed error information including status code and response body.
|
|
388
|
-
|
|
388
|
+
|
|
389
389
|
Tags:
|
|
390
390
|
reactions
|
|
391
391
|
"""
|
|
@@ -418,7 +418,7 @@ class SlackApp(APIApplication):
|
|
|
418
418
|
) -> dict[str, Any]:
|
|
419
419
|
"""
|
|
420
420
|
Searches a Slack workspace for messages matching a specific query. It supports advanced control over results through pagination, sorting by relevance or timestamp, and an option to highlight search terms within the returned message content.
|
|
421
|
-
|
|
421
|
+
|
|
422
422
|
Args:
|
|
423
423
|
token (string): A required string parameter named "token" passed as a query parameter to authenticate the request for retrieving search messages.
|
|
424
424
|
query (string): The search query string to specify the text or keywords to search for in messages.
|
|
@@ -427,13 +427,13 @@ class SlackApp(APIApplication):
|
|
|
427
427
|
page (integer): The page query parameter specifies the page number of search results to retrieve in the GET /search.messages operation.
|
|
428
428
|
sort (string): Sorts the search results by a specified field, allowing clients to customize the order of returned messages.
|
|
429
429
|
sort_dir (string): The "sort_dir" query parameter specifies the direction of sorting for the search results, typically accepting values like "asc" for ascending or "desc" for descending order.
|
|
430
|
-
|
|
430
|
+
|
|
431
431
|
Returns:
|
|
432
432
|
dict[str, Any]: Typical success response
|
|
433
|
-
|
|
433
|
+
|
|
434
434
|
Raises:
|
|
435
435
|
HTTPStatusError: Raised when the API request fails with detailed error information including status code and response body.
|
|
436
|
-
|
|
436
|
+
|
|
437
437
|
Tags:
|
|
438
438
|
search, important
|
|
439
439
|
"""
|
|
@@ -457,17 +457,17 @@ class SlackApp(APIApplication):
|
|
|
457
457
|
def team_info(self, token: str, team: str | None = None) -> dict[str, Any]:
|
|
458
458
|
"""
|
|
459
459
|
Fetches details for a Slack team, such as name and domain, by calling the `team.info` API endpoint. This function requires an authentication token and can optionally target a specific team by its ID, distinguishing it from user or channel-specific functions.
|
|
460
|
-
|
|
460
|
+
|
|
461
461
|
Args:
|
|
462
462
|
token (string): Mandatory authentication token passed as a query parameter to authenticate the request for retrieving team information.
|
|
463
463
|
team (string): The "team" parameter is a query string parameter of type string, used to specify the team for which information is requested in the GET operation at the "/team.info" path.
|
|
464
|
-
|
|
464
|
+
|
|
465
465
|
Returns:
|
|
466
466
|
dict[str, Any]: Typical success response
|
|
467
|
-
|
|
467
|
+
|
|
468
468
|
Raises:
|
|
469
469
|
HTTPStatusError: Raised when the API request fails with detailed error information including status code and response body.
|
|
470
|
-
|
|
470
|
+
|
|
471
471
|
Tags:
|
|
472
472
|
team
|
|
473
473
|
"""
|
|
@@ -486,18 +486,18 @@ class SlackApp(APIApplication):
|
|
|
486
486
|
) -> dict[str, Any]:
|
|
487
487
|
"""
|
|
488
488
|
Fetches detailed profile information for a single Slack user, identified by their user ID. Unlike `users_list`, which retrieves all workspace members, this function targets an individual and can optionally include their locale information. It directly calls the `users.info` Slack API endpoint.
|
|
489
|
-
|
|
489
|
+
|
|
490
490
|
Args:
|
|
491
491
|
token (string): The token query parameter is a required string used to authenticate and authorize the API request to access user information in the GET /users.info operation.
|
|
492
492
|
include_locale (boolean): Indicates whether to include locale information in the response, with a value of true or false.
|
|
493
493
|
user (string): A string parameter used to identify or specify a user in the request.
|
|
494
|
-
|
|
494
|
+
|
|
495
495
|
Returns:
|
|
496
496
|
dict[str, Any]: Typical success response
|
|
497
|
-
|
|
497
|
+
|
|
498
498
|
Raises:
|
|
499
499
|
HTTPStatusError: Raised when the API request fails with detailed error information including status code and response body.
|
|
500
|
-
|
|
500
|
+
|
|
501
501
|
Tags:
|
|
502
502
|
users, important
|
|
503
503
|
"""
|
|
@@ -523,19 +523,19 @@ class SlackApp(APIApplication):
|
|
|
523
523
|
) -> dict[str, Any]:
|
|
524
524
|
"""
|
|
525
525
|
Fetches a paginated list of all users in a Slack workspace, including deactivated members. Unlike `users_info` which retrieves a single user's details, this function returns a collection and supports limiting results or including locale data through optional parameters.
|
|
526
|
-
|
|
526
|
+
|
|
527
527
|
Args:
|
|
528
528
|
token (string): Required authentication token for accessing the list of users.
|
|
529
529
|
limit (integer): Specifies the maximum number of users to return in the response, defaults to 1.
|
|
530
530
|
cursor (string): A unique string identifier used for cursor-based pagination, indicating the starting point for retrieving the next set of users in the list.
|
|
531
531
|
include_locale (boolean): A boolean query parameter to optionally include locale information in the response.
|
|
532
|
-
|
|
532
|
+
|
|
533
533
|
Returns:
|
|
534
534
|
dict[str, Any]: Typical success response
|
|
535
|
-
|
|
535
|
+
|
|
536
536
|
Raises:
|
|
537
537
|
HTTPStatusError: Raised when the API request fails with detailed error information including status code and response body.
|
|
538
|
-
|
|
538
|
+
|
|
539
539
|
Tags:
|
|
540
540
|
users
|
|
541
541
|
"""
|
|
@@ -11,17 +11,17 @@ class TavilyApp(APIApplication):
|
|
|
11
11
|
def search_and_summarize(self, query: str) -> str:
|
|
12
12
|
"""
|
|
13
13
|
Queries the Tavily API to perform a web search. It returns a direct AI-generated answer if available; otherwise, it provides a formatted summary of the top three search results, including their titles and snippets.
|
|
14
|
-
|
|
14
|
+
|
|
15
15
|
Args:
|
|
16
16
|
query: The search query string to be processed by Tavily's search engine
|
|
17
|
-
|
|
17
|
+
|
|
18
18
|
Returns:
|
|
19
19
|
A string containing either a direct answer from Tavily's AI or a formatted summary of the top 3 search results, with each result containing the title and snippet
|
|
20
|
-
|
|
20
|
+
|
|
21
21
|
Raises:
|
|
22
22
|
ValueError: When authentication credentials are invalid or missing (via validate() method)
|
|
23
23
|
HTTPError: When the API request fails or returns an error response
|
|
24
|
-
|
|
24
|
+
|
|
25
25
|
Tags:
|
|
26
26
|
search, ai, web, query, important, api-client, text-processing
|
|
27
27
|
"""
|
|
@@ -12,19 +12,19 @@ class ComplianceApi(APISegmentBase):
|
|
|
12
12
|
) -> dict[str, Any]:
|
|
13
13
|
"""
|
|
14
14
|
Retrieves a list of compliance jobs, requiring a job `type` ('tweets' or 'users') and allowing optional filtering by `status`. This function fetches multiple jobs, distinguishing it from `get_batch_compliance_job` which retrieves a single job by its unique ID.
|
|
15
|
-
|
|
15
|
+
|
|
16
16
|
Args:
|
|
17
17
|
type (string): The type parameter specifies the compliance job type and must be either "tweets" or "users".
|
|
18
18
|
status (string): Filters compliance jobs by their current status, which can be one of: created, in_progress, failed, or complete.
|
|
19
19
|
compliance_job_fields (array): A comma separated list of ComplianceJob fields to display. Example: "['created_at', 'download_expires_at', 'download_url', 'id', 'name', 'resumable', 'status', 'type', 'upload_expires_at', 'upload_url']".
|
|
20
|
-
|
|
20
|
+
|
|
21
21
|
Returns:
|
|
22
22
|
dict[str, Any]: The request has succeeded.
|
|
23
|
-
|
|
23
|
+
|
|
24
24
|
Raises:
|
|
25
25
|
HTTPError: Raised when the API request fails (e.g., non-2XX status code).
|
|
26
26
|
JSONDecodeError: Raised if the response body cannot be parsed as JSON.
|
|
27
|
-
|
|
27
|
+
|
|
28
28
|
Tags:
|
|
29
29
|
Compliance
|
|
30
30
|
"""
|
|
@@ -47,19 +47,19 @@ class ComplianceApi(APISegmentBase):
|
|
|
47
47
|
) -> dict[str, Any]:
|
|
48
48
|
"""
|
|
49
49
|
Creates a new batch compliance job for a specified type ('tweets' or 'users'). A custom name can be provided, and resumable uploads can be enabled. This initiates the job creation process, differing from functions that list or retrieve existing jobs.
|
|
50
|
-
|
|
50
|
+
|
|
51
51
|
Args:
|
|
52
52
|
type (string): Type of compliance job to list.
|
|
53
53
|
name (string): User-provided name for a compliance job. Example: 'my-job'.
|
|
54
54
|
resumable (boolean): If true, this endpoint will return a pre-signed URL with resumable uploads enabled.
|
|
55
|
-
|
|
55
|
+
|
|
56
56
|
Returns:
|
|
57
57
|
dict[str, Any]: The request has succeeded.
|
|
58
|
-
|
|
58
|
+
|
|
59
59
|
Raises:
|
|
60
60
|
HTTPError: Raised when the API request fails (e.g., non-2XX status code).
|
|
61
61
|
JSONDecodeError: Raised if the response body cannot be parsed as JSON.
|
|
62
|
-
|
|
62
|
+
|
|
63
63
|
Tags:
|
|
64
64
|
Compliance
|
|
65
65
|
"""
|
|
@@ -79,23 +79,21 @@ class ComplianceApi(APISegmentBase):
|
|
|
79
79
|
response.raise_for_status()
|
|
80
80
|
return response.json()
|
|
81
81
|
|
|
82
|
-
def get_compliance_job(
|
|
83
|
-
self, id, compliance_job_fields=None
|
|
84
|
-
) -> dict[str, Any]:
|
|
82
|
+
def get_compliance_job(self, id, compliance_job_fields=None) -> dict[str, Any]:
|
|
85
83
|
"""
|
|
86
84
|
Retrieves a single batch compliance job by its unique ID. Unlike `list_batch_compliance_jobs`, which fetches a list, this function returns details for one specific job. Optional parameters can customize which data fields are returned in the response.
|
|
87
|
-
|
|
85
|
+
|
|
88
86
|
Args:
|
|
89
87
|
id (string): id
|
|
90
88
|
compliance_job_fields (array): A comma separated list of ComplianceJob fields to display. Example: "['created_at', 'download_expires_at', 'download_url', 'id', 'name', 'resumable', 'status', 'type', 'upload_expires_at', 'upload_url']".
|
|
91
|
-
|
|
89
|
+
|
|
92
90
|
Returns:
|
|
93
91
|
dict[str, Any]: The request has succeeded.
|
|
94
|
-
|
|
92
|
+
|
|
95
93
|
Raises:
|
|
96
94
|
HTTPError: Raised when the API request fails (e.g., non-2XX status code).
|
|
97
95
|
JSONDecodeError: Raised if the response body cannot be parsed as JSON.
|
|
98
|
-
|
|
96
|
+
|
|
99
97
|
Tags:
|
|
100
98
|
Compliance
|
|
101
99
|
"""
|
|
@@ -12,19 +12,19 @@ class DmConversationsApi(APISegmentBase):
|
|
|
12
12
|
) -> dict[str, Any]:
|
|
13
13
|
"""
|
|
14
14
|
Creates a new group Direct Message conversation with specified participants and sends an initial message. This function specifically handles the creation of new multi-participant conversations, distinct from other methods in this class that add messages to existing one-to-one or group DMs.
|
|
15
|
-
|
|
15
|
+
|
|
16
16
|
Args:
|
|
17
17
|
conversation_type (string): The conversation type that is being created.
|
|
18
18
|
message (string): message
|
|
19
19
|
participant_ids (array): Participants for the DM Conversation.
|
|
20
|
-
|
|
20
|
+
|
|
21
21
|
Returns:
|
|
22
22
|
dict[str, Any]: The request has succeeded.
|
|
23
|
-
|
|
23
|
+
|
|
24
24
|
Raises:
|
|
25
25
|
HTTPError: Raised when the API request fails (e.g., non-2XX status code).
|
|
26
26
|
JSONDecodeError: Raised if the response body cannot be parsed as JSON.
|
|
27
|
-
|
|
27
|
+
|
|
28
28
|
Tags:
|
|
29
29
|
Direct Messages
|
|
30
30
|
"""
|
|
@@ -62,7 +62,7 @@ class DmConversationsApi(APISegmentBase):
|
|
|
62
62
|
) -> dict[str, Any]:
|
|
63
63
|
"""
|
|
64
64
|
Retrieves direct message events from a conversation identified by a specific participant's ID. Supports pagination and filtering by event type. This method is distinct from `get_dm_conversations_id_dm_events`, which uses a direct conversation ID for retrieval instead of a participant's ID.
|
|
65
|
-
|
|
65
|
+
|
|
66
66
|
Args:
|
|
67
67
|
participant_id (string): participant_id
|
|
68
68
|
max_results (integer): The maximum number of direct message events to return in the response, with a default of 100.
|
|
@@ -73,14 +73,14 @@ class DmConversationsApi(APISegmentBase):
|
|
|
73
73
|
media_fields (array): A comma separated list of Media fields to display. Example: "['alt_text', 'duration_ms', 'height', 'media_key', 'non_public_metrics', 'organic_metrics', 'preview_image_url', 'promoted_metrics', 'public_metrics', 'type', 'url', 'variants', 'width']".
|
|
74
74
|
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']".
|
|
75
75
|
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']".
|
|
76
|
-
|
|
76
|
+
|
|
77
77
|
Returns:
|
|
78
78
|
dict[str, Any]: The request has succeeded.
|
|
79
|
-
|
|
79
|
+
|
|
80
80
|
Raises:
|
|
81
81
|
HTTPError: Raised when the API request fails (e.g., non-2XX status code).
|
|
82
82
|
JSONDecodeError: Raised if the response body cannot be parsed as JSON.
|
|
83
|
-
|
|
83
|
+
|
|
84
84
|
Tags:
|
|
85
85
|
Direct Messages
|
|
86
86
|
"""
|
|
@@ -110,19 +110,19 @@ class DmConversationsApi(APISegmentBase):
|
|
|
110
110
|
) -> dict[str, Any]:
|
|
111
111
|
"""
|
|
112
112
|
Sends a direct message to a user specified by their participant ID. It creates a new one-on-one conversation or appends the message to an existing one. Unlike other functions, this method identifies the conversation using the participant's ID rather than a pre-existing conversation ID.
|
|
113
|
-
|
|
113
|
+
|
|
114
114
|
Args:
|
|
115
115
|
participant_id (string): participant_id
|
|
116
116
|
attachments (array): Attachments to a DM Event.
|
|
117
117
|
text (string): Text of the message.
|
|
118
|
-
|
|
118
|
+
|
|
119
119
|
Returns:
|
|
120
120
|
dict[str, Any]: The request has succeeded.
|
|
121
|
-
|
|
121
|
+
|
|
122
122
|
Raises:
|
|
123
123
|
HTTPError: Raised when the API request fails (e.g., non-2XX status code).
|
|
124
124
|
JSONDecodeError: Raised if the response body cannot be parsed as JSON.
|
|
125
|
-
|
|
125
|
+
|
|
126
126
|
Tags:
|
|
127
127
|
Direct Messages
|
|
128
128
|
"""
|
|
@@ -149,19 +149,19 @@ class DmConversationsApi(APISegmentBase):
|
|
|
149
149
|
) -> dict[str, Any]:
|
|
150
150
|
"""
|
|
151
151
|
Sends a new message with optional text and attachments to an existing Direct Message conversation. The target conversation is specified by its `dm_conversation_id`, distinguishing it from functions that create new conversations or send one-to-one messages using a participant ID.
|
|
152
|
-
|
|
152
|
+
|
|
153
153
|
Args:
|
|
154
154
|
dm_conversation_id (string): dm_conversation_id
|
|
155
155
|
attachments (array): Attachments to a DM Event.
|
|
156
156
|
text (string): Text of the message.
|
|
157
|
-
|
|
157
|
+
|
|
158
158
|
Returns:
|
|
159
159
|
dict[str, Any]: The request has succeeded.
|
|
160
|
-
|
|
160
|
+
|
|
161
161
|
Raises:
|
|
162
162
|
HTTPError: Raised when the API request fails (e.g., non-2XX status code).
|
|
163
163
|
JSONDecodeError: Raised if the response body cannot be parsed as JSON.
|
|
164
|
-
|
|
164
|
+
|
|
165
165
|
Tags:
|
|
166
166
|
Direct Messages
|
|
167
167
|
"""
|
|
@@ -197,7 +197,7 @@ class DmConversationsApi(APISegmentBase):
|
|
|
197
197
|
) -> dict[str, Any]:
|
|
198
198
|
"""
|
|
199
199
|
Retrieves direct message events for a specific conversation using its unique ID. This function, distinct from fetching by participant ID, supports pagination, event type filtering, and data field expansion for detailed results.
|
|
200
|
-
|
|
200
|
+
|
|
201
201
|
Args:
|
|
202
202
|
id (string): id
|
|
203
203
|
max_results (integer): Limits the number of DM events returned in the response, with a default value of 100, allowing users to customize the amount of data retrieved.
|
|
@@ -208,14 +208,14 @@ class DmConversationsApi(APISegmentBase):
|
|
|
208
208
|
media_fields (array): A comma separated list of Media fields to display. Example: "['alt_text', 'duration_ms', 'height', 'media_key', 'non_public_metrics', 'organic_metrics', 'preview_image_url', 'promoted_metrics', 'public_metrics', 'type', 'url', 'variants', 'width']".
|
|
209
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']".
|
|
210
210
|
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']".
|
|
211
|
-
|
|
211
|
+
|
|
212
212
|
Returns:
|
|
213
213
|
dict[str, Any]: The request has succeeded.
|
|
214
|
-
|
|
214
|
+
|
|
215
215
|
Raises:
|
|
216
216
|
HTTPError: Raised when the API request fails (e.g., non-2XX status code).
|
|
217
217
|
JSONDecodeError: Raised if the response body cannot be parsed as JSON.
|
|
218
|
-
|
|
218
|
+
|
|
219
219
|
Tags:
|
|
220
220
|
Direct Messages
|
|
221
221
|
"""
|
|
@@ -20,7 +20,7 @@ class DmEventsApi(APISegmentBase):
|
|
|
20
20
|
) -> dict[str, Any]:
|
|
21
21
|
"""
|
|
22
22
|
Retrieves a list of direct message events, unlike `get_dm_events_by_id` which fetches a single event. Supports pagination, filtering by event type, and specifying which data fields to return for various objects to customize the API response.
|
|
23
|
-
|
|
23
|
+
|
|
24
24
|
Args:
|
|
25
25
|
max_results (integer): Limits the number of DM events returned in the response, with a default of 100 if not specified.
|
|
26
26
|
pagination_token (string): Optional token used to specify the starting point for paginating the response of DM events.
|
|
@@ -30,14 +30,14 @@ class DmEventsApi(APISegmentBase):
|
|
|
30
30
|
media_fields (array): A comma separated list of Media fields to display. Example: "['alt_text', 'duration_ms', 'height', 'media_key', 'non_public_metrics', 'organic_metrics', 'preview_image_url', 'promoted_metrics', 'public_metrics', 'type', 'url', 'variants', 'width']".
|
|
31
31
|
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']".
|
|
32
32
|
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']".
|
|
33
|
-
|
|
33
|
+
|
|
34
34
|
Returns:
|
|
35
35
|
dict[str, Any]: The request has succeeded.
|
|
36
|
-
|
|
36
|
+
|
|
37
37
|
Raises:
|
|
38
38
|
HTTPError: Raised when the API request fails (e.g., non-2XX status code).
|
|
39
39
|
JSONDecodeError: Raised if the response body cannot be parsed as JSON.
|
|
40
|
-
|
|
40
|
+
|
|
41
41
|
Tags:
|
|
42
42
|
Direct Messages
|
|
43
43
|
"""
|
|
@@ -63,17 +63,17 @@ class DmEventsApi(APISegmentBase):
|
|
|
63
63
|
def delete_dm_event(self, event_id) -> dict[str, Any]:
|
|
64
64
|
"""
|
|
65
65
|
Deletes a specific Direct Message (DM) event identified by its unique ID. This function issues an authenticated HTTP DELETE request to the API to permanently remove the specified event, returning a confirmation of the deletion.
|
|
66
|
-
|
|
66
|
+
|
|
67
67
|
Args:
|
|
68
68
|
event_id (string): event_id
|
|
69
|
-
|
|
69
|
+
|
|
70
70
|
Returns:
|
|
71
71
|
dict[str, Any]: The request has succeeded.
|
|
72
|
-
|
|
72
|
+
|
|
73
73
|
Raises:
|
|
74
74
|
HTTPError: Raised when the API request fails (e.g., non-2XX status code).
|
|
75
75
|
JSONDecodeError: Raised if the response body cannot be parsed as JSON.
|
|
76
|
-
|
|
76
|
+
|
|
77
77
|
Tags:
|
|
78
78
|
Direct Messages
|
|
79
79
|
"""
|
|
@@ -96,7 +96,7 @@ class DmEventsApi(APISegmentBase):
|
|
|
96
96
|
) -> dict[str, Any]:
|
|
97
97
|
"""
|
|
98
98
|
Fetches a specific Direct Message event using its unique ID. Optional parameters allow customizing the response by selecting specific fields for the event, media, users, and tweets, and by including expanded object details. This differs from `get_dm_events`, which retrieves a list of events.
|
|
99
|
-
|
|
99
|
+
|
|
100
100
|
Args:
|
|
101
101
|
event_id (string): event_id
|
|
102
102
|
dm_event_fields (array): A comma separated list of DmEvent fields to display. Example: "['attachments', 'created_at', 'dm_conversation_id', 'entities', 'event_type', 'id', 'participant_ids', 'referenced_tweets', 'sender_id', 'text']".
|
|
@@ -104,14 +104,14 @@ class DmEventsApi(APISegmentBase):
|
|
|
104
104
|
media_fields (array): A comma separated list of Media fields to display. Example: "['alt_text', 'duration_ms', 'height', 'media_key', 'non_public_metrics', 'organic_metrics', 'preview_image_url', 'promoted_metrics', 'public_metrics', 'type', 'url', 'variants', 'width']".
|
|
105
105
|
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']".
|
|
106
106
|
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']".
|
|
107
|
-
|
|
107
|
+
|
|
108
108
|
Returns:
|
|
109
109
|
dict[str, Any]: The request has succeeded.
|
|
110
|
-
|
|
110
|
+
|
|
111
111
|
Raises:
|
|
112
112
|
HTTPError: Raised when the API request fails (e.g., non-2XX status code).
|
|
113
113
|
JSONDecodeError: Raised if the response body cannot be parsed as JSON.
|
|
114
|
-
|
|
114
|
+
|
|
115
115
|
Tags:
|
|
116
116
|
Direct Messages
|
|
117
117
|
"""
|