的Deezer API - 获取用户的当前播放的曲目 [英] Deezer API - Get user's currently playing track

查看:226
本文介绍了的Deezer API - 获取用户的当前播放的曲目的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

有没有办法知道使用的Deezer API轨道的状态。
打还是不打?

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?

推荐答案

我们没有一个正在播放状态,但您可以使用用户/历史记录字段:
GET https://api.deezer.com/user/1494543/history

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

这会给你一个给定用户的完整分页收听历史,几乎更新实时(允许1或2分钟有时)。第一个结果是最后一首歌听着。

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.

关于隐私,你需要问'listening_history的许可在登录。

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

这篇关于的Deezer API - 获取用户的当前播放的曲目的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆