universal-mcp-applications 0.1.21__py3-none-any.whl → 0.1.23__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 +71 -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 +168 -232
- 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 +80 -81
- 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 +90 -97
- 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 +193 -196
- universal_mcp/applications/zenquotes/__init__.py +2 -0
- universal_mcp/applications/zenquotes/app.py +5 -5
- {universal_mcp_applications-0.1.21.dist-info → universal_mcp_applications-0.1.23.dist-info}/METADATA +2 -1
- {universal_mcp_applications-0.1.21.dist-info → universal_mcp_applications-0.1.23.dist-info}/RECORD +78 -74
- {universal_mcp_applications-0.1.21.dist-info → universal_mcp_applications-0.1.23.dist-info}/WHEEL +0 -0
- {universal_mcp_applications-0.1.21.dist-info → universal_mcp_applications-0.1.23.dist-info}/licenses/LICENSE +0 -0
|
@@ -1,11 +1,10 @@
|
|
|
1
|
-
from typing import Any
|
|
2
1
|
import os
|
|
3
|
-
|
|
4
|
-
from youtube_transcript_api import YouTubeTranscriptApi
|
|
5
|
-
from youtube_transcript_api.proxies import WebshareProxyConfig
|
|
2
|
+
from typing import Any
|
|
6
3
|
|
|
7
4
|
from universal_mcp.applications.application import APIApplication
|
|
8
5
|
from universal_mcp.integrations import Integration
|
|
6
|
+
from youtube_transcript_api import YouTubeTranscriptApi
|
|
7
|
+
from youtube_transcript_api.proxies import WebshareProxyConfig
|
|
9
8
|
|
|
10
9
|
|
|
11
10
|
class YoutubeApp(APIApplication):
|
|
@@ -35,7 +34,7 @@ class YoutubeApp(APIApplication):
|
|
|
35
34
|
) -> Any:
|
|
36
35
|
"""
|
|
37
36
|
Retrieves a paginated list of all reports for a specific job ID, with options for filtering by date. Unlike `get_jobs_job_reports_report`, which fetches a single report by its ID, this function returns a collection of reports associated with a job.
|
|
38
|
-
|
|
37
|
+
|
|
39
38
|
Args:
|
|
40
39
|
jobId: The unique identifier for the job whose reports are to be retrieved.
|
|
41
40
|
createdAfter: Optional; filter to include only reports created after this date (ISO 8601 format).
|
|
@@ -44,13 +43,13 @@ class YoutubeApp(APIApplication):
|
|
|
44
43
|
pageToken: Optional; a token identifying the page of results to return.
|
|
45
44
|
startTimeAtOrAfter: Optional; filter to include only reports starting at or after this date-time (ISO 8601 format).
|
|
46
45
|
startTimeBefore: Optional; filter to include only reports with a start time before this date-time (ISO 8601 format).
|
|
47
|
-
|
|
46
|
+
|
|
48
47
|
Returns:
|
|
49
48
|
A JSON object containing the job reports matching the provided criteria.
|
|
50
|
-
|
|
49
|
+
|
|
51
50
|
Raises:
|
|
52
51
|
ValueError: Raised if the required 'jobId' parameter is missing.
|
|
53
|
-
|
|
52
|
+
|
|
54
53
|
Tags:
|
|
55
54
|
retrieve, report, job-management, batch
|
|
56
55
|
"""
|
|
@@ -73,24 +72,22 @@ class YoutubeApp(APIApplication):
|
|
|
73
72
|
response.raise_for_status()
|
|
74
73
|
return response.json()
|
|
75
74
|
|
|
76
|
-
def get_job_report(
|
|
77
|
-
self, jobId, reportId, onBehalfOfContentOwner=None
|
|
78
|
-
) -> Any:
|
|
75
|
+
def get_job_report(self, jobId, reportId, onBehalfOfContentOwner=None) -> Any:
|
|
79
76
|
"""
|
|
80
77
|
Fetches a single, specific report identified by its `reportId` from within a given `jobId`. This retrieves an individual record, distinguishing it from `get_jobs_job_reports`, which returns a list of reports for a job. The request can be made on behalf of a content owner.
|
|
81
|
-
|
|
78
|
+
|
|
82
79
|
Args:
|
|
83
80
|
jobId: The unique identifier for the job containing the report (required).
|
|
84
81
|
reportId: The unique identifier for the report to fetch (required).
|
|
85
82
|
onBehalfOfContentOwner: Optional; specifies the content owner for whom the request is made.
|
|
86
|
-
|
|
83
|
+
|
|
87
84
|
Returns:
|
|
88
85
|
A JSON object containing the fetched report details.
|
|
89
|
-
|
|
86
|
+
|
|
90
87
|
Raises:
|
|
91
88
|
ValueError: Raised if 'jobId' or 'reportId' is not provided.
|
|
92
89
|
requests.HTTPError: Raised if the API request fails (e.g., invalid permissions or resource not found).
|
|
93
|
-
|
|
90
|
+
|
|
94
91
|
Tags:
|
|
95
92
|
retrieve, report, job, api, json
|
|
96
93
|
"""
|
|
@@ -111,18 +108,18 @@ class YoutubeApp(APIApplication):
|
|
|
111
108
|
def delete_job(self, jobId, onBehalfOfContentOwner=None) -> Any:
|
|
112
109
|
"""
|
|
113
110
|
Deletes a specific job resource using its unique `jobId`, optionally on behalf of a content owner. This action permanently removes the job itself, differentiating it from functions that only retrieve or manage job reports.
|
|
114
|
-
|
|
111
|
+
|
|
115
112
|
Args:
|
|
116
113
|
jobId: The unique identifier of the job to delete. Required.
|
|
117
114
|
onBehalfOfContentOwner: Optional. Content owner ID for delegated authorization.
|
|
118
|
-
|
|
115
|
+
|
|
119
116
|
Returns:
|
|
120
117
|
JSON response from the API as a Python dictionary.
|
|
121
|
-
|
|
118
|
+
|
|
122
119
|
Raises:
|
|
123
120
|
ValueError: Raised when jobId is None.
|
|
124
121
|
requests.exceptions.HTTPError: Raised for failed HTTP requests (e.g., invalid job ID, permission errors).
|
|
125
|
-
|
|
122
|
+
|
|
126
123
|
Tags:
|
|
127
124
|
delete, jobs, async_job, management
|
|
128
125
|
"""
|
|
@@ -147,19 +144,19 @@ class YoutubeApp(APIApplication):
|
|
|
147
144
|
) -> Any:
|
|
148
145
|
"""
|
|
149
146
|
Retrieves a paginated list of asynchronous jobs from the YouTube Reporting API. Supports filtering by content owner and including system-managed jobs. This function lists multiple jobs, distinct from `get_jobs_job_reports` which retrieves reports for a single job.
|
|
150
|
-
|
|
147
|
+
|
|
151
148
|
Args:
|
|
152
149
|
includeSystemManaged: Optional boolean indicating whether to include system-managed jobs.
|
|
153
150
|
onBehalfOfContentOwner: Optional string representing the content owner on behalf of which the request is made.
|
|
154
151
|
pageSize: Optional integer specifying the number of jobs per page.
|
|
155
152
|
pageToken: Optional string for paginated results page token.
|
|
156
|
-
|
|
153
|
+
|
|
157
154
|
Returns:
|
|
158
155
|
JSON-decoded response containing the list of jobs and related metadata.
|
|
159
|
-
|
|
156
|
+
|
|
160
157
|
Raises:
|
|
161
158
|
HTTPError: Raised if the server returns an unsuccessful status code.
|
|
162
|
-
|
|
159
|
+
|
|
163
160
|
Tags:
|
|
164
161
|
list, scrape, management
|
|
165
162
|
"""
|
|
@@ -181,17 +178,17 @@ class YoutubeApp(APIApplication):
|
|
|
181
178
|
def download_report_media(self, resourceName) -> Any:
|
|
182
179
|
"""
|
|
183
180
|
Downloads the content of a bulk data report from the YouTube Reporting API by its unique `resourceName`. This function retrieves the actual media file generated by a reporting job, distinct from functions that only fetch report metadata.
|
|
184
|
-
|
|
181
|
+
|
|
185
182
|
Args:
|
|
186
183
|
resourceName: The name of the media resource to retrieve. Required and cannot be None.
|
|
187
|
-
|
|
184
|
+
|
|
188
185
|
Returns:
|
|
189
186
|
JSON-formatted data representing the media resource.
|
|
190
|
-
|
|
187
|
+
|
|
191
188
|
Raises:
|
|
192
189
|
ValueError: If 'resourceName' is None.
|
|
193
190
|
requests.exceptions.HTTPError: If the HTTP request fails, such as a 404 for a non-existent resource.
|
|
194
|
-
|
|
191
|
+
|
|
195
192
|
Tags:
|
|
196
193
|
retrieve, media, json, http, get
|
|
197
194
|
"""
|
|
@@ -212,19 +209,19 @@ class YoutubeApp(APIApplication):
|
|
|
212
209
|
) -> Any:
|
|
213
210
|
"""
|
|
214
211
|
Retrieves a list of available report types from the YouTube Reporting API, supporting pagination and filtering. This function returns metadata about what kinds of reports can be generated, distinct from functions like `get_reports` that fetch actual report content.
|
|
215
|
-
|
|
212
|
+
|
|
216
213
|
Args:
|
|
217
214
|
includeSystemManaged: Boolean indicating whether to include system-managed report types in results.
|
|
218
215
|
onBehalfOfContentOwner: Content owner ID for delegated authority requests.
|
|
219
216
|
pageSize: Maximum number of items to return per response page.
|
|
220
217
|
pageToken: Token identifying a specific results page for pagination.
|
|
221
|
-
|
|
218
|
+
|
|
222
219
|
Returns:
|
|
223
220
|
Dictionary containing report type entries and pagination details, typically including 'items' list and 'nextPageToken' if applicable.
|
|
224
|
-
|
|
221
|
+
|
|
225
222
|
Raises:
|
|
226
223
|
HTTPError: If the API request fails due to network issues, authentication problems, or invalid parameters.
|
|
227
|
-
|
|
224
|
+
|
|
228
225
|
Tags:
|
|
229
226
|
retrieve, list, api-resource, filtering, pagination, report-management
|
|
230
227
|
"""
|
|
@@ -248,18 +245,18 @@ class YoutubeApp(APIApplication):
|
|
|
248
245
|
) -> Any:
|
|
249
246
|
"""
|
|
250
247
|
Deletes a specific YouTube caption resource using its unique ID, with optional delegation for content owners. This management function removes the entire caption track, unlike `get_captions` which only retrieves the transcript text for a given video ID.
|
|
251
|
-
|
|
248
|
+
|
|
252
249
|
Args:
|
|
253
250
|
id: Optional unique identifier for the caption resource to delete.
|
|
254
251
|
onBehalfOf: Optional parameter identifying the user on whose behalf the request is made.
|
|
255
252
|
onBehalfOfContentOwner: Optional parameter specifying the content owner authorizing the request.
|
|
256
|
-
|
|
253
|
+
|
|
257
254
|
Returns:
|
|
258
255
|
JSON response containing the result of the DELETE operation from the YouTube API.
|
|
259
|
-
|
|
256
|
+
|
|
260
257
|
Raises:
|
|
261
258
|
HTTPError: Raised when the HTTP request fails, such as invalid ID, authentication failures, or API limitations exceeded.
|
|
262
|
-
|
|
259
|
+
|
|
263
260
|
Tags:
|
|
264
261
|
delete, captions, api, management
|
|
265
262
|
"""
|
|
@@ -280,17 +277,17 @@ class YoutubeApp(APIApplication):
|
|
|
280
277
|
def get_transcript_text(self, video_id: str) -> str:
|
|
281
278
|
"""
|
|
282
279
|
Fetches the full text transcript for a YouTube video using its ID. Unlike other methods using the official API, this function utilizes the `youtube-transcript-api` library to extract and concatenate all caption snippets into a single, timestamp-free string of the video's spoken content.
|
|
283
|
-
|
|
280
|
+
|
|
284
281
|
Args:
|
|
285
282
|
video_id: The unique identifier for the target video (required)
|
|
286
|
-
|
|
283
|
+
|
|
287
284
|
Returns:
|
|
288
285
|
String containing the complete transcript text without timestamps
|
|
289
|
-
|
|
286
|
+
|
|
290
287
|
Raises:
|
|
291
288
|
ValueError: Raised when required 'video_id' parameter is missing
|
|
292
289
|
Exception: Raised when transcript cannot be retrieved (e.g., no captions available)
|
|
293
|
-
|
|
290
|
+
|
|
294
291
|
Tags:
|
|
295
292
|
retrieve, transcript, text, captions
|
|
296
293
|
"""
|
|
@@ -301,7 +298,7 @@ class YoutubeApp(APIApplication):
|
|
|
301
298
|
proxy_username = os.getenv("PROXY_USERNAME")
|
|
302
299
|
proxy_password = os.getenv("PROXY_PASSWORD")
|
|
303
300
|
proxy_port = int(os.getenv("PROXY_PORT", 80))
|
|
304
|
-
|
|
301
|
+
|
|
305
302
|
if not proxy_username or not proxy_password:
|
|
306
303
|
raise ValueError(
|
|
307
304
|
"PROXY_USERNAME and PROXY_PASSWORD must be set when using proxy"
|
|
@@ -328,16 +325,16 @@ class YoutubeApp(APIApplication):
|
|
|
328
325
|
def delete_comments(self, id=None) -> Any:
|
|
329
326
|
"""
|
|
330
327
|
Permanently removes a specific comment identified by its unique ID via a DELETE request. Unlike moderation functions like `add_comments_mark_as_spam`, which only alter a comment's state, this action is irreversible and deletes the resource. An `id` is required to specify the target comment.
|
|
331
|
-
|
|
328
|
+
|
|
332
329
|
Args:
|
|
333
330
|
id: Optional ID of the comment to be deleted. If not provided, and based on implementation, all comments may be deleted.
|
|
334
|
-
|
|
331
|
+
|
|
335
332
|
Returns:
|
|
336
333
|
The JSON response from the server after attempting to delete the comment(s).
|
|
337
|
-
|
|
334
|
+
|
|
338
335
|
Raises:
|
|
339
336
|
requests.RequestException: Raised if there is a network error or an invalid response from the server.
|
|
340
|
-
|
|
337
|
+
|
|
341
338
|
Tags:
|
|
342
339
|
delete, comments, management
|
|
343
340
|
"""
|
|
@@ -349,16 +346,16 @@ class YoutubeApp(APIApplication):
|
|
|
349
346
|
def mark_comment_as_spam(self, id=None) -> Any:
|
|
350
347
|
"""
|
|
351
348
|
Marks a specified YouTube comment as spam via a POST request to the API. This moderation action is distinct from deleting comments (`delete_comments`) or setting other statuses like 'approved' or 'rejected' (`add_comments_set_moderation_status`).
|
|
352
|
-
|
|
349
|
+
|
|
353
350
|
Args:
|
|
354
351
|
id: Optional unique identifier of the comment to mark as spam (included in request parameters when provided).
|
|
355
|
-
|
|
352
|
+
|
|
356
353
|
Returns:
|
|
357
354
|
JSON response from the API containing the operation result.
|
|
358
|
-
|
|
355
|
+
|
|
359
356
|
Raises:
|
|
360
357
|
HTTPError: If the POST request fails or returns a non-200 status code.
|
|
361
|
-
|
|
358
|
+
|
|
362
359
|
Tags:
|
|
363
360
|
comments, spam, post-request, api, moderation
|
|
364
361
|
"""
|
|
@@ -373,18 +370,18 @@ class YoutubeApp(APIApplication):
|
|
|
373
370
|
) -> Any:
|
|
374
371
|
"""
|
|
375
372
|
Sets the moderation status (e.g., 'approved', 'rejected') for specified comments and can optionally ban the author. Unlike `add_comments_mark_as_spam`, this function allows for various moderation states, providing more granular control over comment management.
|
|
376
|
-
|
|
373
|
+
|
|
377
374
|
Args:
|
|
378
375
|
banAuthor: Optional boolean indicating whether to ban the comment's author
|
|
379
376
|
id: Optional string representing the unique identifier of the comment to moderate
|
|
380
377
|
moderationStatus: Optional string specifying the new moderation status (e.g., 'approved', 'rejected')
|
|
381
|
-
|
|
378
|
+
|
|
382
379
|
Returns:
|
|
383
380
|
JSON response from the server containing the result of the moderation operation
|
|
384
|
-
|
|
381
|
+
|
|
385
382
|
Raises:
|
|
386
383
|
requests.HTTPError: Raised when the HTTP request fails (e.g., invalid parameters or server errors)
|
|
387
|
-
|
|
384
|
+
|
|
388
385
|
Tags:
|
|
389
386
|
moderation, comments, management, api-client, status-update, ban-author
|
|
390
387
|
"""
|
|
@@ -407,18 +404,18 @@ class YoutubeApp(APIApplication):
|
|
|
407
404
|
) -> Any:
|
|
408
405
|
"""
|
|
409
406
|
Deletes a YouTube live broadcast event by its unique ID via the API. This request can be made on behalf of a content owner or channel. It targets the `/liveBroadcasts` endpoint, distinguishing it from `delete_livestreams` which manages the actual content stream.
|
|
410
|
-
|
|
407
|
+
|
|
411
408
|
Args:
|
|
412
409
|
id: Optional; Unique identifier of the live broadcast to delete (str).
|
|
413
410
|
onBehalfOfContentOwner: Optional; Content owner acting on behalf of (str).
|
|
414
411
|
onBehalfOfContentOwnerChannel: Optional; Channel ID linked to content owner (str).
|
|
415
|
-
|
|
412
|
+
|
|
416
413
|
Returns:
|
|
417
414
|
Dict[str, Any] containing the JSON-parsed response from the API request.
|
|
418
|
-
|
|
415
|
+
|
|
419
416
|
Raises:
|
|
420
417
|
requests.HTTPError: Raised for any HTTP request failures or invalid status codes (4XX/5XX).
|
|
421
|
-
|
|
418
|
+
|
|
422
419
|
Tags:
|
|
423
420
|
delete, live-broadcast, management, api
|
|
424
421
|
"""
|
|
@@ -446,20 +443,20 @@ class YoutubeApp(APIApplication):
|
|
|
446
443
|
) -> Any:
|
|
447
444
|
"""
|
|
448
445
|
Binds a YouTube live broadcast to a video stream using their respective IDs. This action associates the broadcast's metadata with the content stream, optionally performing the action on behalf of a content owner, facilitating the link between a planned event and its live video feed.
|
|
449
|
-
|
|
446
|
+
|
|
450
447
|
Args:
|
|
451
448
|
id: The id of the live broadcast to bind.
|
|
452
449
|
onBehalfOfContentOwner: The YouTube CMS content owner on behalf of whom the operation is performed.
|
|
453
450
|
onBehalfOfContentOwnerChannel: The YouTube channel ID for which the live broadcast is operated.
|
|
454
451
|
part: A comma-separated list of liveBroadcast resource properties to include in the API response.
|
|
455
452
|
streamId: The id of the stream to which the live broadcast is to be bound.
|
|
456
|
-
|
|
453
|
+
|
|
457
454
|
Returns:
|
|
458
455
|
The JSON response object from the YouTube API after attempting to bind the live broadcast to the stream.
|
|
459
|
-
|
|
456
|
+
|
|
460
457
|
Raises:
|
|
461
458
|
HTTPError: Raised if the request to the YouTube API fails, typically due to server errors or invalid responses.
|
|
462
|
-
|
|
459
|
+
|
|
463
460
|
Tags:
|
|
464
461
|
bind, youtube-api, live-broadcast, stream
|
|
465
462
|
"""
|
|
@@ -491,7 +488,7 @@ class YoutubeApp(APIApplication):
|
|
|
491
488
|
) -> Any:
|
|
492
489
|
"""
|
|
493
490
|
Sends control commands to a YouTube live broadcast, identified by its ID. It can display a slate or schedule an action using a time offset. Unlike `add_live_broadcasts_transition`, which alters broadcast status (e.g., 'live'), this function manages in-stream state.
|
|
494
|
-
|
|
491
|
+
|
|
495
492
|
Args:
|
|
496
493
|
displaySlate: Optional; Specifies whether or not to show a slate during the broadcast.
|
|
497
494
|
id: Optional; The ID of the live broadcast to control.
|
|
@@ -500,13 +497,13 @@ class YoutubeApp(APIApplication):
|
|
|
500
497
|
onBehalfOfContentOwnerChannel: Optional; The channel owned by the content owner.
|
|
501
498
|
part: Optional; Specifies a comma-separated list of one or more broadcasts resource properties.
|
|
502
499
|
walltime: Optional; An RFC 3339 timestamp that represents the time at which the action takes place.
|
|
503
|
-
|
|
500
|
+
|
|
504
501
|
Returns:
|
|
505
502
|
The JSON response from the server after controlling the live broadcast.
|
|
506
|
-
|
|
503
|
+
|
|
507
504
|
Raises:
|
|
508
505
|
requests.HTTPError: Raised if the HTTP request returns an unsuccessful status code.
|
|
509
|
-
|
|
506
|
+
|
|
510
507
|
Tags:
|
|
511
508
|
control, live-broadcast, async_job, management
|
|
512
509
|
"""
|
|
@@ -538,20 +535,20 @@ class YoutubeApp(APIApplication):
|
|
|
538
535
|
) -> Any:
|
|
539
536
|
"""
|
|
540
537
|
Changes a YouTube live broadcast's status (e.g., making it 'live' or 'complete') by posting to the API's transition endpoint. This function alters the broadcast's lifecycle state, distinct from other control actions like binding it to a stream, and returns the API's JSON response.
|
|
541
|
-
|
|
538
|
+
|
|
542
539
|
Args:
|
|
543
540
|
broadcastStatus: Optional; The status to which the live broadcast should be transitioned.
|
|
544
541
|
id: Optional; The unique identifier of the broadcast that needs to be transitioned.
|
|
545
542
|
onBehalfOfContentOwner: Optional; The YouTube content owner on whose behalf the API request is being made.
|
|
546
543
|
onBehalfOfContentOwnerChannel: Optional; The YouTube channel ID of the channel associated with the specified content owner.
|
|
547
544
|
part: Optional; A comma-separated list of one or more liveBroadcast resource properties that the API response will include.
|
|
548
|
-
|
|
545
|
+
|
|
549
546
|
Returns:
|
|
550
547
|
The JSON response from the API containing the details of the transitioned live broadcast.
|
|
551
|
-
|
|
548
|
+
|
|
552
549
|
Raises:
|
|
553
550
|
requests.HTTPError: Raised when the HTTP request to the API fails due to a server error or invalid request.
|
|
554
|
-
|
|
551
|
+
|
|
555
552
|
Tags:
|
|
556
553
|
transition, live-broadcast, youtube-api, video-management
|
|
557
554
|
"""
|
|
@@ -574,16 +571,16 @@ class YoutubeApp(APIApplication):
|
|
|
574
571
|
def delete_live_chat_ban(self, id=None) -> Any:
|
|
575
572
|
"""
|
|
576
573
|
Deletes a specific YouTube live chat ban using its unique ID. It sends a DELETE request to the `/liveChat/bans` endpoint to revoke the ban, allowing the user to participate in the chat again.
|
|
577
|
-
|
|
574
|
+
|
|
578
575
|
Args:
|
|
579
576
|
id: Optional; The unique identifier of the live chat ban to delete. If None, no specific ban is targeted.
|
|
580
|
-
|
|
577
|
+
|
|
581
578
|
Returns:
|
|
582
579
|
The JSON response from the server after deletion, typically containing operation details.
|
|
583
|
-
|
|
580
|
+
|
|
584
581
|
Raises:
|
|
585
582
|
requests.HTTPError: Raised if the HTTP request fails, indicating server-side issues or invalid parameters.
|
|
586
|
-
|
|
583
|
+
|
|
587
584
|
Tags:
|
|
588
585
|
delete, management, live-chat, async-job
|
|
589
586
|
"""
|
|
@@ -596,16 +593,16 @@ class YoutubeApp(APIApplication):
|
|
|
596
593
|
def delete_live_chat_message(self, id=None) -> Any:
|
|
597
594
|
"""
|
|
598
595
|
Deletes a specific YouTube live chat message identified by its unique ID. This function targets the `/liveChat/messages` endpoint, distinguishing it from `delete_live_chat_bans` and `delete_live_chat_moderators`, which manage different aspects of a live chat.
|
|
599
|
-
|
|
596
|
+
|
|
600
597
|
Args:
|
|
601
598
|
id: Optional; The identifier of the specific live chat message to be deleted. If not provided, it defaults to None.
|
|
602
|
-
|
|
599
|
+
|
|
603
600
|
Returns:
|
|
604
601
|
A JSON object containing the server's response to the deletion request. It includes details about the operation's success or failure.
|
|
605
|
-
|
|
602
|
+
|
|
606
603
|
Raises:
|
|
607
604
|
HTTPError: Raised if the HTTP request to delete the message fails.
|
|
608
|
-
|
|
605
|
+
|
|
609
606
|
Tags:
|
|
610
607
|
delete, live-chat, message-management
|
|
611
608
|
"""
|
|
@@ -618,16 +615,16 @@ class YoutubeApp(APIApplication):
|
|
|
618
615
|
def delete_live_chat_moderators(self, id=None) -> Any:
|
|
619
616
|
"""
|
|
620
617
|
Deletes a specific YouTube live chat moderator using their unique ID. This function sends a DELETE request to the `/liveChat/moderators` API endpoint and returns the server's JSON response, confirming the successful removal or detailing errors. The moderator ID is a required parameter for this action.
|
|
621
|
-
|
|
618
|
+
|
|
622
619
|
Args:
|
|
623
620
|
id: The ID of the live chat moderator to delete. When None, no deletion occurs (moderator IDs must be explicitly specified).
|
|
624
|
-
|
|
621
|
+
|
|
625
622
|
Returns:
|
|
626
623
|
Parsed JSON response from the server containing deletion confirmation or error details.
|
|
627
|
-
|
|
624
|
+
|
|
628
625
|
Raises:
|
|
629
626
|
requests.HTTPError: Raised for unsuccessful HTTP responses (e.g., invalid ID, authorization failure, or server errors).
|
|
630
|
-
|
|
627
|
+
|
|
631
628
|
Tags:
|
|
632
629
|
delete, moderators, management, live-chat, async_job, ids
|
|
633
630
|
"""
|
|
@@ -640,17 +637,17 @@ class YoutubeApp(APIApplication):
|
|
|
640
637
|
def delete_videos(self, id=None, onBehalfOfContentOwner=None) -> Any:
|
|
641
638
|
"""
|
|
642
639
|
Deletes a specified YouTube video using its unique ID. The operation can be performed on behalf of a content owner by sending an HTTP DELETE request to the `/videos` endpoint. It's distinct from other video functions that only modify or retrieve metadata, like rating or abuse reports.
|
|
643
|
-
|
|
640
|
+
|
|
644
641
|
Args:
|
|
645
642
|
id: (str, optional): Unique identifier of the video to delete. If omitted, no video ID is specified.
|
|
646
643
|
onBehalfOfContentOwner: (str, optional): Content owner on whose behalf the operation is performed. Defaults to authenticated user.
|
|
647
|
-
|
|
644
|
+
|
|
648
645
|
Returns:
|
|
649
646
|
(Any): Parsed JSON response from the API including deletion status/errors.
|
|
650
|
-
|
|
647
|
+
|
|
651
648
|
Raises:
|
|
652
649
|
requests.HTTPError: Raised when the API request fails (e.g., invalid video ID, insufficient permissions).
|
|
653
|
-
|
|
650
|
+
|
|
654
651
|
Tags:
|
|
655
652
|
delete, video-management, api, async_job
|
|
656
653
|
"""
|
|
@@ -667,17 +664,17 @@ class YoutubeApp(APIApplication):
|
|
|
667
664
|
def get_video_ratings(self, id=None, onBehalfOfContentOwner=None) -> Any:
|
|
668
665
|
"""
|
|
669
666
|
Retrieves the authenticated user's rating (e.g., 'like', 'dislike') for specified videos. This function fetches existing rating data, distinct from `add_videos_rate` which submits a new rating, and can be performed on behalf of a content owner.
|
|
670
|
-
|
|
667
|
+
|
|
671
668
|
Args:
|
|
672
669
|
id: Optional; The ID of the video for which the rating is to be retrieved. If None, no specific video ID is used in the request.
|
|
673
670
|
onBehalfOfContentOwner: Optional; Identifies the content owner for whom the request is being made.
|
|
674
|
-
|
|
671
|
+
|
|
675
672
|
Returns:
|
|
676
673
|
A JSON object containing the video rating information returned by the API.
|
|
677
|
-
|
|
674
|
+
|
|
678
675
|
Raises:
|
|
679
676
|
HTTPError: Raised if the HTTP request returns an unsuccessful status code.
|
|
680
|
-
|
|
677
|
+
|
|
681
678
|
Tags:
|
|
682
679
|
check, video-management
|
|
683
680
|
"""
|
|
@@ -694,17 +691,17 @@ class YoutubeApp(APIApplication):
|
|
|
694
691
|
def rate_video(self, id=None, rating=None) -> Any:
|
|
695
692
|
"""
|
|
696
693
|
Submits a rating (e.g., 'like', 'dislike') for a video specified by its unique ID. This function sends a POST request to the YouTube API's `/videos/rate` endpoint and returns the server's JSON response upon successful submission.
|
|
697
|
-
|
|
694
|
+
|
|
698
695
|
Args:
|
|
699
696
|
id: Optional; The unique identifier of the video to rate. If None, the video ID is not included in the request.
|
|
700
697
|
rating: Optional; The rating value to assign to the video. If None, the rating is not included in the request.
|
|
701
|
-
|
|
698
|
+
|
|
702
699
|
Returns:
|
|
703
700
|
The JSON response from the server after submitting the rating.
|
|
704
|
-
|
|
701
|
+
|
|
705
702
|
Raises:
|
|
706
703
|
HTTPError: Raised when the server returns an HTTP error status.
|
|
707
|
-
|
|
704
|
+
|
|
708
705
|
Tags:
|
|
709
706
|
rate, video-management, importance
|
|
710
707
|
"""
|
|
@@ -719,16 +716,16 @@ class YoutubeApp(APIApplication):
|
|
|
719
716
|
def report_video_for_abuse(self, onBehalfOfContentOwner=None) -> Any:
|
|
720
717
|
"""
|
|
721
718
|
Reports a video for abuse via a POST request to the YouTube API. An optional parameter allows a content owner to submit the report on behalf of their account, flagging potentially inappropriate content for review by YouTube.
|
|
722
|
-
|
|
719
|
+
|
|
723
720
|
Args:
|
|
724
721
|
onBehalfOfContentOwner: Optional; YouTube content owner ID acting as the reporting entity (for partner accounts).
|
|
725
|
-
|
|
722
|
+
|
|
726
723
|
Returns:
|
|
727
724
|
Dict containing the JSON response from the YouTube API after reporting abuse.
|
|
728
|
-
|
|
725
|
+
|
|
729
726
|
Raises:
|
|
730
727
|
HTTPError: Raised when the YouTube API request fails, typically due to authentication errors or invalid parameters.
|
|
731
|
-
|
|
728
|
+
|
|
732
729
|
Tags:
|
|
733
730
|
report, abuse, video, content, api
|
|
734
731
|
"""
|
|
@@ -745,17 +742,17 @@ class YoutubeApp(APIApplication):
|
|
|
745
742
|
def set_channel_watermark(self, channelId=None, onBehalfOfContentOwner=None) -> Any:
|
|
746
743
|
"""
|
|
747
744
|
Sets a branding watermark on a specified YouTube channel. The operation targets the channel using its ID and can be executed on behalf of a content owner. This function contrasts with `add_watermarks_unset`, which removes the watermark.
|
|
748
|
-
|
|
745
|
+
|
|
749
746
|
Args:
|
|
750
747
|
channelId: Optional; The ID of the YouTube channel on which to set the watermark.
|
|
751
748
|
onBehalfOfContentOwner: Optional; The content owner's ID that the request is made on behalf of.
|
|
752
|
-
|
|
749
|
+
|
|
753
750
|
Returns:
|
|
754
751
|
The JSON response from the API call, which includes details about the watermark setting operation.
|
|
755
|
-
|
|
752
|
+
|
|
756
753
|
Raises:
|
|
757
754
|
requests.RequestException: Raised if there is an error with the API request, such as connection issues or invalid response status.
|
|
758
|
-
|
|
755
|
+
|
|
759
756
|
Tags:
|
|
760
757
|
watermark, youtube, management, channel-config
|
|
761
758
|
"""
|
|
@@ -772,20 +769,22 @@ class YoutubeApp(APIApplication):
|
|
|
772
769
|
response.raise_for_status()
|
|
773
770
|
return response.json()
|
|
774
771
|
|
|
775
|
-
def unset_channel_watermark(
|
|
772
|
+
def unset_channel_watermark(
|
|
773
|
+
self, channelId=None, onBehalfOfContentOwner=None
|
|
774
|
+
) -> Any:
|
|
776
775
|
"""
|
|
777
776
|
Removes the branding watermark for a specified YouTube channel via an API POST request. This operation, the inverse of `add_watermarks_set`, can be executed on behalf of a content owner to unset the channel's current watermark.
|
|
778
|
-
|
|
777
|
+
|
|
779
778
|
Args:
|
|
780
779
|
channelId: Optional; The unique identifier of the YouTube channel from which to remove watermarks.
|
|
781
780
|
onBehalfOfContentOwner: Optional; The content owner that the request is on behalf of, used by YouTube content partners.
|
|
782
|
-
|
|
781
|
+
|
|
783
782
|
Returns:
|
|
784
783
|
The JSON response from the YouTube API after attempting to remove the watermarks.
|
|
785
|
-
|
|
784
|
+
|
|
786
785
|
Raises:
|
|
787
786
|
HTTPError: Raised when there is an error in the HTTP request or if the server returns a status code indicating a client or server error.
|
|
788
|
-
|
|
787
|
+
|
|
789
788
|
Tags:
|
|
790
789
|
remove, watermark, youtube
|
|
791
790
|
"""
|
|
@@ -816,7 +815,7 @@ class YoutubeApp(APIApplication):
|
|
|
816
815
|
) -> Any:
|
|
817
816
|
"""
|
|
818
817
|
Retrieves a list of YouTube activities, such as video uploads or social posts. Supports filtering by channel, authenticated user's feed, publication date, and region. The function also handles pagination to navigate through large result sets and returns the JSON response from the API.
|
|
819
|
-
|
|
818
|
+
|
|
820
819
|
Args:
|
|
821
820
|
channelId: The YouTube channel ID to fetch activities from. If None, fetches from multiple sources (depending on other parameters).
|
|
822
821
|
home: If True, retrieves activities from the user's personalized YouTube home feed. Requires authentication if mine is not specified.
|
|
@@ -827,13 +826,13 @@ class YoutubeApp(APIApplication):
|
|
|
827
826
|
publishedAfter: Filter activities published after this datetime (ISO 8601 format).
|
|
828
827
|
publishedBefore: Filter activities published before this datetime (ISO 8601 format).
|
|
829
828
|
regionCode: Return activities viewable in the specified two-letter ISO country code.
|
|
830
|
-
|
|
829
|
+
|
|
831
830
|
Returns:
|
|
832
831
|
Dictionary containing parsed JSON response with activity data.
|
|
833
|
-
|
|
832
|
+
|
|
834
833
|
Raises:
|
|
835
834
|
requests.HTTPError: Raised when the API request fails due to invalid parameters, authentication issues, or server errors.
|
|
836
|
-
|
|
835
|
+
|
|
837
836
|
Tags:
|
|
838
837
|
retrieve, activities, youtube, api-client, pagination, filter, async
|
|
839
838
|
"""
|
|
@@ -857,22 +856,20 @@ class YoutubeApp(APIApplication):
|
|
|
857
856
|
response.raise_for_status()
|
|
858
857
|
return response.json()
|
|
859
858
|
|
|
860
|
-
def insert_channel_banner(
|
|
861
|
-
self, channelId=None, onBehalfOfContentOwner=None
|
|
862
|
-
) -> Any:
|
|
859
|
+
def insert_channel_banner(self, channelId=None, onBehalfOfContentOwner=None) -> Any:
|
|
863
860
|
"""
|
|
864
861
|
Uploads and sets a new banner image for a specified YouTube channel. This function makes a POST request to the `/channelBanners/insert` endpoint, optionally on behalf of a content owner, and returns details of the newly created banner.
|
|
865
|
-
|
|
862
|
+
|
|
866
863
|
Args:
|
|
867
864
|
channelId: Optional string specifying the unique identifier of the YouTube channel for banner insertion
|
|
868
865
|
onBehalfOfContentOwner: Optional string indicating the content owner's external ID when acting on their behalf
|
|
869
|
-
|
|
866
|
+
|
|
870
867
|
Returns:
|
|
871
868
|
JSON object containing the API response with details of the newly inserted channel banner
|
|
872
|
-
|
|
869
|
+
|
|
873
870
|
Raises:
|
|
874
871
|
HTTPError: Raised when the YouTube Data API request fails (4XX or 5XX status code)
|
|
875
|
-
|
|
872
|
+
|
|
876
873
|
Tags:
|
|
877
874
|
insert, channel, banner, youtube-api, management, async_job
|
|
878
875
|
"""
|
|
@@ -892,17 +889,17 @@ class YoutubeApp(APIApplication):
|
|
|
892
889
|
def delete_channel_sections(self, id=None, onBehalfOfContentOwner=None) -> Any:
|
|
893
890
|
"""
|
|
894
891
|
Deletes a YouTube channel section by its unique ID via an API request. The operation can be performed on behalf of a content owner for delegated management, returning a JSON response upon success or raising an HTTPError for failures like invalid IDs or insufficient permissions.
|
|
895
|
-
|
|
892
|
+
|
|
896
893
|
Args:
|
|
897
894
|
id: Optional string representing the unique identifier of the target channel section. If omitted, no specific deletion occurs (behavior depends on API implementation).
|
|
898
895
|
onBehalfOfContentOwner: Optional string indicating the content owner on whose behalf the request is made.
|
|
899
|
-
|
|
896
|
+
|
|
900
897
|
Returns:
|
|
901
898
|
JSON-decoded response payload from the API server after deletion attempt.
|
|
902
|
-
|
|
899
|
+
|
|
903
900
|
Raises:
|
|
904
901
|
requests.HTTPError: Raised for HTTP 4xx/5xx responses from the server during the deletion request.
|
|
905
|
-
|
|
902
|
+
|
|
906
903
|
Tags:
|
|
907
904
|
delete, channel-section, management
|
|
908
905
|
"""
|
|
@@ -932,7 +929,7 @@ class YoutubeApp(APIApplication):
|
|
|
932
929
|
) -> Any:
|
|
933
930
|
"""
|
|
934
931
|
Retrieves channel data from the YouTube API using specific filters like ID, username, or ownership status (`mine`, `managedByMe`). The function supports pagination and localization, returning a JSON object containing details for the targeted channels.
|
|
935
|
-
|
|
932
|
+
|
|
936
933
|
Args:
|
|
937
934
|
categoryId: Category ID to filter channels.
|
|
938
935
|
forUsername: Username to retrieve channels for.
|
|
@@ -945,13 +942,13 @@ class YoutubeApp(APIApplication):
|
|
|
945
942
|
onBehalfOfContentOwner: Content owner ID to retrieve channels on behalf of.
|
|
946
943
|
pageToken: Token for pagination.
|
|
947
944
|
part: Specified parts of the channel resource to include in the response.
|
|
948
|
-
|
|
945
|
+
|
|
949
946
|
Returns:
|
|
950
947
|
JSON response containing the requested channels.
|
|
951
|
-
|
|
948
|
+
|
|
952
949
|
Raises:
|
|
953
950
|
ResponseError: Raised if there is an error in the HTTP response.
|
|
954
|
-
|
|
951
|
+
|
|
955
952
|
Tags:
|
|
956
953
|
search, youtube, channels, management, important
|
|
957
954
|
"""
|
|
@@ -993,7 +990,7 @@ class YoutubeApp(APIApplication):
|
|
|
993
990
|
) -> Any:
|
|
994
991
|
"""
|
|
995
992
|
Retrieves YouTube comment threads using filters like channel ID, video ID, or search terms. It supports pagination and sorting, serving as the primary method for fetching comment data, distinct from other functions in the script that moderate or delete individual comments.
|
|
996
|
-
|
|
993
|
+
|
|
997
994
|
Args:
|
|
998
995
|
allThreadsRelatedToChannelId: Returns all threads associated with the specified channel, including replies
|
|
999
996
|
channelId: Channel ID to filter comment threads
|
|
@@ -1006,13 +1003,13 @@ class YoutubeApp(APIApplication):
|
|
|
1006
1003
|
searchTerms: Text search query to filter comments
|
|
1007
1004
|
textFormat: Formatting for comment text (e.g., 'html', 'plainText')
|
|
1008
1005
|
videoId: Video ID to filter associated comment threads
|
|
1009
|
-
|
|
1006
|
+
|
|
1010
1007
|
Returns:
|
|
1011
1008
|
JSON response containing comment thread data and pagination information
|
|
1012
|
-
|
|
1009
|
+
|
|
1013
1010
|
Raises:
|
|
1014
1011
|
HTTPError: Raised for unsuccessful API requests (4xx/5xx status codes)
|
|
1015
|
-
|
|
1012
|
+
|
|
1016
1013
|
Tags:
|
|
1017
1014
|
retrieve, comments, pagination, youtube-api, rest, data-fetch
|
|
1018
1015
|
"""
|
|
@@ -1043,19 +1040,19 @@ class YoutubeApp(APIApplication):
|
|
|
1043
1040
|
) -> Any:
|
|
1044
1041
|
"""
|
|
1045
1042
|
Fetches a list of fan funding events from the YouTube API for the authenticated user's channel. Supports pagination, localization, and partial responses to retrieve customized event data like Super Chat or Super Stickers based on specified filter criteria and response parts.
|
|
1046
|
-
|
|
1043
|
+
|
|
1047
1044
|
Args:
|
|
1048
1045
|
hl: Optional; a string representing the language for text values.
|
|
1049
1046
|
maxResults: Optional; an integer specifying the maximum number of results to return.
|
|
1050
1047
|
pageToken: Optional; a string token to retrieve a specific page in a paginated set of results.
|
|
1051
1048
|
part: Optional; a comma-separated list of one or more 'fanFundingEvent' resource properties that the API response will include.
|
|
1052
|
-
|
|
1049
|
+
|
|
1053
1050
|
Returns:
|
|
1054
1051
|
A JSON-decoded response of the fan funding events data retrieved from the API.
|
|
1055
|
-
|
|
1052
|
+
|
|
1056
1053
|
Raises:
|
|
1057
1054
|
HTTPError: Raised if the API request returns a status code that indicates an error.
|
|
1058
|
-
|
|
1055
|
+
|
|
1059
1056
|
Tags:
|
|
1060
1057
|
retrieve, events, fanfunding
|
|
1061
1058
|
"""
|
|
@@ -1077,19 +1074,19 @@ class YoutubeApp(APIApplication):
|
|
|
1077
1074
|
def get_guide_categories(self, hl=None, id=None, part=None, regionCode=None) -> Any:
|
|
1078
1075
|
"""
|
|
1079
1076
|
Retrieves a list of official YouTube guide categories (e.g., Music, Sports). This function queries the `/guideCategories` endpoint, allowing results to be filtered by ID or region and localized for a specific language. These are distinct from the categories assigned to individual videos.
|
|
1080
|
-
|
|
1077
|
+
|
|
1081
1078
|
Args:
|
|
1082
1079
|
hl: Optional; a string that specifies the language localization.
|
|
1083
1080
|
id: Optional; a string representing the ID of the guide category.
|
|
1084
1081
|
part: Optional; a string indicating which parts of the guide category resource to return.
|
|
1085
1082
|
regionCode: Optional; a string that denotes the region of interest.
|
|
1086
|
-
|
|
1083
|
+
|
|
1087
1084
|
Returns:
|
|
1088
1085
|
A dictionary containing the JSON response representing guide categories from the service.
|
|
1089
|
-
|
|
1086
|
+
|
|
1090
1087
|
Raises:
|
|
1091
1088
|
requests.exceptions.HTTPError: Raised if the HTTP request returns an unsuccessful status code.
|
|
1092
|
-
|
|
1089
|
+
|
|
1093
1090
|
Tags:
|
|
1094
1091
|
get, fetch, guide-categories, api-call
|
|
1095
1092
|
"""
|
|
@@ -1111,17 +1108,17 @@ class YoutubeApp(APIApplication):
|
|
|
1111
1108
|
def get_i18n_languages(self, hl=None, part=None) -> Any:
|
|
1112
1109
|
"""
|
|
1113
1110
|
Retrieves a list of supported internationalization (i18n) languages from the YouTube API's `/i18nLanguages` endpoint. It can optionally localize the language names in the response. This function is distinct from `get_regions`, which fetches supported geographical regions.
|
|
1114
|
-
|
|
1111
|
+
|
|
1115
1112
|
Args:
|
|
1116
1113
|
hl: Optional language code to localize returned language names (e.g., 'en' for English).
|
|
1117
1114
|
part: Optional comma-separated list of i18nLanguage resource properties to include in response.
|
|
1118
|
-
|
|
1115
|
+
|
|
1119
1116
|
Returns:
|
|
1120
1117
|
JSON object containing API response with supported languages data.
|
|
1121
|
-
|
|
1118
|
+
|
|
1122
1119
|
Raises:
|
|
1123
1120
|
HTTPError: Raised for unsuccessful API requests (4XX/5XX status codes).
|
|
1124
|
-
|
|
1121
|
+
|
|
1125
1122
|
Tags:
|
|
1126
1123
|
fetch, i18n, languages, api-client
|
|
1127
1124
|
"""
|
|
@@ -1134,17 +1131,17 @@ class YoutubeApp(APIApplication):
|
|
|
1134
1131
|
def get_i18n_regions(self, hl=None, part=None) -> Any:
|
|
1135
1132
|
"""
|
|
1136
1133
|
Fetches a list of geographic regions supported by the YouTube API for content localization. It can localize region names using the 'hl' parameter. This is distinct from get_languages, which retrieves supported languages, not geographic areas.
|
|
1137
|
-
|
|
1134
|
+
|
|
1138
1135
|
Args:
|
|
1139
1136
|
hl: Optional string representing language code for regional localization.
|
|
1140
1137
|
part: Optional comma-separated string specifying i18nRegion resource parts to include.
|
|
1141
|
-
|
|
1138
|
+
|
|
1142
1139
|
Returns:
|
|
1143
1140
|
JSON response containing i18n regions data.
|
|
1144
|
-
|
|
1141
|
+
|
|
1145
1142
|
Raises:
|
|
1146
1143
|
HTTPError: If the API request fails with a 4XX/5XX status code.
|
|
1147
|
-
|
|
1144
|
+
|
|
1148
1145
|
Tags:
|
|
1149
1146
|
list, regions, i18n, api
|
|
1150
1147
|
"""
|
|
@@ -1159,18 +1156,18 @@ class YoutubeApp(APIApplication):
|
|
|
1159
1156
|
) -> Any:
|
|
1160
1157
|
"""
|
|
1161
1158
|
Deletes one or more YouTube livestreams by ID via the `/liveStreams` API endpoint, optionally on behalf of a content owner. This function is distinct from `delete_live_broadcasts`, which targets a different live video resource, and returns the server's JSON response upon successful deletion.
|
|
1162
|
-
|
|
1159
|
+
|
|
1163
1160
|
Args:
|
|
1164
1161
|
id: Optional; A comma-separated list of YouTube livestream IDs to be deleted.
|
|
1165
1162
|
onBehalfOfContentOwner: Optional; The YouTube content owner who is the channel owner of the livestream and makes this API call.
|
|
1166
1163
|
onBehalfOfContentOwnerChannel: Optional; The YouTube channel ID on behalf of which the API call is made.
|
|
1167
|
-
|
|
1164
|
+
|
|
1168
1165
|
Returns:
|
|
1169
1166
|
A JSON object containing the API's response to the delete request.
|
|
1170
|
-
|
|
1167
|
+
|
|
1171
1168
|
Raises:
|
|
1172
1169
|
requests.HTTPError: Raised when the HTTP request returns an unsuccessful status code.
|
|
1173
|
-
|
|
1170
|
+
|
|
1174
1171
|
Tags:
|
|
1175
1172
|
delete, livestream, youtube, api
|
|
1176
1173
|
"""
|
|
@@ -1191,17 +1188,17 @@ class YoutubeApp(APIApplication):
|
|
|
1191
1188
|
def delete_playlist_items(self, id=None, onBehalfOfContentOwner=None) -> Any:
|
|
1192
1189
|
"""
|
|
1193
1190
|
Deletes one or more YouTube playlist items by their unique IDs. The operation can be performed on behalf of a content owner for delegated authorization, sending a DELETE request to the `/playlistItems` endpoint and returning the server's response.
|
|
1194
|
-
|
|
1191
|
+
|
|
1195
1192
|
Args:
|
|
1196
1193
|
id: Optional; The ID of the playlist item to be deleted.
|
|
1197
1194
|
onBehalfOfContentOwner: Optional; The content owner on whose behalf the playlist item is being deleted.
|
|
1198
|
-
|
|
1195
|
+
|
|
1199
1196
|
Returns:
|
|
1200
1197
|
JSON response from the server indicating the result of the deletion operation.
|
|
1201
|
-
|
|
1198
|
+
|
|
1202
1199
|
Raises:
|
|
1203
1200
|
HTTPError: Raised if the API request fails due to invalid parameters, authorization issues, or server errors.
|
|
1204
|
-
|
|
1201
|
+
|
|
1205
1202
|
Tags:
|
|
1206
1203
|
delete, playlist-items, management
|
|
1207
1204
|
"""
|
|
@@ -1218,17 +1215,17 @@ class YoutubeApp(APIApplication):
|
|
|
1218
1215
|
def delete_playlists(self, id=None, onBehalfOfContentOwner=None) -> Any:
|
|
1219
1216
|
"""
|
|
1220
1217
|
Deletes a YouTube playlist by its unique ID via a DELETE request to the API. The operation can be performed on behalf of a specific content owner for delegated management. This function targets the entire playlist, distinct from `delete_play_list_items` which removes individual videos from a playlist.
|
|
1221
|
-
|
|
1218
|
+
|
|
1222
1219
|
Args:
|
|
1223
1220
|
id: Optional; A string representing the ID of the playlist to delete. If None, operation details depend on API implementation (not recommended without explicit identifier).
|
|
1224
1221
|
onBehalfOfContentOwner: Optional; A string representing the content owner on whose behalf the operation is performed. Used for delegated access.
|
|
1225
|
-
|
|
1222
|
+
|
|
1226
1223
|
Returns:
|
|
1227
1224
|
Dictionary containing the JSON response from the YouTube API after playlist deletion.
|
|
1228
|
-
|
|
1225
|
+
|
|
1229
1226
|
Raises:
|
|
1230
1227
|
HTTPError: Raised when the API request fails, typically due to invalid permissions, non-existent playlist, or network issues.
|
|
1231
|
-
|
|
1228
|
+
|
|
1232
1229
|
Tags:
|
|
1233
1230
|
delete, playlists, youtube-api, management
|
|
1234
1231
|
"""
|
|
@@ -1278,7 +1275,7 @@ class YoutubeApp(APIApplication):
|
|
|
1278
1275
|
) -> Any:
|
|
1279
1276
|
"""
|
|
1280
1277
|
Performs a versatile search on YouTube for videos, channels, or playlists. This function supports extensive filters, including keywords, publication dates, location, and specific video attributes like category or duration, returning a paginated list of matching resources from the YouTube Data API.
|
|
1281
|
-
|
|
1278
|
+
|
|
1282
1279
|
Args:
|
|
1283
1280
|
channelId: Channel filter for the search.
|
|
1284
1281
|
channelType: Type of channel to filter by.
|
|
@@ -1311,13 +1308,13 @@ class YoutubeApp(APIApplication):
|
|
|
1311
1308
|
videoLicense: License filter for videos.
|
|
1312
1309
|
videoSyndicated: Whether videos are syndicated.
|
|
1313
1310
|
videoType: Type of video (e.g., 'movie', 'episode')
|
|
1314
|
-
|
|
1311
|
+
|
|
1315
1312
|
Returns:
|
|
1316
1313
|
JSON response containing the search results.
|
|
1317
|
-
|
|
1314
|
+
|
|
1318
1315
|
Raises:
|
|
1319
1316
|
HTTPError: If the request to the YouTube Data API fails.
|
|
1320
|
-
|
|
1317
|
+
|
|
1321
1318
|
Tags:
|
|
1322
1319
|
search, youtube-api, video-search, web-api, important
|
|
1323
1320
|
"""
|
|
@@ -1368,19 +1365,19 @@ class YoutubeApp(APIApplication):
|
|
|
1368
1365
|
) -> Any:
|
|
1369
1366
|
"""
|
|
1370
1367
|
Retrieves a list of sponsors for the authenticated user's YouTube channel. This function supports filtering, pagination, and specifying which resource parts to include in the response, allowing for flexible and customized data fetching of sponsor information.
|
|
1371
|
-
|
|
1368
|
+
|
|
1372
1369
|
Args:
|
|
1373
1370
|
filter: Optional string containing filtering criteria for sponsors.
|
|
1374
1371
|
maxResults: Optional integer limiting the number of returned sponsors.
|
|
1375
1372
|
pageToken: Optional token string for paginating to a specific result page.
|
|
1376
1373
|
part: Optional string specifying which sponsor detail parts to include.
|
|
1377
|
-
|
|
1374
|
+
|
|
1378
1375
|
Returns:
|
|
1379
1376
|
JSON response containing the list of sponsors (filtered/paginated) as returned by the server.
|
|
1380
|
-
|
|
1377
|
+
|
|
1381
1378
|
Raises:
|
|
1382
1379
|
requests.HTTPError: If the HTTP request fails or returns a non-200 status code.
|
|
1383
|
-
|
|
1380
|
+
|
|
1384
1381
|
Tags:
|
|
1385
1382
|
fetch, list, pagination, filter, sponsors, api
|
|
1386
1383
|
"""
|
|
@@ -1402,16 +1399,16 @@ class YoutubeApp(APIApplication):
|
|
|
1402
1399
|
def delete_subscriptions(self, id=None) -> Any:
|
|
1403
1400
|
"""
|
|
1404
1401
|
Deletes a specific YouTube channel subscription identified by its unique ID. This function sends a DELETE request to the `/subscriptions` API endpoint and returns the server's JSON response, confirming the operation's success or failure.
|
|
1405
|
-
|
|
1402
|
+
|
|
1406
1403
|
Args:
|
|
1407
1404
|
id: Optional identifier for a specific subscription to delete (str, int, or None). If None, deletes all subscriptions.
|
|
1408
|
-
|
|
1405
|
+
|
|
1409
1406
|
Returns:
|
|
1410
1407
|
JSON-formatted response from the API containing deletion results.
|
|
1411
|
-
|
|
1408
|
+
|
|
1412
1409
|
Raises:
|
|
1413
1410
|
HTTPError: Raised for HTTP request failures (4XX/5XX status codes) during the deletion attempt.
|
|
1414
|
-
|
|
1411
|
+
|
|
1415
1412
|
Tags:
|
|
1416
1413
|
delete, subscriptions, async-job, management
|
|
1417
1414
|
"""
|
|
@@ -1426,19 +1423,19 @@ class YoutubeApp(APIApplication):
|
|
|
1426
1423
|
) -> Any:
|
|
1427
1424
|
"""
|
|
1428
1425
|
Retrieves a paginated list of Super Chat events from the YouTube Data API. Allows for localization and specifying which resource parts to include in the response. This function is distinct from `get_fanfundingevents`, which fetches a different type of monetary contribution event.
|
|
1429
|
-
|
|
1426
|
+
|
|
1430
1427
|
Args:
|
|
1431
1428
|
hl: Optional; the language code to select localized resource information.
|
|
1432
1429
|
maxResults: Optional; the maximum number of items that should be returned in the result set.
|
|
1433
1430
|
pageToken: Optional; the token to identify a specific page in the result set.
|
|
1434
1431
|
part: Optional; the parameter specifying which super chat event resource parts to include in the response.
|
|
1435
|
-
|
|
1432
|
+
|
|
1436
1433
|
Returns:
|
|
1437
1434
|
A JSON object containing the super chat events data returned by the YouTube API.
|
|
1438
|
-
|
|
1435
|
+
|
|
1439
1436
|
Raises:
|
|
1440
1437
|
RequestException: Raised if there is an issue with the HTTP request, such as network or server errors.
|
|
1441
|
-
|
|
1438
|
+
|
|
1442
1439
|
Tags:
|
|
1443
1440
|
fetch, youtube-api, async-job
|
|
1444
1441
|
"""
|
|
@@ -1460,17 +1457,17 @@ class YoutubeApp(APIApplication):
|
|
|
1460
1457
|
def set_video_thumbnail(self, onBehalfOfContentOwner=None, videoId=None) -> Any:
|
|
1461
1458
|
"""
|
|
1462
1459
|
Sets a custom thumbnail for a specified YouTube video via a POST request to the `/thumbnails/set` API endpoint. The operation can be performed on behalf of a content owner for delegated management of video assets.
|
|
1463
|
-
|
|
1460
|
+
|
|
1464
1461
|
Args:
|
|
1465
1462
|
onBehalfOfContentOwner: Optional; str. The YouTube content owner ID on whose behalf the request is being made.
|
|
1466
1463
|
videoId: Optional; str. The ID of the video for which the thumbnails are being set.
|
|
1467
|
-
|
|
1464
|
+
|
|
1468
1465
|
Returns:
|
|
1469
1466
|
dict. The response from the YouTube API as a JSON object, containing details of the updated video thumbnail.
|
|
1470
|
-
|
|
1467
|
+
|
|
1471
1468
|
Raises:
|
|
1472
1469
|
HTTPError: Raised if the HTTP request returns an unsuccessful status code.
|
|
1473
|
-
|
|
1470
|
+
|
|
1474
1471
|
Tags:
|
|
1475
1472
|
thumbnail, youtube-api, video-management, async-job
|
|
1476
1473
|
"""
|
|
@@ -1490,17 +1487,17 @@ class YoutubeApp(APIApplication):
|
|
|
1490
1487
|
def get_video_abuse_report_reasons(self, hl=None, part=None) -> Any:
|
|
1491
1488
|
"""
|
|
1492
1489
|
Retrieves a list of valid reasons (e.g., spam, hate speech) for reporting abusive video content. Supports response localization using a language code (`hl`) and allows filtering which parts of the reason resource (e.g., ID, snippet) are returned, providing metadata before submitting a report.
|
|
1493
|
-
|
|
1490
|
+
|
|
1494
1491
|
Args:
|
|
1495
1492
|
hl: Optional BCP-47 language code for localizing the response (e.g., 'en' or 'fr').
|
|
1496
1493
|
part: Optional parameter specifying which parts of the abuse report reasons to include in the response (e.g., 'id' or 'snippet').
|
|
1497
|
-
|
|
1494
|
+
|
|
1498
1495
|
Returns:
|
|
1499
1496
|
A JSON object containing the list of video abuse report reasons, or filtered parts if specified.
|
|
1500
|
-
|
|
1497
|
+
|
|
1501
1498
|
Raises:
|
|
1502
1499
|
requests.RequestException: Raised if there is a problem with the HTTP request (e.g., network issues or invalid response).
|
|
1503
|
-
|
|
1500
|
+
|
|
1504
1501
|
Tags:
|
|
1505
1502
|
fetch, management, abuse-report, video-content
|
|
1506
1503
|
"""
|
|
@@ -1513,19 +1510,19 @@ class YoutubeApp(APIApplication):
|
|
|
1513
1510
|
def get_video_categories(self, hl=None, id=None, part=None, regionCode=None) -> Any:
|
|
1514
1511
|
"""
|
|
1515
1512
|
Retrieves official YouTube video categories used for classifying uploaded videos, allowing filtering by ID, region, or language. This is distinct from `get_guecategories`, which fetches channel browsing guides, not categories for individual video uploads.
|
|
1516
|
-
|
|
1513
|
+
|
|
1517
1514
|
Args:
|
|
1518
1515
|
hl: Optional; the language code (e.g., 'en') for localized video category names
|
|
1519
1516
|
id: Optional; comma-separated list of video category IDs to filter results
|
|
1520
1517
|
part: Optional; list of properties (e.g., 'snippet') to include in the response
|
|
1521
1518
|
regionCode: Optional; ISO 3166-1 alpha-2 country code to filter region-specific categories
|
|
1522
|
-
|
|
1519
|
+
|
|
1523
1520
|
Returns:
|
|
1524
1521
|
Dictionary containing parsed JSON response with video category details
|
|
1525
|
-
|
|
1522
|
+
|
|
1526
1523
|
Raises:
|
|
1527
1524
|
requests.HTTPError: Raised when the API request fails with a non-success status code
|
|
1528
|
-
|
|
1525
|
+
|
|
1529
1526
|
Tags:
|
|
1530
1527
|
fetch, video-categories, api-request, json-response
|
|
1531
1528
|
"""
|
|
@@ -1547,17 +1544,17 @@ class YoutubeApp(APIApplication):
|
|
|
1547
1544
|
def delete_group_items(self, id=None, onBehalfOfContentOwner=None) -> Any:
|
|
1548
1545
|
"""
|
|
1549
1546
|
Deletes specified items from a YouTube Analytics group via an API request. An item can be targeted by its unique ID, and the action can be performed on behalf of a content owner. This function is distinct from `delete_groups`, which removes the entire group.
|
|
1550
|
-
|
|
1547
|
+
|
|
1551
1548
|
Args:
|
|
1552
1549
|
id: Optional; A string that identifies the group item to be deleted. If not provided, all group items may be affected depending on other parameters.
|
|
1553
1550
|
onBehalfOfContentOwner: Optional; A string representing the content owner on whose behalf the request is being made.
|
|
1554
|
-
|
|
1551
|
+
|
|
1555
1552
|
Returns:
|
|
1556
1553
|
A JSON object containing the response from the deletion request.
|
|
1557
|
-
|
|
1554
|
+
|
|
1558
1555
|
Raises:
|
|
1559
1556
|
HTTPError: Raised if the HTTP request returns an unsuccessful status code.
|
|
1560
|
-
|
|
1557
|
+
|
|
1561
1558
|
Tags:
|
|
1562
1559
|
delete, groupitems, management
|
|
1563
1560
|
"""
|
|
@@ -1574,17 +1571,17 @@ class YoutubeApp(APIApplication):
|
|
|
1574
1571
|
def delete_groups(self, id=None, onBehalfOfContentOwner=None) -> Any:
|
|
1575
1572
|
"""
|
|
1576
1573
|
Deletes a YouTube group by its ID via an API request, optionally on behalf of a content owner. Unlike `delete_groupitems`, which only removes an item from a group, this function deletes the entire group entity.
|
|
1577
|
-
|
|
1574
|
+
|
|
1578
1575
|
Args:
|
|
1579
1576
|
id: Optional unique identifier for the group to delete. If None, no specific group targeted.
|
|
1580
1577
|
onBehalfOfContentOwner: Optional content owner ID for delegated authorization.
|
|
1581
|
-
|
|
1578
|
+
|
|
1582
1579
|
Returns:
|
|
1583
1580
|
JSON-decoded response indicating operation success/failure.
|
|
1584
|
-
|
|
1581
|
+
|
|
1585
1582
|
Raises:
|
|
1586
1583
|
requests.exceptions.HTTPError: Raised for invalid requests, authentication failures, or server errors during deletion.
|
|
1587
|
-
|
|
1584
|
+
|
|
1588
1585
|
Tags:
|
|
1589
1586
|
delete, management, async_job, api
|
|
1590
1587
|
"""
|
|
@@ -1613,7 +1610,7 @@ class YoutubeApp(APIApplication):
|
|
|
1613
1610
|
) -> Any:
|
|
1614
1611
|
"""
|
|
1615
1612
|
Queries the YouTube Analytics API for performance reports, allowing customization via metrics, dimensions, and filters. Unlike `get_jobs_job_reports` which manages bulk report jobs, this function fetches analytical data directly, providing on-demand insights into channel or content performance.
|
|
1616
|
-
|
|
1613
|
+
|
|
1617
1614
|
Args:
|
|
1618
1615
|
currency: Optional; specifies the currency format for monetary values in the report
|
|
1619
1616
|
dimensions: Optional; list of dimensions (e.g., 'country', 'device') to include in report breakdowns
|
|
@@ -1625,13 +1622,13 @@ class YoutubeApp(APIApplication):
|
|
|
1625
1622
|
metrics: Optional; list of measurable values to include (e.g., 'clicks', 'conversions')
|
|
1626
1623
|
sort: Optional; criteria for sorting results (e.g., '-clicks' for descending order)
|
|
1627
1624
|
start: Optional; start date (YYYY-MM-DD format) for the report data range
|
|
1628
|
-
|
|
1625
|
+
|
|
1629
1626
|
Returns:
|
|
1630
1627
|
Report data as parsed JSON from the API response
|
|
1631
|
-
|
|
1628
|
+
|
|
1632
1629
|
Raises:
|
|
1633
1630
|
requests.exceptions.HTTPError: Raised when the API request fails due to invalid parameters, authentication issues, or server errors
|
|
1634
|
-
|
|
1631
|
+
|
|
1635
1632
|
Tags:
|
|
1636
1633
|
fetch, report, api, filter, sort, metrics, management
|
|
1637
1634
|
"""
|