andrewtennison / onside-api

the API
api.onside.me
1 stars 0 forks source link

Event filtering (& possibly channel) #12

Closed andrewtennison closed 12 years ago

andrewtennison commented 12 years ago

Similar to pagination on articles it will be necessary to be able to limit what is returned when requesting events.

My current specific issues is for left nav event list it shows all, which will eventually be a very long list. What I would expect on the UX is

possibly something like /event/?direction=(future|past)&limit[0]=10&limit[1]=0

so for past / 20 / 10 it would return completed events in the past, counting back from now returning events 10-30

aacolman commented 12 years ago

If there are multiple events under one sport is it possible to group?

andrewtennison commented 12 years ago

currently events are single entities. They are related to channels, so you can get all events related to a specific channel. Eventually I suppose we want to be able to filter results on any of an events parameters, i.e. get all event/?sport=cycling&type=race

symposion commented 12 years ago

With regard to the original issue raised, I think this should be achieved in a generic way by doing:

event?stime=>2011-01-01&sort=stime+desc&limit[0]=10&limit[1]=0

symposion commented 12 years ago

This now works as suggested in my comment above.