Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Using the ReMo API in incremental mode

14 views
Skip to first unread message

alvaro.de...@gmail.com

unread,
Jul 4, 2016, 6:01:33 AM7/4/16
to
Hi guys!

We are trying to implement incremental events downloading from:

https://reps.mozilla.org/api/v1/event/

The ideal scenario is:

* Get the events ordered with last events date first (from newer to older)
* Stop events once the "from_date" is reached

According to the API JSON Schema:

/api/v1/event/schema/

there is a ordering field. But if we try yo use it:

https://reps.mozilla.org/api/v1/event/?ordering=end

nothing change compared to

https://reps.mozilla.org/api/v1/event/

Maybe it is just ordering using the end date always in the same direction: older to newer.

Is it possible to change that?

Thanks!!!
Message has been deleted

刘星

unread,
Jul 4, 2016, 9:07:40 AM7/4/16
to
在 2016年7月4日星期一 UTC+8下午6:01:33,alvaro.de...@gmail.com写道:
The start and end are both fields. So usually they are same.
There is no direction like desc or asc in the v1 api, I think.

John Giannelos

unread,
Jul 5, 2016, 1:10:01 PM7/5/16
to reps-...@lists.mozilla.org
Hey all!

I think that the issue in the query is the GET parameter used for
ordering. It should be `order_by` instead of `ordering`. Also in order
to define descending and ascending order you should use `-` or `+`
before the field.

eg.

to order by end ascending:
GET https://reps.mozilla.org/api/v1/event/?order_by=+end

for descending order:
GET https://reps.mozilla.org/api/v1/event/?order_by=-end

Let me know if that works!
~nemo
> _______________________________________________
> reps-webdev mailing list
> reps-...@lists.mozilla.org
> https://lists.mozilla.org/listinfo/reps-webdev
>

刘星

unread,
Jul 10, 2016, 5:21:32 AM7/10/16
to
0 new messages