我想通过事件搜索API中的子类别ID列表获取事件列表。
参考以下事件搜索API参考, https://www.eventbrite.com/developer/v3/endpoints/events/
如果我使用逗号分隔格式并发送到eventbrite api并获取错误而不是事件列表作为JSON格式的响应。
Array
(
[status_code] => 400
[error_description] => There are errors with your arguments: 3002 - Unknown parameter, 3003 - Unknown parameter, 3004] - Unknown parameter
[error] => ARGUMENTS_ERROR
)
我的要求,
Array
(
[location.address] => location.address=Austin
[categories] => categories=103
[subcategories] => subcategories=3001,3002,3003,3004
[formats] => formats=11
[page] => page=1
)
提前致谢。
答案 0 :(得分:1)
在eventbrite API请求中需要发送UTF-8格式而不是特殊字符,
如下所示更改您的请求
Array
(
[location.address] => location.address=Austin
[categories] => categories=103
[subcategories] => subcategories=3001%2C3002%2C3003%2C3004
[formats] => formats=11
[page] => page=1
)
使用%2C代替逗号(,)