UNPKG

@remcostoeten/fync

Version:

Unified TypeScript library for 9 popular APIs with consistent functional architecture

275 lines 7.83 kB
import { type TModule } from "../core"; declare const resources: { tracks: import("../core").TResourceConfig<{ getTrack: { path: string; }; getTracks: { path: string; }; getTrackAudioFeatures: { path: string; }; getTrackAudioAnalysis: { path: string; }; }>; artists: import("../core").TResourceConfig<{ getArtist: { path: string; }; getArtists: { path: string; }; getArtistAlbums: { path: string; }; getArtistTopTracks: { path: string; }; getArtistRelatedArtists: { path: string; }; }>; albums: import("../core").TResourceConfig<{ getAlbum: { path: string; }; getAlbums: { path: string; }; getAlbumTracks: { path: string; }; }>; playlists: import("../core").TResourceConfig<{ getPlaylist: { path: string; }; getPlaylistTracks: { path: string; }; createPlaylist: { path: string; method: "POST"; }; updatePlaylist: { path: string; method: "PUT"; }; addTracksToPlaylist: { path: string; method: "POST"; }; removeTracksFromPlaylist: { path: string; method: "DELETE"; }; getFeaturedPlaylists: { path: string; }; getCategoryPlaylists: { path: string; }; }>; search: import("../core").TResourceConfig<{ search: { path: string; }; }>; users: import("../core").TResourceConfig<{ getUser: { path: string; }; getUserPlaylists: { path: string; }; }>; me: import("../core").TResourceConfig<{ getCurrentUser: { path: string; }; getMyTopArtists: { path: string; }; getMyTopTracks: { path: string; }; getMyPlaylists: { path: string; }; getMySavedTracks: { path: string; }; getMySavedAlbums: { path: string; }; getMySavedShows: { path: string; }; getMyRecentlyPlayed: { path: string; }; getFollowedArtists: { path: string; }; saveTracks: { path: string; method: "PUT"; }; removeSavedTracks: { path: string; method: "DELETE"; }; saveAlbums: { path: string; method: "PUT"; }; removeSavedAlbums: { path: string; method: "DELETE"; }; followArtists: { path: string; method: "PUT"; }; unfollowArtists: { path: string; method: "DELETE"; }; followPlaylist: { path: string; method: "PUT"; }; unfollowPlaylist: { path: string; method: "DELETE"; }; }>; player: import("../core").TResourceConfig<{ getPlaybackState: { path: string; }; getCurrentlyPlaying: { path: string; }; getDevices: { path: string; }; play: { path: string; method: "PUT"; }; pause: { path: string; method: "PUT"; }; next: { path: string; method: "POST"; }; previous: { path: string; method: "POST"; }; seek: { path: string; method: "PUT"; }; setVolume: { path: string; method: "PUT"; }; setRepeat: { path: string; method: "PUT"; }; setShuffle: { path: string; method: "PUT"; }; transferPlayback: { path: string; method: "PUT"; }; addToQueue: { path: string; method: "POST"; }; }>; browse: import("../core").TResourceConfig<{ getNewReleases: { path: string; }; getFeaturedPlaylists: { path: string; }; getCategories: { path: string; }; getCategory: { path: string; }; getCategoryPlaylists: { path: string; }; getRecommendations: { path: string; }; getAvailableGenreSeeds: { path: string; }; }>; }; type TSpotifyModule = TModule<typeof resources> & { getTrack: (trackId: string) => Promise<any>; getArtist: (artistId: string) => Promise<any>; getAlbum: (albumId: string) => Promise<any>; getPlaylist: (playlistId: string) => Promise<any>; search: (query: string, types: string[], options?: any) => Promise<any>; getMyTopTracks: (options?: any) => Promise<any>; getMyTopArtists: (options?: any) => Promise<any>; getRecentlyPlayed: (options?: any) => Promise<any>; getCurrentlyPlaying: () => Promise<any>; getRecommendations: (options: any) => Promise<any>; createPlaylist: (userId: string, name: string, options?: any) => Promise<any>; addTracksToPlaylist: (playlistId: string, trackUris: string[]) => Promise<any>; playTrack: (trackUri: string, deviceId?: string) => Promise<any>; pausePlayback: () => Promise<any>; skipToNext: () => Promise<any>; skipToPrevious: () => Promise<any>; getUserPlaylists: (userId?: string) => Promise<any>; getAudioFeatures: (trackId: string) => Promise<any>; searchTracks: (query: string, options?: any) => Promise<any>; searchArtists: (query: string, options?: any) => Promise<any>; searchAlbums: (query: string, options?: any) => Promise<any>; searchPlaylists: (query: string, options?: any) => Promise<any>; getCurrentUser: () => Promise<any>; getUserProfile: (userId: string) => Promise<any>; getCurrentPlayback: () => Promise<any>; getPlaylistTracks: (playlistId: string) => Promise<any>; play: (options?: any) => Promise<any>; pause: () => Promise<any>; seek: (position: number) => Promise<any>; setRepeatMode: (mode: string) => Promise<any>; setShuffle: (state: boolean) => Promise<any>; setVolume: (volume: number) => Promise<any>; updatePlaylist: (playlistId: string, options: any) => Promise<any>; removeTracksFromPlaylist: (playlistId: string, trackUris: string[]) => Promise<any>; reorderPlaylistTracks: (playlistId: string, rangeStart: number, insertBefore: number, rangeLength?: number) => Promise<any>; replacePlaylistTracks: (playlistId: string, trackUris: string[]) => Promise<any>; searchShows: (query: string, options?: any) => Promise<any>; searchEpisodes: (query: string, options?: any) => Promise<any>; getCurrentUserTopItems: (type: string, options?: any) => Promise<any>; getCurrentUserFollows: (type: string, ids: string[]) => Promise<any>; follow: (type: string, ids: string[]) => Promise<any>; unfollow: (type: string, ids: string[]) => Promise<any>; checkFollows: (type: string, ids: string[]) => Promise<any>; updateUserProfile: (options: any) => Promise<any>; getCurrentUserProfile: () => Promise<any>; }; export declare function Spotify(config: { token: string; }): TSpotifyModule; export {}; //# sourceMappingURL=index.d.ts.map