Skip to content

Instantly share code, notes, and snippets.

@wlk
Created June 18, 2017 12:21
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 wlk/a1dc60a7cea3470c46c25f8a6965f9d0 to your computer and use it in GitHub Desktop.
Save wlk/a1dc60a7cea3470c46c25f8a6965f9d0 to your computer and use it in GitHub Desktop.
{
"data": {
"id": "1",
"type": "authors",
"attributes": {
"name": "J. R. R. Tolkien",
"date_of_birth": "1892-01-03",
"date_of_death": "1973-09-02",
"created_at": "2017-06-18 11:30:16",
"updated_at": "2017-06-18 11:30:16"
},
"relationships": {
"books": {
"links": {
"self": "/v1/authors/1/relationships/books",
"related": "/v1/authors/1/books"
},
"data": [
{
"id": "1",
"type": "books"
},
{
"id": "2",
"type": "books"
}
... more book Ids...
]
}
}
},
"included": [
{
"id": "1",
"type": "books",
"attributes": {
"date_published": "1954-07-29",
"title": "The Fellowship of the Ring",
"created_at": "2017-06-18 11:30:16",
"updated_at": "2017-06-18 11:30:16"
},
....
},
{
"id": "2",
"type": "books",
"attributes": {
"date_published": "1954-11-11",
"title": "The Two Towers",
"created_at": "2017-06-18 11:30:16",
"updated_at": "2017-06-18 11:30:16"
},
...
},
...
more books
...
]
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment