Skip to content

Instantly share code, notes, and snippets.

@aik0aaac
Created June 2, 2023 12:05
Show Gist options
  • Save aik0aaac/0eeb3b5de5417f63c9215ef790cfa87a to your computer and use it in GitHub Desktop.
Save aik0aaac/0eeb3b5de5417f63c9215ef790cfa87a to your computer and use it in GitHub Desktop.
Youtube Reporting API > reportTypes.listのRequest/Response内容。(TypeScript-Interface)
/**
* Youtube Reporting API > `reportTypes.list`のリクエスト。
* 公式Docs: https://developers.google.com/youtube/reporting/v1/reference/rest/v1/reportTypes/list?hl=ja
*/
export interface IReportTypeRequest {
/**
* コンテンツ所有者ID。
* 未指定の場合ユーザーに紐づくチャンネルのレポート種別が取得される。
*/
onBehalfOfContentOwner?: string;
/**
* 1回のリクエストで取得できるデータ数を指定できる。
*/
pageSize?: number;
/**
* paging機能を使う場合に使用。
*/
pageToken?: string;
/**
* レスポンスに[システム管理者レポート](https://developers.google.com/youtube/reporting/v1/reports/system_managed?hl=ja)も含めるかどうか。
*/
includeSystemManaged: boolean;
}
/**
* Youtube Reporting API > `reportTypes.list`のレスポンス。
* 公式Docs: https://developers.google.com/youtube/reporting/v1/reference/rest/v1/reportTypes/list?hl=ja
*/
export interface IReportTypeResponse {
/**
* レポート種別群。
* そのチャンネルorコンテンツ所有者が取得可能なレポート種別が列挙される。
*/
reportTypes: {
/**
* レポート種別ID。
* `jobs.create`にてどのレポートを集計したいか指定する際に使用。
*/
id: string;
/**
* レポート種別名。MAX100文字。
*/
name: string;
/**
* そのレポート種別をYoutube側がサポートしなくなった(非推奨となった)日付。
* タイムスタンプ形式で指定。
* この日付以降、対象のレポート種別はジョブ登録されていても集計されなくなる。
*/
deprecateTime: number;
/**
* コンテンツ所有者向けプロパティ。
* この値が`true`の場合は、ジョブ登録されなくても自動的にレポートが集計される。
*/
systemManaged: boolean;
}[];
/**
* 次ページへのページングトークン。
*/
nextPageToken: string;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment