可以获取 feed 数据吗?

发布于 2024-12-26 06:18:20 字数 462 浏览 2 评论 0原文

是否可以使用公共应用程序 API 获取数据,例如朋友何时完成播放曲目、朋友何时将曲目添加到播放列表等?就像 Feed 应用程序 (spotify:app:feed) 一样。

提要应用程序似乎正在做这样的事情:(

var presenceEvents = react.fromDOMEvent(sp.core, "hermes"); 

presenceEvents.subscribe(function(e) {
    console.log(sp.core.parseHermesReply("PresenceState", e.data[1]));
}

顺便说一句,这段代码没有按预期工作,但似乎这是这样做的方法。并非所有事件都被捕获)

以这种方式执行可以吗?应用程序查找器不会接受它吗?是否可以使用记录的应用程序 API 类来完成此操作?我在文档中找不到任何相关内容,是否有任何未记录的内容我可以使用?

Is it possible with the public app API to get data such as when a friend finish playing a track, when a friend adds a track to a playlist etc? Like the Feed app(spotify:app:feed).

The feed app seems to be doing something like this:

var presenceEvents = react.fromDOMEvent(sp.core, "hermes"); 

presenceEvents.subscribe(function(e) {
    console.log(sp.core.parseHermesReply("PresenceState", e.data[1]));
}

(This code by the way don't work as intended but seems this is the way to do it. Not all events are caught)

Is it okay to do it in this way, or will it not be accepted into App finder? Is it possible to do it using the documented apps API classes? I can't find anything for this in the documentation, is there anything undocumented I can use?

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

全部不再 2025-01-02 06:18:20

公共文档中未包含的所有内容都会导致您被 App Finder 拒绝,其中包括 sp.core 下的所有内容。

在编写 Spotify 应用程序时,请仅使用公开记录的 API 方法。此外,您发布的 API 是私有的,无法在您的应用程序中使用。

需要明确的是,出于隐私原因,提要数据永远不会以任何形式提供给您的 Spotify 应用程序。您的代码不起作用的原因是由于此限制。

EVERYTHING not in the public documentation will cause you to be rejected from the App Finder, which includes EVERYTHING under sp.core.

Please only use the publicly documented API methods when writing Spotify applications. In addition, the APIs you're posting are private and won't work in your application.

To be clear, the feed data will never be available to your Spotify application in any form, for privacy reasons. The reason your code doesn't work is because of this restriction.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文