n8n-nodes-base
Version:
Base nodes of n8n
98 lines (93 loc) • 2.17 kB
text/typescript
/**
* Spotify Node - Version 1
* Discriminator: resource=player, operation=recentlyPlayed
*/
interface Credentials {
spotifyOAuth2Api: CredentialReference;
}
/** Get your recently played tracks */
export type SpotifyV1PlayerRecentlyPlayedParams = {
resource: 'player';
operation: 'recentlyPlayed';
/**
* 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 50
*/
limit?: number | Expression<number>;
};
export type SpotifyV1PlayerRecentlyPlayedOutput = {
played_at?: string;
track?: {
album?: {
album_type?: string;
artists?: Array<{
external_urls?: {
spotify?: string;
};
href?: string;
id?: string;
name?: string;
type?: string;
uri?: string;
}>;
available_markets?: Array<string>;
external_urls?: {
spotify?: string;
};
href?: string;
id?: string;
images?: Array<{
height?: number;
url?: string;
width?: number;
}>;
name?: string;
release_date?: string;
release_date_precision?: string;
total_tracks?: number;
type?: string;
uri?: string;
};
artists?: Array<{
external_urls?: {
spotify?: string;
};
href?: string;
id?: string;
name?: string;
type?: string;
uri?: string;
}>;
available_markets?: Array<string>;
disc_number?: number;
duration_ms?: number;
explicit?: boolean;
external_ids?: {
isrc?: string;
};
external_urls?: {
spotify?: string;
};
href?: string;
id?: string;
is_local?: boolean;
name?: string;
popularity?: number;
track_number?: number;
type?: string;
uri?: string;
};
};
export type SpotifyV1PlayerRecentlyPlayedNode = {
type: 'n8n-nodes-base.spotify';
version: 1;
credentials?: Credentials;
config: NodeConfig<SpotifyV1PlayerRecentlyPlayedParams>;
output?: Items<SpotifyV1PlayerRecentlyPlayedOutput>;
};