Api Reference
Infos & Options
General information about the Deezer service and API.
Infos Module
Get general information about the service (e.g., country, currency).
const info = await deezer.infos();
export interface Infos {
country_iso: string;
country: string;
open: boolean;
pop: string;
upload_token: string;
upload_token_lifetime: number;
user_token: string | null;
hosts: {
stream: string;
images: string;
};
ads: {
audio?: {
default: {
start: number;
interval: number;
unit: string;
};
};
display?: {
interstitial: {
start: number;
interval: number;
unit: string;
};
};
[key: string]: any;
};
has_podcasts: boolean;
offers: any[];
}
{
"country_iso": "FR",
"country": "France",
"open": true,
"pop": "fr",
"upload_token": "4f5d33cf4115cd2ee048a68d791987a9",
"upload_token_lifetime": 14400,
"user_token": null,
"hosts": {
"stream": "http://cdn-proxy-{0}.dzcdn.net/mobile/1/",
"images": "http://cdn-images.dzcdn.net/images"
},
"ads": {
"audio": {
"default": {
"start": 1,
"interval": 3,
"unit": "track"
}
},
"display": {
"interstitial": {
"start": 900,
"interval": 900,
"unit": "sec"
}
},
"big_native_ads_home": {
"iphone": {
"enabled": false
},
"ipad": {
"enabled": false
},
"android": {
"enabled": false
},
"android_tablet": {
"enabled": false
}
}
},
"has_podcasts": true,
"offers": []
}
Options Module
Get available options for the API.
const options = await deezer.options();
export interface Options {
streaming: boolean;
streaming_duration: number;
offline: boolean;
hq: boolean;
ads_display: boolean;
ads_audio: boolean;
too_many_devices: boolean;
can_subscribe: boolean;
radio_skips: number;
lossless: boolean;
preview: boolean;
radio: boolean;
type: "options";
}
{
"streaming": false,
"streaming_duration": 0,
"offline": false,
"hq": false,
"ads_display": true,
"ads_audio": true,
"too_many_devices": false,
"can_subscribe": false,
"radio_skips": 6,
"lossless": false,
"preview": true,
"radio": true,
"type": "options"
}