Skip to content

Commit

Permalink
Create genius-lyrics-api.d.ts
Browse files Browse the repository at this point in the history
I'm not sure where to put this file, but for now I will put it here

Signed-off-by: Charles Giann Marcelo <cm122927@gmail.com>
  • Loading branch information
CharlesNaig authored Oct 14, 2024
1 parent c95f805 commit fefb055
Showing 1 changed file with 36 additions and 0 deletions.
36 changes: 36 additions & 0 deletions src/utils/genius-lyrics-api.d.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
declare module 'genius-lyrics-api' {
interface SearchOptions {
apiKey: string;
title: string;
artist?: string;
optimizeQuery?: boolean;
}

interface Song {
id: number;
title: string;
url: string;
}

interface LyricsOptions {
title: string;
artist: string;
}

interface AlbumArtOptions {
title: string;
artist: string;
}

interface SongByIdOptions {
id: number;
apiKey: string;
}

export function search(options: SearchOptions): Promise<Song[]>;
export function getSong(options: { id: number; apiKey: string }): Promise<Song>;
export function getLyrics(options: LyricsOptions): Promise<string>;
export function getAlbumArt(options: AlbumArtOptions): Promise<string>;
export function getSongById(options: SongByIdOptions): Promise<Song>;
export function searchSong(options: SearchOptions): Promise<Song[]>;
}

0 comments on commit fefb055

Please sign in to comment.