Skip to content

Latest commit

 

History

History
206 lines (128 loc) · 2.85 KB

interfaces.md

File metadata and controls

206 lines (128 loc) · 2.85 KB

Go Back to README

Interfaces

MusicArtist

interface MusicArtist {
  id: number;
  name: string;

  artUrl?: string;
}

Members

id: number

name: string

artUrl: string | undefined

MusicAlbum

interface MusicAlbum {
  id: number;
  name: string;

  trackCount?: number;
  artUrl?: string;
  artistId?: number;
}

Members

id: number

name: string

trackCount: number | undefined

artUrl: string | undefined

artistId: number | undefined

MusicSong

interface MusicSong {
  id: number;
  name: string;

  track?: number;

  duration?: number;

  genre?: string;

  artistId?: number;
  albumId?: number;
}

Members

id: number

name: string

track: number | undefined

duration: number | undefined

genre: string | undefined

artistId: number | undefined

albumId: number | undefined

MusicSource

interface MusicSource {
  name: string;

  getArtist: (options: MusicArtistQuery) => Promise<MusicResult>;
  getAlbum: (options: MusicAlbumQuery) => Promise<MusicResult>;
  getSong: (options: MusicSongQuery) => Promise<MusicResult>;
}

Members

name: string

getArtist: (options: MusicArtistQuery) => Promise<MusicResult>

getAlbum: (options: MusicAlbumQuery) => Promise<MusicResult>

getSong: (options: MusicSongQuery) => Promise<MusicResult>

MusicQuery

interface MusicQuery {
  query: string;
  sources: MusicSource[];
}

Members

query: string

sources: MusicSource[]

MusicArtistQuery extends MusicQuery

interface MusicArtistQuery extends MusicQuery {
  includeAlbums?: boolean;
  includeSongs?: boolean;

  artistLimit?: number;
  albumLimit?: number;
  songLimit?: number;
}

Members

includeAlbums: boolean | undefined

includeSongs: boolean | undefined

artistLimit: number | undefined

albumLimit: number | undefined

songLimit: number | undefined

MusicAlbumQuery extends MusicQuery

interface MusicAlbumQuery extends MusicQuery {
  includeArtist?: boolean;
  includeSongs?: boolean;

  albumLimit?: number;
  songLimit?: number;
}

Members

includeArtist: boolean | undefined

includeSongs: boolean | undefined

albumLimit: number | undefined

songLimit: number | undefined

MusicSongQuery extends MusicQuery

interface MusicSongQuery extends MusicQuery {
  includeArtist?: boolean;
  includeAlbum?: boolean;

  songLimit?: number;
}

Members

includeArtist: boolean | undefined

includeAlbum: boolean | undefined

songLimit: number | undefined