Options
All
  • Public
  • Public/Protected
  • All
Menu

Stores cache for artists and holds their API methods

Hierarchy

Index

Constructors

constructor

Properties

Protected _holds

The type of structure held by this manager

cache

cache: Collection<string, Artist>

The cache of the structures held by this manager

client

client: Client

Client that instantiated this class

Methods

Private _fetchMany

Private _fetchSingle

Protected _search

add

  • add(id: string, cacheAfterFetching?: boolean, data: unknown): Artist
  • Converts raw data sent by the API to a structure and adds it to the cache

    Parameters

    • id: string

      The ID of the structure

    • cacheAfterFetching: boolean = true

      Whether to cache the structure or not

    • data: unknown

      The raw data returned by the API for this structure

    Returns Artist

fetch

fetchAlbums

fetchRelatedArtist

fetchTopTracks

  • Fetches top ten tracks of an artist from a given market

    Parameters

    • artist: ArtistResolvable

      The artist whose top tracks are to be fetched

    • market: string

      The market to consider for the top tracks

    Returns Promise<Collection<string, Track>>

    A collection of Track objects as a Promise

resolve

resolveID

search

Legend

  • Constructor
  • Property
  • Method
  • Constructor
  • Property
  • Inherited property
  • Inherited method
  • Protected property
  • Protected method
  • Private property
  • Private method

Generated using TypeDoc