Skip to content

Instantly share code, notes, and snippets.

@erdemuslu
Created April 25, 2020 11:01
Show Gist options
  • Save erdemuslu/117aa3d3d1a0ca4c612bec8786367066 to your computer and use it in GitHub Desktop.
Save erdemuslu/117aa3d3d1a0ca4c612bec8786367066 to your computer and use it in GitHub Desktop.
function LyricsService() {
this.url = 'https://api.lyrics.ovh/v1/';
this.get = async ({ artist = '', title = '' }) => {
const response = await fetch(`${this.url}${artist}/${title}`);
return response.json();
};
}
export default new LyricsService();
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment