[Catalyst] REST-like url question

Devin Austin devin.austin at gmail.com
Wed May 18 16:54:22 GMT 2011


On Wed, May 18, 2011 at 10:22 AM, Bill Moseley <moseley at hank.org> wrote:

> Quick question, and I hope this doesn't turn into a debate about REST
> specifics, just looking for a sane URL scheme.
>
> Say I have an app for managing technical conferences.   There's one "user"
> table.  A "user", of course, can be both a presenter and an attendee of
> sessions.  So, I want to get a list of sessions a user is associated with,
> but also want to get separate lists for sessions they are a presenter for
> vs. sessions they are just attending.
>
> In the db there's  attendee_session and presenter_session link tables to
> associate users with the sessions.
>
> This seems a bit ambiguous, plus not sure what to do if a user happens to
> be a presenter AND an attendee of the same session.
>
> GET /user/1234/sessions
>
>
> And these seem wrong because the query parameter is about the user not the
> session.  That is, seems like any query parameters should be limiting on =
the
> session (e.g. session_type).
>
> GET /user/1234/sessions?user_type=3Dattendee
> GET /user/1234/sessions?user_type=3Dpresenter
>
>
> Other options would be:
>
> GET /user/1234/sessions_attending
> GET /user/1234/sessions_presenting
>
>
>
> What would you use?
>
>
> --
> Bill Moseley
> moseley at hank.org
>
> _______________________________________________
> List: Catalyst at lists.scsys.co.uk
> Listinfo: http://lists.scsys.co.uk/cgi-bin/mailman/listinfo/catalyst
> Searchable archive:
> http://www.mail-archive.com/catalyst@lists.scsys.co.uk/
> Dev site: http://dev.catalyst.perl.org/
>
>
I'd personally use /user/1234/sessions/attending and
/user/1234/sessions/presenting

-- =

Devin Austin
http://www.codedright.net
9702906669 - Cell
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.scsys.co.uk/pipermail/catalyst/attachments/20110518/22d83=
a4e/attachment.htm


More information about the Catalyst mailing list