forked from DefinitelyTyped/DefinitelyTyped
-
Notifications
You must be signed in to change notification settings - Fork 0
/
gapi.youtube.d.ts
2337 lines (2266 loc) · 108 KB
/
gapi.youtube.d.ts
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
// Type definitions for YouTube Data API v3
// Project: https://developers.google.com/youtube/v3/
// Definitions by: Frank M <https://github.com/sgtfrankieboy>
// Definitions: https://github.com/borisyankov/DefinitelyTyped
/// <reference path="../gapi/gapi.d.ts" />
declare module gapi.client.youtube {
export interface activities {
/**
* Posts a bulletin for a specific channel.
*/
insert(object: {
/**
* The part parameter serves two purposes in this operation. It identifies the properties that the write operation will set as well as the properties that the API response will include. The part names that you can include in the parameter value are snippet and contentDetails.
*/
part: string;
/**
* HTTP Request Body
*/
RequestBody?: string;
}): HttpRequest<GoogleApiYouTubeActivityResource>;
/**
* Returns a list of channel activity events that match the request criteria.
*/
list(object: {
/**
* The part parameter specifies a comma-separated list of one or more activity resource properties that the API response will include. The part names that you can include in the parameter value are id, snippet, and contentDetails. If the parameter identifies a property that contains child properties, the child properties will be included in the response. For example, in a activity resource, the snippet property contains other properties that identify the type of activity, a display title for the activity, and so forth. If you set part=snippet, the API response will also contain all of those nested properties.
*/
part: string;
/**
* The channelId parameter specifies a unique YouTube channel ID. The API will then return a list of that channel's activities.
*/
channelId?: string;
/**
* Set this parameter's value to true to retrieve the activity feed that displays on the YouTube home page for the currently authenticated user.
*/
home?: boolean;
/**
* The maxResults parameter specifies the maximum number of items that should be returned in the result set.
*/
maxResults?: number;
/**
* Set this parameter's value to true to retrieve a feed of the authenticated user's activities.
*/
mine?: boolean;
/**
* The pageToken parameter identifies a specific page in the result set that should be returned. In an API response, the nextPageToken and prevPageToken properties identify other pages that could be retrieved.
*/
pageToken?: string;
/**
* The publishedAfter parameter specifies the earliest date and time that an activity could have occurred for that activity to be included in the API response. If the parameter value specifies a day, but not a time, then any activities that occurred that day will be included in the result set. The value is specified in ISO 8601 (YYYY-MM-DDThh:mm:ss.sZ) format.
*/
publishedAfter?: string;
/**
* The publishedBefore parameter specifies the date and time before which an activity must have occurred for that activity to be included in the API response. If the parameter value specifies a day, but not a time, then any activities that occurred that day will be excluded from the result set. The value is specified in ISO 8601 (YYYY-MM-DDThh:mm:ss.sZ) format.
*/
publishedBefore?: string;
/**
* The regionCode parameter instructs the API to return results for the specified country. The parameter value is an ISO 3166-1 alpha-2 country code.
*/
regionCode?: string;
}): HttpRequest<GoogleApiYouTubePaginationInfo<GoogleApiYouTubeActivityResource>>;
}
export interface channelBanners {
/**
* Uploads a channel banner to YouTube.
*/
insert(object: {
/**
* The onBehalfOfContentOwner parameter indicates that the authenticated user is acting on behalf of the content owner specified in the parameter value. This parameter is intended for YouTube content partners that own and manage many different YouTube channels. It allows content owners to authenticate once and get access to all their video and channel data, without having to provide authentication credentials for each individual channel. The actual CMS account that the user authenticates with needs to be linked to the specified YouTube content owner.
*/
onBehalfOfContentOwner: string;
/**
* HTTP Request Body
*/
RequestBody: string;
}): HttpRequest<GoogleApiYouTubeChannelBannerResource>;
}
export interface channels {
/**
* Returns a collection of zero or more channel resources that match the request criteria.
*/
list(object: {
/**
* The part parameter specifies a comma-separated list of one or more channel resource properties that the API response will include. The part names that you can include in the parameter value are id, snippet, contentDetails, statistics, topicDetails, and invideoPromotion. If the parameter identifies a property that contains child properties, the child properties will be included in the response. For example, in a channel resource, the contentDetails property contains other properties, such as the uploads properties. As such, if you set part=contentDetails, the API response will also contain all of those nested properties.
*/
part: string;
/**
* The categoryId parameter specifies a YouTube guide category, thereby requesting YouTube channels associated with that category.
*/
categoryId?: string;
/**
* The forUsername parameter specifies a YouTube username, thereby requesting the channel associated with that username.
*/
forUsername?: string;
/**
* The id parameter specifies a comma-separated list of the YouTube channel ID(s) for the resource(s) that are being retrieved. In a channel resource, the id property specifies the channel's YouTube channel ID.
*/
id?: string;
/**
* Set this parameter's value to true to instruct the API to only return channels managed by the content owner that the onBehalfOfContentOwner parameter specifies. The user must be authenticated as a CMS account linked to the specified content owner and onBehalfOfContentOwner must be provided.
*/
managedByMe?: boolean;
/**
* The maxResults parameter specifies the maximum number of items that should be returned in the result set.
*/
maxResults?: number;
/**
* Set this parameter's value to true to instruct the API to only return channels owned by the authenticated user.
*/
mine?: boolean;
/**
* Set this parameter's value to true to retrieve a list of channels that subscribed to the authenticated user's channel.
*/
mySubscribers?: boolean;
/**
* The onBehalfOfContentOwner parameter indicates that the authenticated user is acting on behalf of the content owner specified in the parameter value. This parameter is intended for YouTube content partners that own and manage many different YouTube channels. It allows content owners to authenticate once and get access to all their video and channel data, without having to provide authentication credentials for each individual channel. The actual CMS account that the user authenticates with needs to be linked to the specified YouTube content owner.
*/
onBehalfOfContentOwner?: string;
/**
* The pageToken parameter identifies a specific page in the result set that should be returned. In an API response, the nextPageToken and prevPageToken properties identify other pages that could be retrieved.
*/
pageToken?: string;
}): HttpRequest<GoogleApiYouTubePaginationInfo<GoogleApiYouTubeChannelResource>>;
/**
* Updates a channel's metadata.
*/
update(object: {
/**
* The part parameter serves two purposes in this operation. It identifies the properties that the write operation will set as well as the properties that the API response will include. The part names that you can include in the parameter value are id and invideoPromotion. Note that this method will override the existing values for all of the mutable properties that are contained in any parts that the parameter value specifies.
*/
part: string;
/**
* The onBehalfOfContentOwner parameter indicates that the authenticated user is acting on behalf of the content owner specified in the parameter value. This parameter is intended for YouTube content partners that own and manage many different YouTube channels. It allows content owners to authenticate once and get access to all their video and channel data, without having to provide authentication credentials for each individual channel. The actual CMS account that the user authenticates with needs to be linked to the specified YouTube content owner.
*/
onBehalfOfContentOwner?: string;
/**
* HTTP Request Body
*/
RequestBody?: string;
}): HttpRequest<GoogleApiYouTubeChannelResource>;
}
export interface guideCategories {
/**
* Returns a list of categories that can be associated with YouTube channels.
*/
list(object: {
/**
* The part parameter specifies a comma-separated list of one or more guideCategory resource properties that the API response will include. The part names that you can include in the parameter value are id and snippet. If the parameter identifies a property that contains child properties, the child properties will be included in the response. For example, in a guideCategory resource, the snippet property contains other properties, such as the category's title. If you set part=snippet, the API response will also contain all of those nested properties.
*/
part: string;
/**
* The hl parameter specifies the language that will be used for text values in the API response.
*/
hl?: string;
/**
* The id parameter specifies a comma-separated list of the YouTube channel category ID(s) for the resource(s) that are being retrieved. In a guideCategory resource, the id property specifies the YouTube channel category ID.
*/
id?: string;
/**
* The regionCode parameter instructs the API to return the list of guide categories available in the specified country. The parameter value is an ISO 3166-1 alpha-2 country code.
*/
regionCode?: string;
}): HttpRequest<GoogleApiYouTubePageInfo<GoogleApiYouTubeGuideCategoryResource>>;
}
export interface playlistItems {
/**
* Deletes a playlist item.
*/
delete(object: {
/**
* The id parameter specifies the YouTube playlist item ID for the playlist item that is being deleted. In a playlistItem resource, the id property specifies the playlist item's ID.
*/
id: string;
}): HttpRequest<GoogleApiYouTubePlaylistItemResource>;
/**
* Adds a resource to a playlist.
*/
insert(object: {
/**
* The part parameter serves two purposes in this operation. It identifies the properties that the write operation will set as well as the properties that the API response will include. The part names that you can include in the parameter value are snippet and contentDetails.
*/
part: string;
/**
* HTTP Request Body
*/
RequestBody?: string;
}): HttpRequest<GoogleApiYouTubePlaylistItemResource>;
/**
* Returns a collection of playlist items that match the API request parameters. You can retrieve all of the playlist items in a specified playlist or retrieve one or more playlist items by their unique IDs.
*/
list(object: {
/**
* The part parameter specifies a comma-separated list of one or more playlistItem resource properties that the API response will include. The part names that you can include in the parameter value are id, snippet, and contentDetails. If the parameter identifies a property that contains child properties, the child properties will be included in the response. For example, in a playlistItem resource, the snippet property contains numerous fields, including the title, description, position, and resourceId properties. As such, if you set part=snippet, the API response will contain all of those properties.
*/
part: string;
/**
* The id parameter specifies a comma-separated list of one or more unique playlist item IDs.
*/
id?: string;
/**
* The maxResults parameter specifies the maximum number of items that should be returned in the result set.
*/
maxResults?: number;
/**
* The pageToken parameter identifies a specific page in the result set that should be returned. In an API response, the nextPageToken and prevPageToken properties identify other pages that could be retrieved.
*/
pageToken?: string;
/**
* The playlistId parameter specifies the unique ID of the playlist for which you want to retrieve playlist items. Note that even though this is an optional parameter, every request to retrieve playlist items must specify a value for either the id parameter or the playlistId parameter.
*/
playlistId?: string;
/**
* The videoId parameter specifies that the request should return only the playlist items that contain the specified video.
*/
videoId?: string;
}): HttpRequest<GoogleApiYouTubePaginationInfo<GoogleApiYouTubePlaylistItemResource>>;
/**
* Modifies a playlist item. For example, you could update the item's position in the playlist.
*/
update(object: {
/**
* The part parameter serves two purposes in this operation. It identifies the properties that the write operation will set as well as the properties that the API response will include. The part names that you can include in the parameter value are snippet and status. Note that this method will override the existing values for all of the mutable properties that are contained in any parts that the parameter value specifies. For example, a playlist's privacy setting is contained in the status part. As such, if your request is updating a private playlist, and the request's part parameter value includes the status part, the playlist's privacy setting will be updated to whatever value the request body specifies. If the request body does not specify a value, the existing privacy setting will be removed and the playlist will revert to the default privacy setting.
*/
part: string;
/**
* HTTP Request Body
*/
RequestBody?: string;
}): HttpRequest<GoogleApiYouTubePlaylistItemResource>;
}
export interface playlists {
/**
* Deletes a playlist.
*/
delete(object: {
/**
* The id parameter specifies the YouTube playlist ID for the playlist that is being deleted. In a playlist resource, the id property specifies the playlist's ID.
*/
id: string;
}): HttpRequest<GoogleApiYouTubePlaylistResource>;
/**
* Creates a playlist.
*/
insert(object: {
/**
* The part parameter serves two purposes in this operation. It identifies the properties that the write operation will set as well as the properties that the API response will include. The part names that you can include in the parameter value are snippet and status.
*/
part: string;
/**
* HTTP Request Body
*/
RequestBody?: string;
}): HttpRequest<GoogleApiYouTubePlaylistResource>;
/**
* Returns a collection of playlists that match the API request parameters. For example, you can retrieve all playlists that the authenticated user owns, or you can retrieve one or more playlists by their unique IDs.
*/
list(object: {
/**
* The part parameter specifies a comma-separated list of one or more playlist resource properties that the API response will include. The part names that you can include in the parameter value are id, snippet, and status. If the parameter identifies a property that contains child properties, the child properties will be included in the response. For example, in a playlist resource, the snippet property contains properties like author, title, description, tags, and timeCreated. As such, if you set part=snippet, the API response will contain all of those properties.
*/
part: string;
/**
* This value indicates that the API should only return the specified channel's playlists.
*/
channelId?: string;
/**
* The id parameter specifies a comma-separated list of the YouTube playlist ID(s) for the resource(s) that are being retrieved. In a playlist resource, the id property specifies the playlist's YouTube playlist ID.
*/
id?: string;
/**
* The maxResults parameter specifies the maximum number of items that should be returned in the result set.
*/
maxResults?: number;
/**
* Set this parameter's value to true to instruct the API to only return playlists owned by the authenticated user.
*/
mine?: boolean;
/**
* The pageToken parameter identifies a specific page in the result set that should be returned. In an API response, the nextPageToken and prevPageToken properties identify other pages that could be retrieved.
*/
pagetoken: string;
}): HttpRequest<GoogleApiYouTubePaginationInfo<GoogleApiYouTubePlaylistResource>>;
/**
* Modifies a playlist. For example, you could change a playlist's title, description, or privacy status.
*/
update(object: {
/**
* The part parameter serves two purposes in this operation. It identifies the properties that the write operation will set as well as the properties that the API response will include. The part names that you can include in the parameter value are snippet and status. Note that this method will override the existing values for all of the mutable properties that are contained in any parts that the parameter value specifies. For example, a playlist's privacy setting is contained in the status part. As such, if your request is updating a private playlist, and the request's part parameter value includes the status part, the playlist's privacy setting will be updated to whatever value the request body specifies. If the request body does not specify a value, the existing privacy setting will be removed and the playlist will revert to the default privacy setting.
*/
part: string;
/**
* HTTP Request Body
*/
RequestBody?: string;
}): HttpRequest<GoogleApiYouTubePlaylistResource>;
}
export interface search {
/**
* Returns a collection of search results that match the query parameters specified in the API request. By default, a search result set identifies matching video, channel, and playlist resources, but you can also configure queries to only retrieve a specific type of resource.
*/
list(object: {
/**
* The part parameter specifies a comma-separated list of one or more search resource properties that the API response will include. The part names that you can include in the parameter value are id and snippet. If the parameter identifies a property that contains child properties, the child properties will be included in the response. For example, in a search result, the snippet property contains other properties that identify the result's title, description, and so forth. If you set part=snippet, the API response will also contain all of those nested properties.
*/
part: string;
/**
* The channelId parameter indicates that the API response should only contain resources created by the channel
*/
channelId?: string;
/**
* The channelType parameter lets you restrict a search to a particular type of channel.
*/
channelType?: string;
/**
* The forContentOwner parameter restricts the search to only retrieve resources owned by the content owner specified by the onBehalfOfContentOwner parameter. The user must be authenticated as a CMS account linked to the specified content owner and onBehalfOfContentOwner must be provided.
*/
forContentOwner?: boolean;
/**
* The forMine parameter restricts the search to only retrieve videos owned by the authenticated user.
*/
forMine?: boolean;
/**
* The maxResults parameter specifies the maximum number of items that should be returned in the result set.
*/
maxResults?: number;
/**
* The onBehalfOfContentOwner parameter indicates that the authenticated user is acting on behalf of the content owner specified in the parameter value. This parameter is intended for YouTube content partners that own and manage many different YouTube channels. It allows content owners to authenticate once and get access to all their video and channel data, without having to provide authentication credentials for each individual channel. The actual CMS account that the user authenticates with needs to be linked to the specified YouTube content owner.
*/
onBehalfOfContentOwner?: string;
/**
* The order parameter specifies the method that will be used to order resources in the API response.
*/
order?: string;
/**
* The pageToken parameter identifies a specific page in the result set that should be returned. In an API response, the nextPageToken and prevPageToken properties identify other pages that could be retrieved.
*/
pageToken?: string;
/**
* The publishedAfter parameter indicates that the API response should only contain resources created after the specified time. The value is an RFC 3339 formatted date-time value (1970-01-01T00:00:00Z).
*/
publishedAfter?: string;
/**
* The publishedBefore parameter indicates that the API response should only contain resources created before the specified time. The value is an RFC 3339 formatted date-time value (1970-01-01T00:00:00Z).
*/
publishedBefore?: string;
/**
* The q parameter specifies the query term to search for.
*/
q?: string;
/**
* The regionCode parameter instructs the API to return search results for the specified country. The parameter value is an ISO 3166-1 alpha-2 country code.
*/
regionCode?: string;
/**
* The relatedToVideoId parameter retrieves a list of videos that are related to the video that the parameter value identifies. The parameter value must be set to a YouTube video ID and, if you are using this parameter, the type parameter must be set to video.
*/
relatedToVideoId?: string;
/**
* The safeSearch parameter indicates whether the search results should include restricted content as well as standard content.
*/
safeSearch?: string;
/**
* The topicId parameter indicates that the API response should only contain resources associated with the specified topic. The value identifies a Freebase topic ID.
*/
topicId?: string;
/**
* The type parameter restricts a search query to only retrieve a particular type of resource.
*/
type?: string;
/**
* The videoCaption parameter indicates whether the API should filter video search results based on whether they have captions.
*/
videoCaption?: string;
/**
* The videoCategoryId parameter filters video search results based on their category.
*/
videoCategoryId?: string;
/**
* The videoDefinition parameter lets you restrict a search to only include either high definition (HD) or standard definition (SD) videos. HD videos are available for playback in at least 720p, though higher resolutions, like 1080p, might also be available.
*/
videoDefinition?: string;
/**
* The videoDimension parameter lets you restrict a search to only retrieve 2D or 3D videos.
*/
videoDimension?: string;
/**
* The videoDuration parameter filters video search results based on their duration.
*/
videoDuration?: string;
/**
* The videoEmbeddable parameter lets you to restrict a search to only videos that can be embedded into a webpage.
*/
videoEmbeddable?: string;
/**
* The videoLicense parameter filters search results to only include videos with a particular license. YouTube lets video uploaders choose to attach either the Creative Commons license or the standard YouTube license to each of their videos.
*/
videoLicense?: string;
/**
* The videoSyndicated parameter lets you to restrict a search to only videos that can be played outside youtube.com.
*/
videoSyndicated?: string;
/**
* The videoType parameter lets you restrict a search to a particular type of videos.
*/
videoType?: string;
}): HttpRequest<GoogleApiYouTubePaginationInfo<GoogleApiYouTubeSearchResource>>;
}
export interface subscriptions {
/**
* Deletes a subscription.
*/
delete(object: {
/**
* The id parameter specifies the YouTube subscription ID for the resource that is being deleted. In a subscription resource, the id property specifies the YouTube subscription ID.
*/
id: string;
}): HttpRequest<GoogleApiYouTubeSubscriptionResource>;
/**
* Adds a subscription for the authenticated user's channel.
*/
insert(object: {
/**
* The part parameter serves two purposes in this operation. It identifies the properties that the write operation will set as well as the properties that the API response will include. The part names that you can include in the parameter value are snippet and contentDetails.
*/
part: string;
/**
* HTTP Request Body
*/
RequestBody: string;
}): HttpRequest<GoogleApiYouTubeSubscriptionResource>;
/**
* Returns subscription resources that match the API request criteria.
*/
list(object: {
/**
* The part parameter specifies a comma-separated list of one or more subscription resource properties that the API response will include. The part names that you can include in the parameter value are id, snippet, and contentDetails. If the parameter identifies a property that contains child properties, the child properties will be included in the response. For example, in a subscription resource, the snippet property contains other properties, such as a display title for the subscription. If you set part=snippet, the API response will also contain all of those nested properties.
*/
part: string;
/**
* The channelId parameter specifies a YouTube channel ID. The API will only return that channel's subscriptions.
*/
channelId?: string;
/**
* The forChannelId parameter specifies a comma-separated list of channel IDs. The API response will then only contain subscriptions matching those channels.
*/
forChannelId?: string;
/**
* The id parameter specifies a comma-separated list of the YouTube subscription ID(s) for the resource(s) that are being retrieved. In a subscription resource, the id property specifies the YouTube subscription ID.
*/
id?: string;
/**
* The maxResults parameter specifies the maximum number of items that should be returned in the result set.
*/
maxResults?: number;
/**
* Set this parameter's value to true to retrieve a feed of the authenticated user's subscriptions.
*/
mine?: boolean;
/**
* Set this parameter's value to true to retrieve a feed of the subscribers of the authenticated user.
*/
mySubscripbers?: boolean;
/**
* The order parameter specifies the method that will be used to sort resources in the API response.
*/
order?: string;
/**
* The pageToken parameter identifies a specific page in the result set that should be returned. In an API response, the nextPageToken and prevPageToken properties identify other pages that could be retrieved.
*/
pageToken?: string;
}): HttpRequest<GoogleApiYouTubePaginationInfo<GoogleApiYouTubeSubscriptionResource>>;
}
export interface thumbnails {
/**
* Uploads a custom video thumbnail to YouTube and sets it for a video.
*/
set(object: {
/**
* The videoId parameter specifies a YouTube video ID for which the custom video thumbnail is being provided.
*/
videoId: string;
}): HttpRequest<GoogleApiYouTubePageInfo<GoogleApiYouTubeThumbnailResource>>;
}
export interface videoCategories {
/**
* Returns a list of categories that can be associated with YouTube videos.
*/
list(object: {
/**
* The part parameter specifies the videoCategory resource parts that the API response will include. Supported values are id and snippet.
*/
part: string;
/**
* The hl parameter specifies the language that should be used for text values in the API response.
*/
hl?: string;
/**
* The id parameter specifies a comma-separated list of video category IDs for the resources that you are retrieving.
*/
id?: string;
/**
* The regionCode parameter instructs the API to return the list of video categories available in the specified country. The parameter value is an ISO 3166-1 alpha-2 country code.
*/
regionCode?: string;
}): HttpRequest<GoogleApiYouTubePageInfo<GoogleApiYouTubeVideoCategoryResource>>;
}
export interface videos {
/**
* Deletes a YouTube video.
*/
delete(object: {
/**
* The id parameter specifies the YouTube video ID for the resource that is being deleted. In a video resource, the id property specifies the video's ID.
*/
id: string;
/**
* The onBehalfOfContentOwner parameter indicates that the authenticated user is acting on behalf of the content owner specified in the parameter value. This parameter is intended for YouTube content partners that own and manage many different YouTube channels. It allows content owners to authenticate once and get access to all their video and channel data, without having to provide authentication credentials for each individual channel. The actual CMS account that the user authenticates with needs to be linked to the specified YouTube content owner.
*/
onBehalfOfContentOwner?: string;
}): HttpRequest<GoogleApiYouTubeVideoResource>;
/**
* Get user ratings for videos.
*/
getRating(object: {
/**
* The id parameter specifies a comma-separated list of the YouTube video ID(s) for the resource(s) that are being retrieved. In a video resource, the id property specifies the video's ID.
*/
id: string;
/**
* The onBehalfOfContentOwner parameter indicates that the authenticated user is acting on behalf of the content owner specified in the parameter value. This parameter is intended for YouTube content partners that own and manage many different YouTube channels. It allows content owners to authenticate once and get access to all their video and channel data, without having to provide authentication credentials for each individual channel. The actual CMS account that the user authenticates with needs to be linked to the specified YouTube content owner.
*/
onBehalfOfContentOwner?: string;
}): HttpRequest<GoogleApiYouTubeVideoGetRatingResponse>;
/**
* Uploads a video to YouTube and optionally sets the video's metadata.
*/
insert(object: {
/**
* The part parameter serves two purposes in this operation. It identifies the properties that the write operation will set as well as the properties that the API response will include. The part names that you can include in the parameter value are snippet, contentDetails, player, statistics, status, and topicDetails. However, not all of those parts contain properties that can be set when setting or updating a video's metadata. For example, the statistics object encapsulates statistics that YouTube calculates for a video and does not contain values that you can set or modify. If the parameter value specifies a part that does not contain mutable values, that part will still be included in the API response.
*/
part: string;
/**
* The autoLevels parameter specifies whether the video should be auto-leveled by YouTube.
*/
autoLevels?: boolean;
/**
* The onBehalfOfContentOwner parameter indicates that the authenticated user is acting on behalf of the content owner specified in the parameter value. This parameter is intended for YouTube content partners that own and manage many different YouTube channels. It allows content owners to authenticate once and get access to all their video and channel data, without having to provide authentication credentials for each individual channel. The actual CMS account that the user authenticates with needs to be linked to the specified YouTube content owner.
*/
onBehalfOfContentOwner?: string;
/**
* This parameter can only be used in a properly authorized request. Note: This parameter is intended exclusively for YouTube content partners. The onBehalfOfContentOwnerChannel parameter indicates that the request's authorization credentials identify a YouTube CMS user who is acting on behalf of the channel specified in the parameter value. This parameter must be used in conjunction with the onBehalfOfContentOwner parameter, and the user must be authenticated using a CMS account that is linked to the content owner that the onBehalfOfContentOwner parameter specifies. In addition, the channel that the onBehalfOfContentOwnerChannel parameter value specifies must be linked to the content owner that the onBehalfOfContentOwner parameter specifies. This parameter is intended for YouTube content partners that own and manage many different YouTube channels. It allows content owners to authenticate once and perform actions on behalf of the channel specified in the parameter value, without having to provide authentication credentials for each separate channel.
*/
onBehalfOfContentOwnerChannel?: string;
/**
* The stabilize parameter specifies whether the video should be stabilized by YouTube.
*/
stabilize?: boolean;
/**
* HTTP Request Body
*/
RequestBody?: string;
}): HttpRequest<GoogleApiYouTubeVideoResource>;
/**
* Returns a list of videos that match the API request parameters.
*/
list(object: {
/**
* The part parameter specifies a comma-separated list of one or more video resource properties that the API response will include. The part names that you can include in the parameter value are id, snippet, contentDetails, player, statistics, status, and topicDetails. If the parameter identifies a property that contains child properties, the child properties will be included in the response. For example, in a video resource, the snippet property contains the channelId, title, description, tags, and categoryId properties. As such, if you set part=snippet, the API response will contain all of those properties.
*/
part: string;
/**
* Set this parameter's value to mostPopular to instruct the API to return videos belonging to the chart of most popular videos.
*/
chart: string;
/**
* The id parameter specifies a comma-separated list of the YouTube video ID(s) for the resource(s) that are being retrieved. In a video resource, the id property specifies the video's ID.
*/
id: string;
/**
* The locale parameter selects a video chart available in the specified locale. If using this parameter, chart must also be set. The parameter value is an BCP 47 locale. Supported locales include ar_AE, ar_DZ, ar_EG, ar_JO, ar_MA, ar_SA, ar_TN, ar_YE, cs_CZ, de_DE, el_GR, en_AU, en_BE, en_CA, en_GB, en_GH, en_IE, en_IL, en_IN, en_KE, en_NG, en_NZ, en_SG, en_UG, en_US, en_ZA, es_AR, es_CL, es_CO, es_ES, es_MX, es_PE, fil_PH, fr_FR, hu_HU, id_ID, it_IT, ja_JP, ko_KR, ms_MY, nl_NL, pl_PL, pt_BR, ru_RU, sv_SE, tr_TR, zh_HK, zh_TW
*/
locale: string;
/**
* The maxResults parameter specifies the maximum number of items that should be returned in the result set.
*/
maxResults: number;
/**
* Set this parameter's value to like or dislike to instruct the API to only return videos liked or disliked by the authenticated user.
*/
myRating: string;
/**
* The onBehalfOfContentOwner parameter indicates that the authenticated user is acting on behalf of the content owner specified in the parameter value. This parameter is intended for YouTube content partners that own and manage many different YouTube channels. It allows content owners to authenticate once and get access to all their video and channel data, without having to provide authentication credentials for each individual channel. The actual CMS account that the user authenticates with needs to be linked to the specified YouTube content owner.
*/
onBehalfOfContentOwner: string;
/**
* The pageToken parameter identifies a specific page in the result set that should be returned. In an API response, the nextPageToken and prevPageToken properties identify other pages that could be retrieved.
*/
pageToken: string;
/**
* The videoCategoryId parameter selects a video chart based on the category. If using this parameter, chart must also be set.
*/
videoCategoryId: string;
}): HttpRequest<GoogleApiYouTubePaginationInfo<GoogleApiYouTubeVideoResource>>;
/**
* Like, dislike, or remove rating from a video.
*/
rate(object: {
/**
* The id parameter specifies the YouTube video ID.
*/
id: string;
/**
* Specifies the rating to record.
*/
rating: string;
/**
* The onBehalfOfContentOwner parameter indicates that the authenticated user is acting on behalf of the content owner specified in the parameter value. This parameter is intended for YouTube content partners that own and manage many different YouTube channels. It allows content owners to authenticate once and get access to all their video and channel data, without having to provide authentication credentials for each individual channel. The actual CMS account that the user authenticates with needs to be linked to the specified YouTube content owner.
*/
onBehalfOfContentOwner?: string;
}): HttpRequest<any>;
/**
* Updates a video's metadata.
*/
update(object: {
/**
* The part parameter serves two purposes in this operation. It identifies the properties that the write operation will set as well as the properties that the API response will include. The part names that you can include in the parameter value are snippet, contentDetails, player, statistics, status, and topicDetails. Note that this method will override the existing values for all of the mutable properties that are contained in any parts that the parameter value specifies. For example, a video's privacy setting is contained in the status part. As such, if your request is updating a private video, and the request's part parameter value includes the status part, the video's privacy setting will be updated to whatever value the request body specifies. If the request body does not specify a value, the existing privacy setting will be removed and the video will revert to the default privacy setting. In addition, not all of those parts contain properties that can be set when setting or updating a video's metadata. For example, the statistics object encapsulates statistics that YouTube calculates for a video and does not contain values that you can set or modify. If the parameter value specifies a part that does not contain mutable values, that part will still be included in the API response.
*/
part: string;
/**
* The onBehalfOfContentOwner parameter indicates that the authenticated user is acting on behalf of the content owner specified in the parameter value. This parameter is intended for YouTube content partners that own and manage many different YouTube channels. It allows content owners to authenticate once and get access to all their video and channel data, without having to provide authentication credentials for each individual channel. The actual CMS account that the user authenticates with needs to be linked to the specified YouTube content owner.
*/
onBehalfOfContentOwner?: string;
/**
* HTTP Request Body
*/
RequestBody?: string;
}): HttpRequest<GoogleApiYouTubeVideoResource>;
}
}
interface GoogleApiYouTubePageInfo<T> {
/**
* The type of the API response. For this operation, the value will be youtube#activityListResponse.
*/
kind: string;
/**
* The ETag of the response.
*/
etag: string;
/**
* A list of activities, or events, that match the request criteria.
*/
items: T[];
}
interface GoogleApiYouTubePaginationInfo<T> {
/**
* The type of the API response. For this operation, the value will be youtube#activityListResponse.
*/
kind: string;
/**
* The ETag of the response.
*/
etag: string;
/**
* The pageInfo object encapsulates paging information for the result set.
*/
pageInfo: {
/**
* The total number of results in the result set.
*/
totalResults: number;
/**
* The number of results included in the API response.
*/
resultsPerPage: number;
};
/**
* The token that can be used as the value of the pageToken parameter to retrieve the next page in the result set.
*/
nextPageToken: string;
/**
* The token that can be used as the value of the pageToken parameter to retrieve the previous page in the result set.
*/
prevPageToken: string;
/**
* A list of activities, or events, that match the request criteria.
*/
items: T[];
}
interface GoogleApiYouTubeActivityResource {
/**
* The type of the API resource. For activity resources, the value will be youtube#activity.
*/
kind: string;
/**
* The ETag of the activity resource.
*/
etag: string;
/**
* The ID that YouTube uses to uniquely identify the activity.
*/
id: string;
/**
* The snippet object contains basic details about the activity, including the activitys type and group ID.
*/
snippet: {
/**
* The date and time that the activity occurred. The value is specified in ISO 8601 (YYYY-MM-DDThh:mm:ss.sZ) format.
*/
publishedAt: string;
/**
* The ID that YouTube uses to uniquely identify the channel associated with the activity.
*/
channelId: string;
/**
* The title of the resource primarily associated with the activity.
*/
title: string;
/**
* The description of the resource primarily associated with the activity.
*/
description: string;
/**
* A map of thumbnail images associated with the resource that is primarily associated with the activity.
*/
thumbnails: GoogleApiYouTubeThumbnailItemResource[];
/**
* Channel title for the channel responsible for this activity
*/
channelTitle: string;
/**
* The type of activity that the resource describes.
*/
type: string;
/**
* The group ID associated with the activity.
*/
groupId: string;
}
/**
* The contentDetails object contains information about the content associated with the activity.
*/
contentDetails: {
/**
* The upload object contains information about the uploaded video. This property is only present if the snippet.type is upload.
*/
upload: {
/**
* The ID that YouTube uses to uniquely identify the uploaded video.
*/
videoId: string;
}
/**
* The like object contains information about a resource that received a positive (like) rating. This property is only present if the snippet.type is like.
*/
like: {
/**
* The resourceId object contains information that identifies the rated resource.
*/
resourceId: {
/**
* The type of the API resource.
*/
kind: string;
/**
* The ID that YouTube uses to uniquely identify the video, if the rated resource is a video. This property is only present if the resourceId.kind is youtube#video
*/
videoId: string;
}
}
/**
* The favorite object contains information about a video that was marked as a favorite video. This property is only present if the snippet.type is favorite.
*/
favorite: {
/**
* The resourceId object contains information that identifies the resource that was marked as a favorite.
*/
resourceId: {
/**
* The type of the API resource.
*/
kind: string;
/**
* The ID that YouTube uses to uniquely identify the favorite video. This property is only present if the resourceId.kind is youtube#video.
*/
videoId: string;
}
}
/**
* The comment object contains information about a resource that received a comment. This property is only present if the snippet.type is comment.
*/
comment: {
/**
* The resourceId object contains information that identifies the resource associated with the comment.
*/
resourceId: {
/**
* The type of the API resource.
*/
kind: string;
/**
* The ID that YouTube uses to uniquely identify the video associated with a comment. This property is only present if the resourceId.kind is youtube#video.
*/
videoId: string;
/**
* The ID that YouTube uses to uniquely identify the channel associated with a comment. This property is only present if the resourceId.kind is youtube#channel.
*/
channelId: string;
}
}
/**
* The subscription object contains information about a channel that a user subscribed to. This property is only present if the snippet.type is subscription.
*/
subscription: {
/**
* The resourceId object contains information that identifies the resource that the user subscribed to.
*/
resourceId: {
/**
* The type of the API resource.
*/
kind: string;
/**
* The ID that YouTube uses to uniquely identify the channel that the user subscribed to. This property is only present if the resourceId.kind is youtube#channel.
*/
channelId: string;
}
}
/**
* The playlistItem object contains information about an item that was added to a playlist. This property is only present if the snippet.type is playlistItem.
*/
playlistItem: {
/**
* The resourceId object contains information that identifies the resource that was added to the playlist.
*/
resourceId: {
/**
* The type of the API resource.
*/
kind: string;
/**
* The ID that YouTube uses to uniquely identify the video that was added to the playlist. This property is only present if the resourceId.kind is youtube#video.
*/
videoId: string;
}
/**
* The value that YouTube uses to uniquely identify the playlist.
*/
playlistId: string;
/**
* The value that YouTube uses to uniquely identify the item in the playlist.
*/
playlistItemId: string;
}
/**
* The recommendation object contains information about a recommended resource. This property is only present if the snippet.type is recommendation.
*/
recommendation: {
/**
* The resourceId object contains information that identifies the recommended resource.
*/
resourceId: {
/**
* The type of the API resource.
*/
kind: string;
/**
* The ID that YouTube uses to uniquely identify the video, if the recommended resource is a video. This property is only present if the resourceId.kind is youtube#video.
*/
videoId: string;
/**
* The ID that YouTube uses to uniquely identify the channel, if the recommended resource is a channel. This property is only present if the resourceId.kind is youtube#channel.
*/
channelId: string;
}
/**
* The reason that the resource is recommended to the user.
*/
reason: string;
/**
* The seedResourceId object contains information about the resource that caused the recommendation.
*/
seedResourceId: {
/**
* The type of the API resource.
*/
kind: string;
/**
* The ID that YouTube uses to uniquely identify the video, if the recommendation was caused by a particular video. This property is only present if the seedResourceId.kind is youtube#video.
*/
videoId: string;
/**
* The ID that YouTube uses to uniquely identify the channel, if the recommendation was caused by a particular channel. This property is only present if the seedResourceId.kind is youtube#channel.
*/
channelId: string;
/**
* The ID that YouTube uses to uniquely identify the playlist, if the recommendation was caused by a particular playlist. This property is only present if the seedResourceId.kind is youtube#playlist.
*/
playlistId: string;
}
}
/**
* The bulletin object contains details about a channel bulletin post. This object is only present if the snippet.type is bulletin.
*/
bulletin: {
/**
* The resourceId object contains information that identifies the resource associated with a bulletin post.
*/
resourceId: {
/**
* The type of the API resource.
*/
kind: string;
/**
* The ID that YouTube uses to uniquely identify the video featured in a bulletin post, if the post refers to a video. This property will only be present if the value of the bulletin.resourceId.kind property is youtube#video.
*/
videoId: string;
/**
* The ID that YouTube uses to uniquely identify the channel featured in a bulletin post, if the post refers to a channel. This property will only be present if the value of the bulletin.resourceId.kind property is youtube#channel.
*/
channelId: string;
/**
* The ID that YouTube uses to uniquely identify the playlist featured in a bulletin post, if the post refers to a playlist. This property will only be present if the value of the bulletin.resourceId.kind property is youtube#playlist.
*/
playlistId: string;
}
}
/**
* The social object contains details about a social network post. This property is only present if the snippet.type is social.
*/
social: {
/**
* The name of the social network.
*/
type: string;
/**
* The resourceId object encapsulates information that identifies the resource associated with a social network post.
*/
resourceId: {
/**
* The type of the API resource.
*/
kind: string;
/**
* The ID that YouTube uses to uniquely identify the video featured in a social network post, if the post refers to a video. This property will only be present if the value of the social.resourceId.kind property is youtube#video.