UNPKG

@manhgdev/spotifyweb

Version:

Spotify library in typescript without using the Spotify Web API. No authentication required with automatic internal token generation.

19 lines (18 loc) 843 B
import { SpotifyMyProfile, SpotifyPlaylistContents, SpotifyPlaylistMetadata } from "./types"; export declare class SpotiflyBase { protected token: string; protected tokenExpirationTimestampMs: number; protected cookie: string; private myProfileId; constructor(cookie?: string); protected refreshToken(): Promise<void>; private generateToken; protected fetch<T>(url: string, optionalHeaders?: { [index: string]: string; }): Promise<T>; protected post<T>(url: string, body: string): Promise<T>; protected getPlaylistMetadata(id: string, limit?: number): Promise<SpotifyPlaylistMetadata>; protected getPlaylistContents(id: string, limit?: number): Promise<SpotifyPlaylistContents>; protected getMyProfile(): Promise<SpotifyMyProfile>; protected getMyProfileId(): Promise<string>; }