n8n-nodes-base
Version:
Base nodes of n8n
137 lines (132 loc) • 4.06 kB
text/typescript
/**
* YouTube Node - Version 1
* Discriminator: resource=channel, operation=getAll
*/
interface Credentials {
youTubeOAuth2Api: CredentialReference;
}
/** Retrieve many channels */
export type YouTubeV1ChannelGetAllParams = {
resource: 'channel';
operation: 'getAll';
/**
* The fields parameter specifies a comma-separated list of one or more channel resource properties that the API response will include
* @default ["*"]
*/
part?: Array<'*' | 'brandingSettings' | 'contentDetails' | 'contentOwnerDetails' | 'id' | 'localizations' | 'snippet' | 'statistics' | 'status' | 'topicDetails'>;
/**
* Whether to return all results or only up to a given limit
* @default false
*/
returnAll?: boolean | Expression<boolean>;
/**
* Max number of results to return
* @displayOptions.show { returnAll: [false] }
* @default 25
*/
limit?: number | Expression<number>;
/**
* Filters
* @default {}
*/
filters?: {
/** The categoryId parameter specifies a YouTube guide category, thereby requesting YouTube channels associated with that category
*/
categoryId?: string | Expression<string> | PlaceholderValue;
/** The forUsername parameter specifies a YouTube username, thereby requesting the channel associated with that username
*/
forUsername?: string | Expression<string> | PlaceholderValue;
/** 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 | Expression<string> | PlaceholderValue;
/** Whether to instruct the API to only return channels managed by the content owner that the onBehalfOfContentOwner parameter specifies
* @default false
*/
managedByMe?: boolean | Expression<boolean>;
};
/**
* Options
* @default {}
*/
options?: {
/** The hl parameter instructs the API to retrieve localized resource metadata for a specific application language that the YouTube website supports. Choose from the list, or specify an ID using an <a href="https://docs.n8n.io/code/expressions/">expression</a>.
*/
h1?: string | Expression<string>;
/** 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
*/
onBehalfOfContentOwner?: string | Expression<string> | PlaceholderValue;
};
};
export type YouTubeV1ChannelGetAllOutput = {
brandingSettings?: {
channel?: {
country?: string;
description?: string;
keywords?: string;
title?: string;
};
image?: {
bannerExternalUrl?: string;
};
};
contentDetails?: {
relatedPlaylists?: {
likes?: string;
uploads?: string;
};
};
etag?: string;
id?: string;
kind?: string;
snippet?: {
country?: string;
customUrl?: string;
description?: string;
localized?: {
description?: string;
title?: string;
};
publishedAt?: string;
thumbnails?: {
'default'?: {
height?: number;
url?: string;
width?: number;
};
high?: {
height?: number;
url?: string;
width?: number;
};
medium?: {
height?: number;
url?: string;
width?: number;
};
};
title?: string;
};
statistics?: {
hiddenSubscriberCount?: boolean;
subscriberCount?: string;
videoCount?: string;
viewCount?: string;
};
status?: {
isChannelMonetizationEnabled?: boolean;
isLinked?: boolean;
longUploadsStatus?: string;
privacyStatus?: string;
};
topicDetails?: {
topicCategories?: Array<string>;
topicIds?: Array<string>;
};
};
export type YouTubeV1ChannelGetAllNode = {
type: 'n8n-nodes-base.youTube';
version: 1;
credentials?: Credentials;
config: NodeConfig<YouTubeV1ChannelGetAllParams>;
output?: Items<YouTubeV1ChannelGetAllOutput>;
};