Common web frameworks
- Good at simple CRUD interfaces
- Pretty bad at supporting RESTful APIs
z, ? | toggle help (this) |
space, → | next slide |
shift-space, ← | previous slide |
d | toggle debug mode |
## <ret> | go to slide # |
c, t | table of contents (vi) |
f | toggle footer |
r | reload slides |
n | toggle notes |
p | run preshow |
P | toggle pause |
meta, links, href, type, id
application/vnd.api+json
HTTP/1.1 200 OK Content-Type: application/vnd.api+json Link: <http://example.com/profile>; rel="profile"
GET http://rivierarb.fr/api Accept: application/vnd.api+json
HTTP/1.1 200 OK Content-Type: application/vnd.api+json Link: <http://rivierarb.fr/api/profile>; rel="profile"
{
"api": [{
"links": {
"posts": "http://rivierarb.fr/api/posts",
"people": "http://rivierarb.fr/api/people"
}
}]
}
GET http://rivierarb.fr/api/posts
{
"posts": [{
"id": "1",
"title": "A JSON API to bind them all",
"href": "http://rivierarb.fr/api/posts/1"
}]
}
{
"posts": [{
"id": "1",
"title": "A JSON API to bind them all",
"links": {
"comments":
"http://rivierarb.fr/api/posts/1/comments"
}
}]
}
{
"links": {
"posts.author":
"http://rivierarb.fr/api/people/{posts.author}"
},
"posts": [{
"id": "1",
"title": "A JSON API to bind them all",
"links": { "author": "6" }
}, {
"id": "2",
"title": "RuLu 2013, June 20-21, Lyon",
"links": { "author": "9" }
}]
}
{
"links": {
"posts.author": {
"href": "http://.../people/{posts.author}",
"type": "people"
}
},
"posts": [{
"id": "1",
"title": "A JSON API to bind them all",
"links": { "author": "6" }
}],
"people": [{"id": "6", "name": "rivierarb"}]
}