Create a gist now

Instantly share code, notes, and snippets.

What would you like to do?
{
"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"
},
{
"id": "3",
"type": "books"
},
{
"id": "11",
"type": "books"
}
]
},
"photos": {
"links": {
"self": "/v1/authors/1/relationships/photos",
"related": "/v1/authors/1/photos"
}
}
},
"links": {
"self": "/v1/authors/1"
}
},
"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"
},
"relationships": {
"chapters": {
"links": {
"self": "/v1/authors/1/relationships/chapters",
"related": "/v1/authors/1/chapters"
}
},
"firstChapter": {
"links": {
"self": "/v1/authors/1/relationships/firstChapter",
"related": "/v1/authors/1/firstChapter"
}
},
"series": {
"links": {
"self": "/v1/authors/1/relationships/series",
"related": "/v1/authors/1/series"
},
"data": {
"id": "1",
"type": "series"
}
},
"author": {
"links": {
"self": "/v1/authors/1/relationships/author",
"related": "/v1/authors/1/author"
},
"data": {
"id": "1",
"type": "authors"
}
},
"stores": {
"links": {
"self": "/v1/authors/1/relationships/stores",
"related": "/v1/authors/1/stores"
}
},
"photos": {
"links": {
"self": "/v1/authors/1/relationships/photos",
"related": "/v1/authors/1/photos"
}
}
},
"links": {
"self": "/v1/authors/1"
}
},
{
"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"
},
"relationships": {
"chapters": {
"links": {
"self": "/v1/authors/2/relationships/chapters",
"related": "/v1/authors/2/chapters"
}
},
"firstChapter": {
"links": {
"self": "/v1/authors/2/relationships/firstChapter",
"related": "/v1/authors/2/firstChapter"
}
},
"series": {
"links": {
"self": "/v1/authors/2/relationships/series",
"related": "/v1/authors/2/series"
},
"data": {
"id": "1",
"type": "series"
}
},
"author": {
"links": {
"self": "/v1/authors/2/relationships/author",
"related": "/v1/authors/2/author"
},
"data": {
"id": "1",
"type": "authors"
}
},
"stores": {
"links": {
"self": "/v1/authors/2/relationships/stores",
"related": "/v1/authors/2/stores"
}
},
"photos": {
"links": {
"self": "/v1/authors/2/relationships/photos",
"related": "/v1/authors/2/photos"
}
}
},
"links": {
"self": "/v1/authors/2"
}
},
{
"id": "3",
"type": "books",
"attributes": {
"date_published": "1955-10-20",
"title": "Return of the King",
"created_at": "2017-06-18 11:30:16",
"updated_at": "2017-06-18 11:30:16"
},
"relationships": {
"chapters": {
"links": {
"self": "/v1/authors/3/relationships/chapters",
"related": "/v1/authors/3/chapters"
}
},
"firstChapter": {
"links": {
"self": "/v1/authors/3/relationships/firstChapter",
"related": "/v1/authors/3/firstChapter"
}
},
"series": {
"links": {
"self": "/v1/authors/3/relationships/series",
"related": "/v1/authors/3/series"
},
"data": {
"id": "1",
"type": "series"
}
},
"author": {
"links": {
"self": "/v1/authors/3/relationships/author",
"related": "/v1/authors/3/author"
},
"data": {
"id": "1",
"type": "authors"
}
},
"stores": {
"links": {
"self": "/v1/authors/3/relationships/stores",
"related": "/v1/authors/3/stores"
}
},
"photos": {
"links": {
"self": "/v1/authors/3/relationships/photos",
"related": "/v1/authors/3/photos"
}
}
},
"links": {
"self": "/v1/authors/3"
}
},
{
"id": "11",
"type": "books",
"attributes": {
"date_published": "1937-09-21",
"title": "The Hobbit",
"created_at": "2017-06-18 11:30:17",
"updated_at": "2017-06-18 11:30:17"
},
"relationships": {
"chapters": {
"links": {
"self": "/v1/authors/11/relationships/chapters",
"related": "/v1/authors/11/chapters"
}
},
"firstChapter": {
"links": {
"self": "/v1/authors/11/relationships/firstChapter",
"related": "/v1/authors/11/firstChapter"
}
},
"series": {
"links": {
"self": "/v1/authors/11/relationships/series",
"related": "/v1/authors/11/series"
},
"data": null
},
"author": {
"links": {
"self": "/v1/authors/11/relationships/author",
"related": "/v1/authors/11/author"
},
"data": {
"id": "1",
"type": "authors"
}
},
"stores": {
"links": {
"self": "/v1/authors/11/relationships/stores",
"related": "/v1/authors/11/stores"
}
},
"photos": {
"links": {
"self": "/v1/authors/11/relationships/photos",
"related": "/v1/authors/11/photos"
}
}
},
"links": {
"self": "/v1/authors/11"
}
}
]
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment