import { type LOCALES } from './utils/Constants.js'; import Playlist from './entities/Playlist.js'; import Track from './entities/Track.js'; import SystemPlaylist from './entities/SystemPlaylist.js'; import User from './entities/User.js'; import Album from './entities/Album.js'; import type Collection from './collections/Collection.js'; import Selection from './entities/Selection.js'; import { type EntityType } from './utils/EntityTypes.js'; import LibraryItem from './entities/LibraryItem.js'; import PlayHistoryItem from './entities/PlayHistoryItem.js'; import Like from './entities/Like.js'; import type CollectionContinuation from './collections/CollectionContinuation.js'; import FeedItem, { type FeedActivityType } from './entities/FeedItem.js'; export type SoundCloudInitArgs = { clientId?: string; locale?: typeof LOCALES[number]; } & ({ accessToken: string; cookie?: never; } | { accessToken?: never; cookie: string; } | { accessToken?: never; cookie?: never; }); export interface GetCollectionOptions { limit?: number; } export interface StreamingData { url: string; licenseAuthToken?: string; } export default class SoundCloud { #private; me: { getProfile: SoundCloud['getMyProfile']; getFeed: SoundCloud['getFeed']; getPlayHistory: SoundCloud['getPlayHistory']; getLibraryItems: SoundCloud['getLibraryItems']; getLikes: SoundCloud['getMyLikes']; getStations: SoundCloud['getMyStations']; getFollowing: SoundCloud['getMyFollowing']; addToPlayHistory: SoundCloud['addToPlayHistory']; }; constructor(args?: SoundCloudInitArgs); getClientId(): Promise; static generateClientId(): Promise; getLocale(): string | undefined; setLocale(locale?: string): void; setAccessToken(value?: string): void; setCookie(value?: string): void; /************************************************************/ /************************************************************/ getMixedSelections(options?: GetCollectionOptions): Promise>; getCharts(): Promise>; /************************************************************/ /************************************************************/ getPlaylistOrAlbum(id: number): Promise; getSystemPlaylist(id: string): Promise; getPlaylistsByUser(userId: number, options?: GetCollectionOptions): Promise>; getAlbumsByUser(userId: number, options?: GetCollectionOptions): Promise>; /************************************************************/ /************************************************************/ getTopFeaturedTracks(options?: GetCollectionOptions & { genre?: string; }): Promise>; getTracks(ids: number | number[]): Promise; getTracksByUser(userId: number, options?: GetCollectionOptions): Promise>; getTrack(id: number): Promise; /** * @deprecated Use getStreamingData() instead. * @param transcodingUrl * @returns */ getStreamingUrl(transcodingUrl: string): Promise; getStreamingData(options: { transcodingUrl: string; trackAuthorization?: string; }): Promise; /************************************************************/ /************************************************************/ getUser(id: number): Promise; getFollowing(userId: number, options?: GetCollectionOptions): Promise>; /************************************************************/ /************************************************************/ search(q: string, options: GetCollectionOptions & { type: 'playlist'; }): Promise>; search(q: string, options: GetCollectionOptions & { type: 'album'; }): Promise>; search(q: string, options: GetCollectionOptions & { type: 'track'; }): Promise>; search(q: string, options: GetCollectionOptions & { type: 'user'; }): Promise>; /************************************************************/ /************************************************************/ getLikesByUser(userId: number, options: GetCollectionOptions & { type: 'track' | 'playlistAndAlbum'; }): Promise>; protected getFeed(options?: GetCollectionOptions & { activityTypes?: FeedActivityType[]; }): Promise>; protected getPlayHistory(options: GetCollectionOptions & { type: 'track' | 'set'; }): Promise>; protected getMyProfile(): Promise; protected getLibraryItems(options?: GetCollectionOptions): Promise>; protected getMyStations(options?: GetCollectionOptions): Promise>; protected getMyLikes(options: GetCollectionOptions & { type: 'track' | 'playlistAndAlbum'; }): Promise>; protected getMyFollowing(options?: GetCollectionOptions): Promise>; protected addToPlayHistory(trackOrUrn: Track | string, setOrUrn?: Album | Playlist | SystemPlaylist | string, callbacks?: { onSendPlayTrackEventError: (err: Error) => boolean; }): Promise; /************************************************************/ /************************************************************/ getContinuation(continuation: CollectionContinuation): Promise>; } //# sourceMappingURL=SoundCloud.d.ts.map