Skip to content

Instantly share code, notes, and snippets.

@josephpconley
Last active August 29, 2015 13:56
Show Gist options
  • Save josephpconley/9337208 to your computer and use it in GitHub Desktop.
Save josephpconley/9337208 to your computer and use it in GitHub Desktop.
# RESTful routes for Users collection
GET /users controllers.Users.list
POST /users controllers.Users.insert
DELETE /users controllers.Users.deleteAll
# RESTful routes by User
GET /users/:id controllers.Users.findById(id: String)
PUT /users/:id controllers.Users.update
DELETE /users/:id controllers.Users.delete(id: String)
# Find all user items by alpha id string
GET /users/:id/items/$id<[a-zA-Z]*> controllers.Users.items(id: String)
# Return alternative representations of User (need regex to handle extension properly)
GET /users/$id<[a-zA-Z0-9]*>.xml controllers.Users.xml(id: String)
GET /users/$id<[a-zA-Z0-9]*>.html controllers.Users.html(id: String)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment