SongGuess
    Preparing search index...

    Function safeSearch

    • Safely searches using the iTunes Store API. Also handles potential caching issues.

      Type Parameters

      • M extends Media
      • E extends
            | "song"
            | "audiobook"
            | "ebook"
            | "movie"
            | "musicVideo"
            | "podcast"
            | "shortFilm"
            | "software"
            | "audiobookAuthor"
            | "movieArtist"
            | "album"
            | "mix"
            | "musicArtist"
            | "musicTrack"
            | "podcastAuthor"
            | "shortFilmArtist"
            | "iPadSoftware"
            | "macSoftware"
            | "tvSoftware"
            | "tvEpisode"
            | "tvSeason"
            | "allArtist"
            | "allTrack"

      Parameters

      • term: string

        The search term.

      • options: Partial<Options<M, E>> = {}

        Optional search options.

      Returns Promise<(E extends undefined ? Results[Entities[M]] : Results[E])[]>

      Promise resolving to an array of results.