Deezer API - Get user's currently playing track

痴心易碎 提交于 2019-12-07 17:41:00

问题


Is there any way to know the state of a track using the deezer api. "playing" or "not playing" ?

I can't find anything in the docs... I'd like to know the currently playing track for each user of my app... Or at least the last played track.

I assume there might be some privacy issues... any thought?


回答1:


We don't have a 'now playing' status but you can use the User/History fields: GET https://api.deezer.com/user/1494543/history

That will give you the full paginated listening history of a given user, updated almost realtime (allow 1 or 2 minutes sometimes). The first result is the last song listened.

Regarding privacy, you'll need to ask the 'listening_history' permission at login.



来源:https://stackoverflow.com/questions/19877652/deezer-api-get-users-currently-playing-track

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!