我正在尝试从 Eventbrite API 获取事件列表,并按日期对它们进行排序。
但是,我似乎得到了一个未按日期排序的事件列表。
这是一个例子:
$ curl "https://www.eventbrite.com/json/event_search?app_key=MY_API_KEY&country=GB&sort_by=date" | jsonlint | grep start_date
% Total % Received % Xferd Average Speed Time Time Time Current
Dload Upload Total Spent Left Speed
100 68722 0 68722 0 0 42483 0 --:--:-- 0:00:01 --:--:-- 61413
"start_date": "2013-03-23 09:00:00",
"start_date": "2013-03-23 09:00:00",
"start_date": "2013-03-31 13:00:00",
"start_date": "2013-01-18 01:45:00",
"start_date": "2013-03-28 09:00:00",
"start_date": "2013-02-01 05:55:00",
"start_date": "2013-02-01 05:55:00",
"start_date": "2013-02-01 05:55:00",
"start_date": "2013-03-23 10:00:00",
"start_date": "2013-01-01 00:00:00",
"start_date": "2012-12-12 00:00:00",
"start_date": "2013-04-09 19:00:00",
"start_date": "2013-04-13 09:00:00",
"start_date": "2013-04-17 18:15:00",
"start_date": "2013-04-17 19:00:00",
"start_date": "2013-04-17 19:00:00",
(非缩进的 start_times 是事件的那些)
我知道它正在接受 sort_by=date 参数,因为它在结果摘要中返回:
{
"summary": {
"total_items": 14911,
"first_event": 4673700163,
"last_event": 5844441883,
"filters": {
"country": "GB",
"sort_by": "date"
},
"num_showing": 10
}
},
我假设它排序的日期是 start_date,但是手动检查其他日期(end_date、created、modified)似乎也没有排序。
这是 API 中的错误还是我做错了什么?