lunify.js
Version:
A basic api wrapper for the spotify api covering the oauth routes.
42 lines (41 loc) • 1.36 kB
TypeScript
import type { ApiPlaylistOwner, ApiPlaylistTrack } from "../../../interfaces/playlist";
import type { ApiPartialTrack, ApiTrack } from "../../../interfaces/track";
import type { Lunify } from "../..";
import { PartialAlbum } from "../album";
import { PartialArtist } from "../artist";
export declare class PartialTrack {
client: Lunify;
album: PartialAlbum;
artists: PartialArtist[];
markets: string[];
disc: number;
duration: number;
explicit: boolean;
externalUrls: Record<string, string>;
url: string;
id: string;
playable: boolean;
linkedFrom: Record<string, string>;
restrictions: ApiPartialTrack["restrictions"]["reason"] | null;
name: string;
previewUrl: string | null;
track: number;
type: "track";
uri: string;
local: boolean;
constructor(client: Lunify, data: Omit<ApiPartialTrack, "album"> & {
album?: ApiPartialTrack["album"];
});
}
export declare class Track extends PartialTrack {
client: Lunify;
externalIds: Record<string, string>;
popularity: number;
constructor(client: Lunify, data: ApiTrack);
}
export declare class PlaylistTrack extends Track {
client: Lunify;
addedTimestamp: number | null;
addedBy: Omit<ApiPlaylistOwner, "display_name"> | null;
constructor(client: Lunify, data: ApiPlaylistTrack<ApiTrack>);
}