简体   繁体   English

Spotify Web API特殊字符

[英]Spotify Web API special characters

Is there any documentation for the Spotify Web API as to which characters are valid when searching? Spotify Web API是否有关于搜索时哪些字符有效的文档? For example "Macklemore & Ryan Lewis" needs the & to be url encoded in order for the request to work. 例如,“Macklemore&Ryan Lewis”需要对&url进行编码,以便请求生效。

The character ":" is completely invalid it seems. 字符“:”似乎完全无效。 In order to search for an album like "Pink Friday: Roman Reloaded", I have to remove the : completely from the String. 为了搜索像“Pink Friday:Roman Reloaded”这样的专辑,我必须完全从String中删除: Even URL encoding it doesn't work. 即使URL编码它也不起作用。 This probably was to do with the fact that : seems to be used to separate the fields of the query. 这可能与以下事实有关:似乎用于分隔查询的字段。

Other characters like .[()/ seem to work ok. 其他字符如。[()/似乎工作正常。 Any docs on this anywhere? 这方面的任何文档? Just want to know we are being comprehensive. 只是想知道我们是全面的。 Thanks. 谢谢。

Given the Björk example here , 鉴于Björk的例子在这里

http://ws.spotify.com/search/1/artist?q=artist:Bj%C3%B6rk

You'll need percent encoding . 你需要百分比编码 Not sure what technology you're using, if javascript, this answer should help - URL encode sees “&” (ampersand) as “&” HTML entity . 不确定你正在使用什么技术,如果javascript,这个答案应该有帮助 - URL编码将“&”(&符号)视为“&”HTML实体

Update: 更新:

Colons are special characters used for advanced search . 冒号是用于高级搜索的特殊字符。 Queries involving colons need to be quoted, unless it's an advanced search :). 需要引用涉及冒号的查询,除非它是高级搜索:)。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM