@googleapis/youtube 30.2.0 → 31.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/CHANGELOG.md +18 -0
- package/build/tsconfig.tsbuildinfo +1 -1
- package/build/v3.d.ts +0 -166
- package/build/v3.js +0 -41
- package/build/v3.js.map +1 -1
- package/package.json +1 -1
- package/v3.ts +0 -252
package/v3.ts
CHANGED
|
@@ -520,23 +520,6 @@ export namespace youtube_v3 {
|
|
|
520
520
|
*/
|
|
521
521
|
type?: string | null;
|
|
522
522
|
}
|
|
523
|
-
/**
|
|
524
|
-
* 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.
|
|
525
|
-
*/
|
|
526
|
-
export interface Schema$BatchGetStatsResponse {
|
|
527
|
-
/**
|
|
528
|
-
* Output only. Etag of this resource.
|
|
529
|
-
*/
|
|
530
|
-
etag?: string | null;
|
|
531
|
-
/**
|
|
532
|
-
* Output only. The videos' stats information.
|
|
533
|
-
*/
|
|
534
|
-
items?: Schema$VideoStat[];
|
|
535
|
-
/**
|
|
536
|
-
* Output only. Identifies what kind of resource this is. Value: the fixed string "youtube#batchGetStatsResponse".
|
|
537
|
-
*/
|
|
538
|
-
kind?: string | null;
|
|
539
|
-
}
|
|
540
523
|
/**
|
|
541
524
|
* A *caption* resource represents a YouTube caption track. A caption track is associated with exactly one YouTube video.
|
|
542
525
|
*/
|
|
@@ -4577,35 +4560,6 @@ export namespace youtube_v3 {
|
|
|
4577
4560
|
*/
|
|
4578
4561
|
title?: string | null;
|
|
4579
4562
|
}
|
|
4580
|
-
/**
|
|
4581
|
-
* A *VideoStat* resource represents a YouTube video's stats.
|
|
4582
|
-
*/
|
|
4583
|
-
export interface Schema$VideoStat {
|
|
4584
|
-
/**
|
|
4585
|
-
* Output only. The VideoStatsContentDetails object contains information about the video content, including the length of the video.
|
|
4586
|
-
*/
|
|
4587
|
-
contentDetails?: Schema$VideoStatsContentDetails;
|
|
4588
|
-
/**
|
|
4589
|
-
* Output only. Etag of this resource.
|
|
4590
|
-
*/
|
|
4591
|
-
etag?: string | null;
|
|
4592
|
-
/**
|
|
4593
|
-
* Output only. The ID that YouTube uses to uniquely identify the video.
|
|
4594
|
-
*/
|
|
4595
|
-
id?: string | null;
|
|
4596
|
-
/**
|
|
4597
|
-
* Output only. Identifies what kind of resource this is. Value: the fixed string "youtube#videoStats".
|
|
4598
|
-
*/
|
|
4599
|
-
kind?: string | null;
|
|
4600
|
-
/**
|
|
4601
|
-
* Output only. The VideoStatsSnippet object contains basic details about the video, such publish time.
|
|
4602
|
-
*/
|
|
4603
|
-
snippet?: Schema$VideoStatsSnippet;
|
|
4604
|
-
/**
|
|
4605
|
-
* Output only. The VideoStatsStatistics object contains statistics about the video.
|
|
4606
|
-
*/
|
|
4607
|
-
statistics?: Schema$VideoStatsStatistics;
|
|
4608
|
-
}
|
|
4609
4563
|
/**
|
|
4610
4564
|
* Statistics about the video, such as the number of times the video was viewed or liked.
|
|
4611
4565
|
*/
|
|
@@ -4631,41 +4585,6 @@ export namespace youtube_v3 {
|
|
|
4631
4585
|
*/
|
|
4632
4586
|
viewCount?: string | null;
|
|
4633
4587
|
}
|
|
4634
|
-
/**
|
|
4635
|
-
* Details about the content of a YouTube Video. This is a subset of the information in VideoContentDetails specifically for the Videos.stats API.
|
|
4636
|
-
*/
|
|
4637
|
-
export interface Schema$VideoStatsContentDetails {
|
|
4638
|
-
/**
|
|
4639
|
-
* 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.
|
|
4640
|
-
*/
|
|
4641
|
-
duration?: string | null;
|
|
4642
|
-
}
|
|
4643
|
-
/**
|
|
4644
|
-
* Basic details about a video. This is a subset of the information in VideoSnippet specifically for the Videos.stats API.
|
|
4645
|
-
*/
|
|
4646
|
-
export interface Schema$VideoStatsSnippet {
|
|
4647
|
-
/**
|
|
4648
|
-
* 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.
|
|
4649
|
-
*/
|
|
4650
|
-
publishTime?: string | null;
|
|
4651
|
-
}
|
|
4652
|
-
/**
|
|
4653
|
-
* Statistics about the video, such as the number of times the video was viewed or liked.
|
|
4654
|
-
*/
|
|
4655
|
-
export interface Schema$VideoStatsStatistics {
|
|
4656
|
-
/**
|
|
4657
|
-
* Output only. The number of comments for the video.
|
|
4658
|
-
*/
|
|
4659
|
-
commentCount?: string | null;
|
|
4660
|
-
/**
|
|
4661
|
-
* Output only. The number of users who have indicated that they liked the video by giving it a positive rating.
|
|
4662
|
-
*/
|
|
4663
|
-
likeCount?: string | null;
|
|
4664
|
-
/**
|
|
4665
|
-
* Output only. The number of times the video has been viewed.
|
|
4666
|
-
*/
|
|
4667
|
-
viewCount?: string | null;
|
|
4668
|
-
}
|
|
4669
4588
|
/**
|
|
4670
4589
|
* Basic details about a video category, such as its localized title. Next Id: 19
|
|
4671
4590
|
*/
|
|
@@ -19279,11 +19198,9 @@ export namespace youtube_v3 {
|
|
|
19279
19198
|
export class Resource$Youtube$V3 {
|
|
19280
19199
|
context: APIRequestContext;
|
|
19281
19200
|
liveChat: Resource$Youtube$V3$Livechat;
|
|
19282
|
-
videos: Resource$Youtube$V3$Videos;
|
|
19283
19201
|
constructor(context: APIRequestContext) {
|
|
19284
19202
|
this.context = context;
|
|
19285
19203
|
this.liveChat = new Resource$Youtube$V3$Livechat(this.context);
|
|
19286
|
-
this.videos = new Resource$Youtube$V3$Videos(this.context);
|
|
19287
19204
|
}
|
|
19288
19205
|
|
|
19289
19206
|
/**
|
|
@@ -19661,173 +19578,4 @@ export namespace youtube_v3 {
|
|
|
19661
19578
|
*/
|
|
19662
19579
|
profileImageSize?: number;
|
|
19663
19580
|
}
|
|
19664
|
-
|
|
19665
|
-
export class Resource$Youtube$V3$Videos {
|
|
19666
|
-
context: APIRequestContext;
|
|
19667
|
-
constructor(context: APIRequestContext) {
|
|
19668
|
-
this.context = context;
|
|
19669
|
-
}
|
|
19670
|
-
|
|
19671
|
-
/**
|
|
19672
|
-
* Retrieves a batch of VideoStat resources, possibly filtered.
|
|
19673
|
-
* @example
|
|
19674
|
-
* ```js
|
|
19675
|
-
* // Before running the sample:
|
|
19676
|
-
* // - Enable the API at:
|
|
19677
|
-
* // https://console.developers.google.com/apis/api/youtube.googleapis.com
|
|
19678
|
-
* // - Login into gcloud by running:
|
|
19679
|
-
* // ```sh
|
|
19680
|
-
* // $ gcloud auth application-default login
|
|
19681
|
-
* // ```
|
|
19682
|
-
* // - Install the npm module by running:
|
|
19683
|
-
* // ```sh
|
|
19684
|
-
* // $ npm install googleapis
|
|
19685
|
-
* // ```
|
|
19686
|
-
*
|
|
19687
|
-
* const {google} = require('googleapis');
|
|
19688
|
-
* const youtube = google.youtube('v3');
|
|
19689
|
-
*
|
|
19690
|
-
* async function main() {
|
|
19691
|
-
* const auth = new google.auth.GoogleAuth({
|
|
19692
|
-
* // Scopes can be specified either as an array or as a single, space-delimited string.
|
|
19693
|
-
* scopes: [],
|
|
19694
|
-
* });
|
|
19695
|
-
*
|
|
19696
|
-
* // Acquire an auth client, and bind it to all future calls
|
|
19697
|
-
* const authClient = await auth.getClient();
|
|
19698
|
-
* google.options({auth: authClient});
|
|
19699
|
-
*
|
|
19700
|
-
* // Do the magic
|
|
19701
|
-
* const res = await youtube.youtube.v3.videos.batchGetStats({
|
|
19702
|
-
* // Required. Return videos with the given ids.
|
|
19703
|
-
* id: 'placeholder-value',
|
|
19704
|
-
* // 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.
|
|
19705
|
-
* onBehalfOfContentOwner: 'placeholder-value',
|
|
19706
|
-
* // 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.
|
|
19707
|
-
* part: 'placeholder-value',
|
|
19708
|
-
* });
|
|
19709
|
-
* console.log(res.data);
|
|
19710
|
-
*
|
|
19711
|
-
* // Example response
|
|
19712
|
-
* // {
|
|
19713
|
-
* // "etag": "my_etag",
|
|
19714
|
-
* // "items": [],
|
|
19715
|
-
* // "kind": "my_kind"
|
|
19716
|
-
* // }
|
|
19717
|
-
* }
|
|
19718
|
-
*
|
|
19719
|
-
* main().catch(e => {
|
|
19720
|
-
* console.error(e);
|
|
19721
|
-
* throw e;
|
|
19722
|
-
* });
|
|
19723
|
-
*
|
|
19724
|
-
* ```
|
|
19725
|
-
*
|
|
19726
|
-
* @param params - Parameters for request
|
|
19727
|
-
* @param options - Optionally override request options, such as `url`, `method`, and `encoding`.
|
|
19728
|
-
* @param callback - Optional callback that handles the response.
|
|
19729
|
-
* @returns A promise if used with async/await, or void if used with a callback.
|
|
19730
|
-
*/
|
|
19731
|
-
batchGetStats(
|
|
19732
|
-
params: Params$Resource$Youtube$V3$Videos$Batchgetstats,
|
|
19733
|
-
options: StreamMethodOptions
|
|
19734
|
-
): Promise<GaxiosResponseWithHTTP2<Readable>>;
|
|
19735
|
-
batchGetStats(
|
|
19736
|
-
params?: Params$Resource$Youtube$V3$Videos$Batchgetstats,
|
|
19737
|
-
options?: MethodOptions
|
|
19738
|
-
): Promise<GaxiosResponseWithHTTP2<Schema$BatchGetStatsResponse>>;
|
|
19739
|
-
batchGetStats(
|
|
19740
|
-
params: Params$Resource$Youtube$V3$Videos$Batchgetstats,
|
|
19741
|
-
options: StreamMethodOptions | BodyResponseCallback<Readable>,
|
|
19742
|
-
callback: BodyResponseCallback<Readable>
|
|
19743
|
-
): void;
|
|
19744
|
-
batchGetStats(
|
|
19745
|
-
params: Params$Resource$Youtube$V3$Videos$Batchgetstats,
|
|
19746
|
-
options:
|
|
19747
|
-
| MethodOptions
|
|
19748
|
-
| BodyResponseCallback<Schema$BatchGetStatsResponse>,
|
|
19749
|
-
callback: BodyResponseCallback<Schema$BatchGetStatsResponse>
|
|
19750
|
-
): void;
|
|
19751
|
-
batchGetStats(
|
|
19752
|
-
params: Params$Resource$Youtube$V3$Videos$Batchgetstats,
|
|
19753
|
-
callback: BodyResponseCallback<Schema$BatchGetStatsResponse>
|
|
19754
|
-
): void;
|
|
19755
|
-
batchGetStats(
|
|
19756
|
-
callback: BodyResponseCallback<Schema$BatchGetStatsResponse>
|
|
19757
|
-
): void;
|
|
19758
|
-
batchGetStats(
|
|
19759
|
-
paramsOrCallback?:
|
|
19760
|
-
| Params$Resource$Youtube$V3$Videos$Batchgetstats
|
|
19761
|
-
| BodyResponseCallback<Schema$BatchGetStatsResponse>
|
|
19762
|
-
| BodyResponseCallback<Readable>,
|
|
19763
|
-
optionsOrCallback?:
|
|
19764
|
-
| MethodOptions
|
|
19765
|
-
| StreamMethodOptions
|
|
19766
|
-
| BodyResponseCallback<Schema$BatchGetStatsResponse>
|
|
19767
|
-
| BodyResponseCallback<Readable>,
|
|
19768
|
-
callback?:
|
|
19769
|
-
| BodyResponseCallback<Schema$BatchGetStatsResponse>
|
|
19770
|
-
| BodyResponseCallback<Readable>
|
|
19771
|
-
):
|
|
19772
|
-
| void
|
|
19773
|
-
| Promise<GaxiosResponseWithHTTP2<Schema$BatchGetStatsResponse>>
|
|
19774
|
-
| Promise<GaxiosResponseWithHTTP2<Readable>> {
|
|
19775
|
-
let params = (paramsOrCallback ||
|
|
19776
|
-
{}) as Params$Resource$Youtube$V3$Videos$Batchgetstats;
|
|
19777
|
-
let options = (optionsOrCallback || {}) as MethodOptions;
|
|
19778
|
-
|
|
19779
|
-
if (typeof paramsOrCallback === 'function') {
|
|
19780
|
-
callback = paramsOrCallback;
|
|
19781
|
-
params = {} as Params$Resource$Youtube$V3$Videos$Batchgetstats;
|
|
19782
|
-
options = {};
|
|
19783
|
-
}
|
|
19784
|
-
|
|
19785
|
-
if (typeof optionsOrCallback === 'function') {
|
|
19786
|
-
callback = optionsOrCallback;
|
|
19787
|
-
options = {};
|
|
19788
|
-
}
|
|
19789
|
-
|
|
19790
|
-
const rootUrl = options.rootUrl || 'https://youtube.googleapis.com/';
|
|
19791
|
-
const parameters = {
|
|
19792
|
-
options: Object.assign(
|
|
19793
|
-
{
|
|
19794
|
-
url: (rootUrl + '/youtube/v3/videos:batchGetStats').replace(
|
|
19795
|
-
/([^:]\/)\/+/g,
|
|
19796
|
-
'$1'
|
|
19797
|
-
),
|
|
19798
|
-
method: 'GET',
|
|
19799
|
-
apiVersion: '',
|
|
19800
|
-
},
|
|
19801
|
-
options
|
|
19802
|
-
),
|
|
19803
|
-
params,
|
|
19804
|
-
requiredParams: [],
|
|
19805
|
-
pathParams: [],
|
|
19806
|
-
context: this.context,
|
|
19807
|
-
};
|
|
19808
|
-
if (callback) {
|
|
19809
|
-
createAPIRequest<Schema$BatchGetStatsResponse>(
|
|
19810
|
-
parameters,
|
|
19811
|
-
callback as BodyResponseCallback<unknown>
|
|
19812
|
-
);
|
|
19813
|
-
} else {
|
|
19814
|
-
return createAPIRequest<Schema$BatchGetStatsResponse>(parameters);
|
|
19815
|
-
}
|
|
19816
|
-
}
|
|
19817
|
-
}
|
|
19818
|
-
|
|
19819
|
-
export interface Params$Resource$Youtube$V3$Videos$Batchgetstats extends StandardParameters {
|
|
19820
|
-
/**
|
|
19821
|
-
* Required. Return videos with the given ids.
|
|
19822
|
-
*/
|
|
19823
|
-
id?: string[];
|
|
19824
|
-
/**
|
|
19825
|
-
* 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.
|
|
19826
|
-
*/
|
|
19827
|
-
onBehalfOfContentOwner?: string;
|
|
19828
|
-
/**
|
|
19829
|
-
* 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.
|
|
19830
|
-
*/
|
|
19831
|
-
part?: string[];
|
|
19832
|
-
}
|
|
19833
19581
|
}
|