UNPKG

deezer-node

Version:

Deezer platformundan API Key olmadan bilgiler çekebilmenizi sağlar.

24 lines (20 loc) 897 B
const fetch = require("axios").default; const { url } = require("../config.json"); require("../prototypes/turkishToEnglish.js"); module.exports = async(search) => { const res = await fetch(url+""+encodeURI(search.turkishToEnglish())).catch(err => { return undefined; }); if(!res) return; const values = res?.data?.data; return values.map((song) => { return { name: song?.title, id: song?.id, visit: song?.link, duration: song?.duration, explicitLyrics: song?.explicit_lyrics, artist: { name: song?.artist?.name, id: song?.album?.id, visit: song?.artist?.link, image: song?.artist?.picture, }, album: { name: song?.album?.title, id: song?.album?.id, image: song?.album?.cover, tracks: song?.album?.tracklist}, type: song?.type } }); }