MusicBrainz的API获得所有发行集团和发布日期 [英] musicbrainz api get all release groups and release dates

查看:196
本文介绍了MusicBrainz的API获得所有发行集团和发布日期的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我如何得到所有发放组,并与MusicBrainz的API发布日期为一个艺术家在一个电话?我已经能够得出这样做的最接近的是使用:

<$p$p><$c$c>http://musicbrainz.org/ws/2/release-group?query=arid:494e8d09-f85b-4543-892f-a5096aed1cd4&fmt=json

然而,一些释放基团的不存在。例如,使用上面的电话,EP,单+混音和一些非官方版本中都没有显示出来。基本上,我希望能够产生,当你去了MusicBrainz的产生,以一个艺术家的主页面都版本相同的列表:

  https://musicbrainz.org/artist/494e8d09-f85b-4543-892f-a5096aed1cd4?all=1

此外,API调用并不返回的发布日期。有什么建议么?这些错误?会在哪里举报它最好的地方?


解决方案

你能做的就是不使用搜索API,这是不太灵活(不支持的第一件事 INC 参数),但如果你已经知道艺术家的MBID,你可以简单地使用的浏览请求: <$c$c>https://musicbrainz.org/ws/2/release?artist=494e8d09-f85b-4543-892f-a5096aed1cd4&fmt=json&inc=release-groups.

随着 = INC释放组参数,你要求所有版本的发行组信息,以及(你可以请求其他信息,以及,检查< A HREF =htt​​ps://musicbrainz.org/doc/Development/XML_Web_Service/Version_2/#inc.3D相对=nofollow>文档)。

什么你还会注意的是,虽然JSON文件说放数:317 ,它实际上并没有包括所有的人。这是因为浏览请求支持分页。要获得所有版本,可以增加限制(通过添加上限= 100 ),然后做3个附加要求(偏移量= 100 偏移量= 200 最后偏移量= 300 )。
因此,您的最后一个请求将<$c$c>https://musicbrainz.org/ws/2/release?artist=494e8d09-f85b-4543-892f-a5096aed1cd4&fmt=json&inc=release-groups&limit=100&offset=300

(这不是一个保证的结果,而是情人节EP似乎与100偏移,说事端'和;摆脱它与200和300没有您私售)

请注意, JSON Web服务仍处于测试阶段 - 如果你只是改变 FMT = JSON FMT = XML ,您将使用稳定的XML Web服务。

How do I get ALL release groups and release dates for an artist in one call with the musicbrainz api? The closest I've been able to come to doing this is by using:

http://musicbrainz.org/ws/2/release-group?query=arid:494e8d09-f85b-4543-892f-a5096aed1cd4&fmt=json

However, some of the release groups are not there. For example, using the above call, the "EP", "Single + Remix" and some of the unofficial releases are not showing up. Basically, I'd like to be able to produce the same list that musicbrainz produces when you go to an artist's main page for "all" releases:

https://musicbrainz.org/artist/494e8d09-f85b-4543-892f-a5096aed1cd4?all=1

Also, the api call above doesn't return release dates. Any suggestions? Are these bugs? Where would be the best place to report it?

解决方案

The first thing you can do is not use the search API, which is somewhat inflexible (it doesn't support inc parameters), but if you already know the MBID of the artist, you can simply use a browse request: https://musicbrainz.org/ws/2/release?artist=494e8d09-f85b-4543-892f-a5096aed1cd4&fmt=json&inc=release-groups.

With the inc=release-group parameter, you're requesting release group information for all the releases as well (you can request other information as well, check the documentation).

What you'll also notice is that, although the JSON document says "release-count": 317, it does not actually include all of them. This is because browse requests support pagination. To get all releases, you can increase the limit (by adding limit=100) and then doing 3 additional requests (offset=100, offset=200 and finally offset=300). Your last request would therefore be to https://musicbrainz.org/ws/2/release?artist=494e8d09-f85b-4543-892f-a5096aed1cd4&fmt=json&inc=release-groups&limit=100&offset=300

(This is not a guaranteed result, but the Valentines EP appears with an offset of 100, Say Somethin' & Shake It Off with 200 and the Without You Bootleg with 300.)

Please note that the JSON Web Service is still in a beta stage - if you just change fmt=json to fmt=xml, you'll use the stable XML Web Service.

这篇关于MusicBrainz的API获得所有发行集团和发布日期的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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