Skip to content

Instantly share code, notes, and snippets.

@pablisco
Last active August 29, 2015 14:05
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save pablisco/bf8de851e4c1344e8bd6 to your computer and use it in GitHub Desktop.
Save pablisco/bf8de851e4c1344e8bd6 to your computer and use it in GitHub Desktop.
/*
GETS ?offset:integer?limit:integer
/users/[:id] {
id:string // object property
name:string
}
GET #id:string // url segments (bits in the url)
// plural tells us the get returns a collection
GETS ?search:string?distance:string // url params
POST ^accepts:application-json // needed headers maybe?
/users/:user_id/messages/[:message_id] -> /messages/[:message_id]?user=:user_id
/countries {
id:string
name:string
symbol:string
}
GETS
/messages/[:id] {
id:string
content:string
time:date
}
GET #id:string
GETS ?user:string
POST !user:string // ! says that the parameter is required
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment