On Wed, May 18, 2011 at 10:22 AM, Bill Moseley <mose...@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=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? > > > -- > Bill Moseley > mose...@hank.org > > _______________________________________________ > List: Catalyst@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
_______________________________________________ List: Catalyst@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/