@googleapis/youtube 30.3.0 → 32.0.0

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.
package/build/v3.d.ts CHANGED
@@ -433,23 +433,6 @@ export declare namespace youtube_v3 {
433
433
  */
434
434
  type?: string | null;
435
435
  }
436
- /**
437
- * Response for the Videos.stats API. Returns VideoStat information about a batch of videos. VideoStat contains a subset of the information in Video that is relevant to statistics and content details.
438
- */
439
- export interface Schema$BatchGetStatsResponse {
440
- /**
441
- * Output only. Etag of this resource.
442
- */
443
- etag?: string | null;
444
- /**
445
- * Output only. The videos' stats information.
446
- */
447
- items?: Schema$VideoStat[];
448
- /**
449
- * Output only. Identifies what kind of resource this is. Value: the fixed string "youtube#batchGetStatsResponse".
450
- */
451
- kind?: string | null;
452
- }
453
436
  /**
454
437
  * A *caption* resource represents a YouTube caption track. A caption track is associated with exactly one YouTube video.
455
438
  */
@@ -2281,6 +2264,43 @@ export declare namespace youtube_v3 {
2281
2264
  */
2282
2265
  userComment?: string | null;
2283
2266
  }
2267
+ /**
2268
+ * Details about the gift event, this is only set if the type is 'giftEvent'.
2269
+ */
2270
+ export interface Schema$LiveChatGiftDetails {
2271
+ /**
2272
+ * The alternative text to be used for accessibility.
2273
+ */
2274
+ altText?: string | null;
2275
+ /**
2276
+ * The number of times the gift has been sent in a row.
2277
+ */
2278
+ comboCount?: number | null;
2279
+ /**
2280
+ * The duration of the gift.
2281
+ */
2282
+ giftDuration?: string | null;
2283
+ /**
2284
+ * The name of the gift.
2285
+ */
2286
+ giftName?: string | null;
2287
+ /**
2288
+ * The URL of the gift image.
2289
+ */
2290
+ giftUrl?: string | null;
2291
+ /**
2292
+ * Whether the gift involves a visual effect.
2293
+ */
2294
+ hasVisualEffect?: boolean | null;
2295
+ /**
2296
+ * The value of the gift in jewels.
2297
+ */
2298
+ jewelsAmount?: number | null;
2299
+ /**
2300
+ * The BCP-47 language code of the gift.
2301
+ */
2302
+ language?: string | null;
2303
+ }
2284
2304
  export interface Schema$LiveChatGiftMembershipReceivedDetails {
2285
2305
  /**
2286
2306
  * The ID of the membership gifting message that is related to this gift membership. This ID will always refer to a message whose type is 'membershipGiftingEvent'.
@@ -2422,7 +2442,7 @@ export declare namespace youtube_v3 {
2422
2442
  retractedMessageId?: string | null;
2423
2443
  }
2424
2444
  /**
2425
- * Next ID: 34
2445
+ * Next ID: 35
2426
2446
  */
2427
2447
  export interface Schema$LiveChatMessageSnippet {
2428
2448
  /**
@@ -2437,6 +2457,10 @@ export declare namespace youtube_v3 {
2437
2457
  * Details about the funding event, this is only set if the type is 'fanFundingEvent'.
2438
2458
  */
2439
2459
  fanFundingEventDetails?: Schema$LiveChatFanFundingEventDetails;
2460
+ /**
2461
+ * Details about the gift event, this is only set if the type is 'giftEvent'.
2462
+ */
2463
+ giftDetails?: Schema$LiveChatGiftDetails;
2440
2464
  /**
2441
2465
  * Details about the Gift Membership Received event, this is only set if the type is 'giftMembershipReceivedEvent'.
2442
2466
  */
@@ -4501,35 +4525,6 @@ export declare namespace youtube_v3 {
4501
4525
  */
4502
4526
  title?: string | null;
4503
4527
  }
4504
- /**
4505
- * A *VideoStat* resource represents a YouTube video's stats.
4506
- */
4507
- export interface Schema$VideoStat {
4508
- /**
4509
- * Output only. The VideoStatsContentDetails object contains information about the video content, including the length of the video.
4510
- */
4511
- contentDetails?: Schema$VideoStatsContentDetails;
4512
- /**
4513
- * Output only. Etag of this resource.
4514
- */
4515
- etag?: string | null;
4516
- /**
4517
- * Output only. The ID that YouTube uses to uniquely identify the video.
4518
- */
4519
- id?: string | null;
4520
- /**
4521
- * Output only. Identifies what kind of resource this is. Value: the fixed string "youtube#videoStats".
4522
- */
4523
- kind?: string | null;
4524
- /**
4525
- * Output only. The VideoStatsSnippet object contains basic details about the video, such publish time.
4526
- */
4527
- snippet?: Schema$VideoStatsSnippet;
4528
- /**
4529
- * Output only. The VideoStatsStatistics object contains statistics about the video.
4530
- */
4531
- statistics?: Schema$VideoStatsStatistics;
4532
- }
4533
4528
  /**
4534
4529
  * Statistics about the video, such as the number of times the video was viewed or liked.
4535
4530
  */
@@ -4555,41 +4550,6 @@ export declare namespace youtube_v3 {
4555
4550
  */
4556
4551
  viewCount?: string | null;
4557
4552
  }
4558
- /**
4559
- * Details about the content of a YouTube Video. This is a subset of the information in VideoContentDetails specifically for the Videos.stats API.
4560
- */
4561
- export interface Schema$VideoStatsContentDetails {
4562
- /**
4563
- * Output only. The length of the video. The property value is a [`google.protobuf.Duration`](https://developers.google.com/protocol-buffers/docs/reference/google.protobuf#duration) object.
4564
- */
4565
- duration?: string | null;
4566
- }
4567
- /**
4568
- * Basic details about a video. This is a subset of the information in VideoSnippet specifically for the Videos.stats API.
4569
- */
4570
- export interface Schema$VideoStatsSnippet {
4571
- /**
4572
- * Output only. The date and time that the video was uploaded. The property value is a [`google.protobuf.Timestamp`](https://developers.google.com/protocol-buffers/docs/reference/google.protobuf#timestamp) object.
4573
- */
4574
- publishTime?: string | null;
4575
- }
4576
- /**
4577
- * Statistics about the video, such as the number of times the video was viewed or liked.
4578
- */
4579
- export interface Schema$VideoStatsStatistics {
4580
- /**
4581
- * Output only. The number of comments for the video.
4582
- */
4583
- commentCount?: string | null;
4584
- /**
4585
- * Output only. The number of users who have indicated that they liked the video by giving it a positive rating.
4586
- */
4587
- likeCount?: string | null;
4588
- /**
4589
- * Output only. The number of times the video has been viewed.
4590
- */
4591
- viewCount?: string | null;
4592
- }
4593
4553
  /**
4594
4554
  * Basic details about a video category, such as its localized title. Next Id: 19
4595
4555
  */
@@ -11056,6 +11016,8 @@ export declare namespace youtube_v3 {
11056
11016
  * const res = await youtube.tests.insert({
11057
11017
  * externalChannelId: 'placeholder-value',
11058
11018
  *
11019
+ * onBehalfOfContentOwnerChannel: 'placeholder-value',
11020
+ *
11059
11021
  * part: 'placeholder-value',
11060
11022
  *
11061
11023
  * // Request body metadata
@@ -11106,6 +11068,10 @@ export declare namespace youtube_v3 {
11106
11068
  *
11107
11069
  */
11108
11070
  externalChannelId?: string;
11071
+ /**
11072
+ *
11073
+ */
11074
+ onBehalfOfContentOwnerChannel?: string;
11109
11075
  /**
11110
11076
  *
11111
11077
  */
@@ -12770,7 +12736,6 @@ export declare namespace youtube_v3 {
12770
12736
  export class Resource$Youtube$V3 {
12771
12737
  context: APIRequestContext;
12772
12738
  liveChat: Resource$Youtube$V3$Livechat;
12773
- videos: Resource$Youtube$V3$Videos;
12774
12739
  constructor(context: APIRequestContext);
12775
12740
  /**
12776
12741
  * Updates an existing resource.
@@ -12978,89 +12943,5 @@ export declare namespace youtube_v3 {
12978
12943
  */
12979
12944
  profileImageSize?: number;
12980
12945
  }
12981
- export class Resource$Youtube$V3$Videos {
12982
- context: APIRequestContext;
12983
- constructor(context: APIRequestContext);
12984
- /**
12985
- * Retrieves a batch of VideoStat resources, possibly filtered.
12986
- * @example
12987
- * ```js
12988
- * // Before running the sample:
12989
- * // - Enable the API at:
12990
- * // https://console.developers.google.com/apis/api/youtube.googleapis.com
12991
- * // - Login into gcloud by running:
12992
- * // ```sh
12993
- * // $ gcloud auth application-default login
12994
- * // ```
12995
- * // - Install the npm module by running:
12996
- * // ```sh
12997
- * // $ npm install googleapis
12998
- * // ```
12999
- *
13000
- * const {google} = require('googleapis');
13001
- * const youtube = google.youtube('v3');
13002
- *
13003
- * async function main() {
13004
- * const auth = new google.auth.GoogleAuth({
13005
- * // Scopes can be specified either as an array or as a single, space-delimited string.
13006
- * scopes: [],
13007
- * });
13008
- *
13009
- * // Acquire an auth client, and bind it to all future calls
13010
- * const authClient = await auth.getClient();
13011
- * google.options({auth: authClient});
13012
- *
13013
- * // Do the magic
13014
- * const res = await youtube.youtube.v3.videos.batchGetStats({
13015
- * // Required. Return videos with the given ids. The number of IDs specified cannot exceed 50.
13016
- * id: 'placeholder-value',
13017
- * // Optional. **Note:** This parameter is intended exclusively for YouTube content partners. The `onBehalfOfContentOwner` parameter indicates that the request's authorization credentials identify a YouTube CMS user who 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 CMS account that the user authenticates with must be linked to the specified YouTube content owner.
13018
- * onBehalfOfContentOwner: 'placeholder-value',
13019
- * // Required. The `**part**` parameter specifies a comma-separated list of one or more `videoStat` resource properties that the API response will include. If the parameter identifies a property that contains child properties, the child properties will be included in the response. For example, in a `videoStat` resource, the `statistics` property contains `view_count` and `like_count`. As such, if you set `**part=snippet**`, the API response will contain all of those properties.
13020
- * part: 'placeholder-value',
13021
- * });
13022
- * console.log(res.data);
13023
- *
13024
- * // Example response
13025
- * // {
13026
- * // "etag": "my_etag",
13027
- * // "items": [],
13028
- * // "kind": "my_kind"
13029
- * // }
13030
- * }
13031
- *
13032
- * main().catch(e => {
13033
- * console.error(e);
13034
- * throw e;
13035
- * });
13036
- *
13037
- * ```
13038
- *
13039
- * @param params - Parameters for request
13040
- * @param options - Optionally override request options, such as `url`, `method`, and `encoding`.
13041
- * @param callback - Optional callback that handles the response.
13042
- * @returns A promise if used with async/await, or void if used with a callback.
13043
- */
13044
- batchGetStats(params: Params$Resource$Youtube$V3$Videos$Batchgetstats, options: StreamMethodOptions): Promise<GaxiosResponseWithHTTP2<Readable>>;
13045
- batchGetStats(params?: Params$Resource$Youtube$V3$Videos$Batchgetstats, options?: MethodOptions): Promise<GaxiosResponseWithHTTP2<Schema$BatchGetStatsResponse>>;
13046
- batchGetStats(params: Params$Resource$Youtube$V3$Videos$Batchgetstats, options: StreamMethodOptions | BodyResponseCallback<Readable>, callback: BodyResponseCallback<Readable>): void;
13047
- batchGetStats(params: Params$Resource$Youtube$V3$Videos$Batchgetstats, options: MethodOptions | BodyResponseCallback<Schema$BatchGetStatsResponse>, callback: BodyResponseCallback<Schema$BatchGetStatsResponse>): void;
13048
- batchGetStats(params: Params$Resource$Youtube$V3$Videos$Batchgetstats, callback: BodyResponseCallback<Schema$BatchGetStatsResponse>): void;
13049
- batchGetStats(callback: BodyResponseCallback<Schema$BatchGetStatsResponse>): void;
13050
- }
13051
- export interface Params$Resource$Youtube$V3$Videos$Batchgetstats extends StandardParameters {
13052
- /**
13053
- * Required. Return videos with the given ids. The number of IDs specified cannot exceed 50.
13054
- */
13055
- id?: string[];
13056
- /**
13057
- * Optional. **Note:** This parameter is intended exclusively for YouTube content partners. The `onBehalfOfContentOwner` parameter indicates that the request's authorization credentials identify a YouTube CMS user who 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 CMS account that the user authenticates with must be linked to the specified YouTube content owner.
13058
- */
13059
- onBehalfOfContentOwner?: string;
13060
- /**
13061
- * Required. The `**part**` parameter specifies a comma-separated list of one or more `videoStat` resource properties that the API response will include. If the parameter identifies a property that contains child properties, the child properties will be included in the response. For example, in a `videoStat` resource, the `statistics` property contains `view_count` and `like_count`. As such, if you set `**part=snippet**`, the API response will contain all of those properties.
13062
- */
13063
- part?: string[];
13064
- }
13065
12946
  export {};
13066
12947
  }
package/build/v3.js CHANGED
@@ -2906,11 +2906,9 @@ var youtube_v3;
2906
2906
  class Resource$Youtube$V3 {
2907
2907
  context;
2908
2908
  liveChat;
2909
- videos;
2910
2909
  constructor(context) {
2911
2910
  this.context = context;
2912
2911
  this.liveChat = new Resource$Youtube$V3$Livechat(this.context);
2913
- this.videos = new Resource$Youtube$V3$Videos(this.context);
2914
2912
  }
2915
2913
  updateCommentThreads(paramsOrCallback, optionsOrCallback, callback) {
2916
2914
  let params = (paramsOrCallback ||
@@ -2994,44 +2992,5 @@ var youtube_v3;
2994
2992
  }
2995
2993
  }
2996
2994
  youtube_v3.Resource$Youtube$V3$Livechat$Messages = Resource$Youtube$V3$Livechat$Messages;
2997
- class Resource$Youtube$V3$Videos {
2998
- context;
2999
- constructor(context) {
3000
- this.context = context;
3001
- }
3002
- batchGetStats(paramsOrCallback, optionsOrCallback, callback) {
3003
- let params = (paramsOrCallback ||
3004
- {});
3005
- let options = (optionsOrCallback || {});
3006
- if (typeof paramsOrCallback === 'function') {
3007
- callback = paramsOrCallback;
3008
- params = {};
3009
- options = {};
3010
- }
3011
- if (typeof optionsOrCallback === 'function') {
3012
- callback = optionsOrCallback;
3013
- options = {};
3014
- }
3015
- const rootUrl = options.rootUrl || 'https://youtube.googleapis.com/';
3016
- const parameters = {
3017
- options: Object.assign({
3018
- url: (rootUrl + '/youtube/v3/videos:batchGetStats').replace(/([^:]\/)\/+/g, '$1'),
3019
- method: 'GET',
3020
- apiVersion: '',
3021
- }, options),
3022
- params,
3023
- requiredParams: [],
3024
- pathParams: [],
3025
- context: this.context,
3026
- };
3027
- if (callback) {
3028
- (0, googleapis_common_1.createAPIRequest)(parameters, callback);
3029
- }
3030
- else {
3031
- return (0, googleapis_common_1.createAPIRequest)(parameters);
3032
- }
3033
- }
3034
- }
3035
- youtube_v3.Resource$Youtube$V3$Videos = Resource$Youtube$V3$Videos;
3036
2995
  })(youtube_v3 || (exports.youtube_v3 = youtube_v3 = {}));
3037
2996
  //# sourceMappingURL=v3.js.map