Options
All
  • Public
  • Public/Protected
  • All
Menu

Hierarchy

  • SCDL

Index

Constructors

constructor

Properties

FORMATS

FORMATS: {}

Type declaration

STREAMING_PROTOCOLS

STREAMING_PROTOCOLS: {}

Type declaration

Private Optional _clientID

_clientID: string

Private Optional _filePath

_filePath: string

axios

axios: AxiosInstance

convertFirebaseLinks

convertFirebaseLinks: boolean

saveClientID

saveClientID: boolean = ...

stripMobilePrefix

stripMobilePrefix: boolean

Methods

download

  • download(url: string, useDirectLink?: boolean): Promise<any>
  • Get the audio of a given track. It returns the first format found.

    Parameters

    • url: string

      The URL of the Soundcloud track

    • useDirectLink: boolean = true

      Whether or not to use the download link if the artist has set the track to be downloadable. This has erratic behaviour on some environments.

    Returns Promise<any>

    A ReadableStream containing the audio data

downloadFormat

  • downloadFormat(url: string, format: default): Promise<any>
  • Get the audio of a given track with the specified format

    Parameters

    • url: string

      The URL of the Soundcloud track

    • format: default

      The desired format

    Returns Promise<any>

downloadPlaylist

  • downloadPlaylist(url: string): Promise<[ReadableStream<any>[], String[]]>
  • Returns the audio streams and titles of the tracks in the given playlist.

    Parameters

    • url: string

      The url of the playlist

    Returns Promise<[ReadableStream<any>[], String[]]>

filterMedia

  • Returns a media Transcoding that matches the given predicate object

    Parameters

    Returns Transcoding[]

    An array of Transcodings that match the predicate object

getClientID

  • getClientID(): Promise<string>

getInfo

  • Returns info about a given track.

    Parameters

    • url: string

      URL of the Soundcloud track

    Returns Promise<TrackInfo>

    Info about the track

getLikes

  • Returns track information for a user's likes

    Parameters

    • options: GetLikesOptions

      Can either be the profile URL of the user, or their ID

    Returns Promise<PaginatedQuery<Like>>

    • An array of tracks

getSetInfo

  • getSetInfo(url: string): Promise<SetInfo>
  • Returns info about the given set

    Parameters

    • url: string

      URL of the Soundcloud set

    Returns Promise<SetInfo>

    Info about the set

getTrackInfoByID

  • getTrackInfoByID(ids: number[], playlistID?: number, playlistSecretToken?: string): Promise<TrackInfo[]>
  • Returns info about the given track(s) specified by ID.

    Parameters

    • ids: number[]

      The ID(s) of the tracks

    • Optional playlistID: number
    • Optional playlistSecretToken: string

    Returns Promise<TrackInfo[]>

    Info about the track

getUser

  • getUser(url: string): Promise<User>
  • Returns information about a user

    Parameters

    • url: string

      The profile URL of the user

    Returns Promise<User>

isFirebaseURL

  • isFirebaseURL(url: string): boolean

isPersonalizedTrackURL

  • isPersonalizedTrackURL(url: string): boolean

isPlaylistURL

  • isPlaylistURL(url: string): boolean
  • Returns whether or not the given URL is a valid playlist SoundCloud URL

    Parameters

    • url: string

      The URL to check

    Returns boolean

isValidUrl

  • isValidUrl(url: string): boolean
  • Returns whether or not the given URL is a valid Soundcloud URL

    Parameters

    • url: string

      URL of the Soundcloud track

    Returns boolean

prepareURL

  • prepareURL(url: string): Promise<string>
  • Prepares the given URL by stripping its mobile prefix (if this.stripMobilePrefix is true) and converting it to a regular URL (if this.convertFireBaseLinks is true.)

    Parameters

    • url: string

    Returns Promise<string>

related

  • Finds related tracks to the given track specified by ID

    Parameters

    • id: number

      The ID of the track

    • limit: number

      The number of results to return

    • offset: number = 0

      Used for pagination, set to 0 if you will not use this feature.

    Returns Promise<RelatedResponse<TrackInfo>>

search

setAxiosInstance

  • setAxiosInstance(instance: AxiosInstance): void
  • Sets the instance of Axios to use to make requests to SoundCloud API

    Parameters

    • instance: AxiosInstance

      An instance of Axios

    Returns void

Generated using TypeDoc