Skip to content

Commit

Permalink
automatic gapi.client.youtubereporting update @ Fri, 14 Aug 2020 12:2…
Browse files Browse the repository at this point in the history
…4:01 GMT
  • Loading branch information
Maxim-Mazurok committed Aug 14, 2020
1 parent ff7d1bf commit af20e87
Show file tree
Hide file tree
Showing 5 changed files with 424 additions and 288 deletions.
@@ -1,7 +1,7 @@
/* This is stub file for gapi.client.{{=it.name}} definition tests */
/* This is stub file for gapi.client.youtubereporting definition tests */
/* IMPORTANT.
* This file was automatically generated by https://github.com/Bolisov/google-api-typings-generator. Please do not edit it manually.
* In case of any problems please post issue to https://github.com/Bolisov/google-api-typings-generator
* This file was automatically generated by https://github.com/Maxim-Mazurok/google-api-typings-generator. Please do not edit it manually.
* In case of any problems please post issue to https://github.com/Maxim-Mazurok/google-api-typings-generator
**/
gapi.load('client', () => {
/** now we can use gapi.client */
Expand All @@ -17,53 +17,120 @@ gapi.load('client', () => {
/** View YouTube Analytics reports for your YouTube content */
'https://www.googleapis.com/auth/yt-analytics.readonly',
];
const immediate = true;
const immediate = false;
gapi.auth.authorize({ client_id, scope, immediate }, authResult => {
if (authResult && !authResult.error) {
/** handle succesfull authorization */
/** handle successful authorization */
run();
} else {
/** handle authorization error */
}
});
run();
});

async function run() {
/** Creates a job and returns it. */
await gapi.client.jobs.create({
onBehalfOfContentOwner: "onBehalfOfContentOwner",
await gapi.client.youtubereporting.jobs.create({
onBehalfOfContentOwner: "Test string",
}, {
createTime: "Test string",
expireTime: "Test string",
id: "Test string",
name: "Test string",
reportTypeId: "Test string",
systemManaged: true,
});
/** Gets the metadata of a specific report. */
await gapi.client.youtubereporting.jobs.reports.get({
jobId: "Test string",
onBehalfOfContentOwner: "Test string",
reportId: "Test string",
});
/** Lists reports created by a specific job. Returns NOT_FOUND if the job does not exist. */
await gapi.client.youtubereporting.jobs.reports.list({
createdAfter: "Test string",
jobId: "Test string",
onBehalfOfContentOwner: "Test string",
pageSize: 42,
pageToken: "Test string",
startTimeAtOrAfter: "Test string",
startTimeBefore: "Test string",
});
/** Deletes a job. */
await gapi.client.jobs.delete({
jobId: "jobId",
onBehalfOfContentOwner: "onBehalfOfContentOwner",
await gapi.client.youtubereporting.jobs.delete({
jobId: "Test string",
onBehalfOfContentOwner: "Test string",
});
/** Gets the metadata of a specific report. */
await gapi.client.youtubereporting.jobs.reports.get({
jobId: "Test string",
onBehalfOfContentOwner: "Test string",
reportId: "Test string",
});
/** Lists reports created by a specific job. Returns NOT_FOUND if the job does not exist. */
await gapi.client.youtubereporting.jobs.reports.list({
createdAfter: "Test string",
jobId: "Test string",
onBehalfOfContentOwner: "Test string",
pageSize: 42,
pageToken: "Test string",
startTimeAtOrAfter: "Test string",
startTimeBefore: "Test string",
});
/** Gets a job. */
await gapi.client.jobs.get({
jobId: "jobId",
onBehalfOfContentOwner: "onBehalfOfContentOwner",
await gapi.client.youtubereporting.jobs.get({
jobId: "Test string",
onBehalfOfContentOwner: "Test string",
});
/** Gets the metadata of a specific report. */
await gapi.client.youtubereporting.jobs.reports.get({
jobId: "Test string",
onBehalfOfContentOwner: "Test string",
reportId: "Test string",
});
/** Lists reports created by a specific job. Returns NOT_FOUND if the job does not exist. */
await gapi.client.youtubereporting.jobs.reports.list({
createdAfter: "Test string",
jobId: "Test string",
onBehalfOfContentOwner: "Test string",
pageSize: 42,
pageToken: "Test string",
startTimeAtOrAfter: "Test string",
startTimeBefore: "Test string",
});
/** Lists jobs. */
await gapi.client.jobs.list({
await gapi.client.youtubereporting.jobs.list({
includeSystemManaged: true,
onBehalfOfContentOwner: "onBehalfOfContentOwner",
pageSize: 3,
pageToken: "pageToken",
onBehalfOfContentOwner: "Test string",
pageSize: 42,
pageToken: "Test string",
});
/** Gets the metadata of a specific report. */
await gapi.client.youtubereporting.jobs.reports.get({
jobId: "Test string",
onBehalfOfContentOwner: "Test string",
reportId: "Test string",
});
/** Lists reports created by a specific job. Returns NOT_FOUND if the job does not exist. */
await gapi.client.youtubereporting.jobs.reports.list({
createdAfter: "Test string",
jobId: "Test string",
onBehalfOfContentOwner: "Test string",
pageSize: 42,
pageToken: "Test string",
startTimeAtOrAfter: "Test string",
startTimeBefore: "Test string",
});
/**
* Method for media download. Download is supported
* on the URI `/v1/media/{+name}?alt=media`.
*/
await gapi.client.media.download({
resourceName: "resourceName",
/** Method for media download. Download is supported on the URI `/v1/media/{+name}?alt=media`. */
await gapi.client.youtubereporting.media.download({
resourceName: "Test string",
});
/** Lists report types. */
await gapi.client.reportTypes.list({
await gapi.client.youtubereporting.reportTypes.list({
includeSystemManaged: true,
onBehalfOfContentOwner: "onBehalfOfContentOwner",
pageSize: 3,
pageToken: "pageToken",
onBehalfOfContentOwner: "Test string",
pageSize: 42,
pageToken: "Test string",
});
}
});

0 comments on commit af20e87

Please sign in to comment.