[Catalyst] Re: REST-like url question
Aristotle Pagaltzis
pagaltzis at gmx.de
Fri Jun 10 19:09:53 GMT 2011
* Bill Moseley <moseley at hank.org> [2011-05-18 18:30]:
> And these seem wrong because the query parameter is about the
> user not the session.
Why do you care?
> That is, seems like any query parameters should be limiting on
> the session (e.g. session_type).
>
> GET /user/1234/sessions?user_type=attendee
> GET /user/1234/sessions?user_type=presenter
>
> Other options would be:
>
> GET /user/1234/sessions_attending
> GET /user/1234/sessions_presenting
>
> What would you use?
You are presenting a collection in all cases, and the list is the
same in all cases. You are just filtering it differently.
Use a query parameter.
* John Beppu <john.beppu at gmail.com> [2011-05-22 20:55]:
> Could you pull this off?
>
> GET /user/1234/sessions
> GET /user/1234/sessions/attending
> GET /user/1234/sessions/presenting
> GET /user/1234/sessions/attending+presenting
>
> This is similar to how del.icio.us handles tags.
Attending + presenting = all. The first and last of these URIs
mean the same thing.
Regards,
--
Aristotle Pagaltzis // <http://plasmasturm.org/>
More information about the Catalyst
mailing list