Created
September 7, 2017 05:59
-
-
Save developerdino/32f8621adcb78a88a0fd6a4634dec774 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"data": [ | |
{ | |
"type": "articles", | |
"id": "1", | |
"attributes": { | |
"title": "JSON API paints my bikeshed!" | |
}, | |
"relationships": { | |
"author": { | |
"links": { | |
"self": "http://127.0.0.1:8000/api/articles/1/relationships/author", | |
"related": "http://127.0.0.1:8000/api/articles/1/author" | |
}, | |
"data": { | |
"type": "people", | |
"id": "9" | |
} | |
}, | |
"comments": { | |
"data": [ | |
{ | |
"type": "comments", | |
"id": "5" | |
}, | |
{ | |
"type": "comments", | |
"id": "9" | |
} | |
], | |
"links": { | |
"self": "http://127.0.0.1:8000/api/articles/1/relationships/comments", | |
"related": "http://127.0.0.1:8000/api/articles/1/comments" | |
} | |
} | |
}, | |
"links": { | |
"self": "http://127.0.0.1:8000/api/articles/1" | |
} | |
} | |
], | |
"links": { | |
"first": "http://127.0.0.1:8000/api/articles?page=1", | |
"last": "http://127.0.0.1:8000/api/articles?page=1", | |
"prev": null, | |
"next": null, | |
"self": "http://127.0.0.1:8000/api/articles" | |
}, | |
"meta": { | |
"current_page": 1, | |
"from": 1, | |
"last_page": 1, | |
"path": "http://127.0.0.1:8000/api/articles", | |
"per_page": 15, | |
"to": 1, | |
"total": 1 | |
}, | |
"included": [ | |
{ | |
"type": "people", | |
"id": "9", | |
"attributes": { | |
"first-name": "Dan", | |
"last-name": "Gebhardt", | |
"twitter": "dgeb" | |
}, | |
"links": { | |
"self": "http://127.0.0.1:8000/api/authors/9" | |
} | |
}, | |
{ | |
"type": "comments", | |
"id": "5", | |
"attributes": { | |
"body": "First!" | |
}, | |
"relationships": { | |
"author": { | |
"data": { | |
"type": "people", | |
"id": "2" | |
} | |
} | |
}, | |
"links": { | |
"self": "http://127.0.0.1:8000/api/comments/5" | |
} | |
}, | |
{ | |
"type": "comments", | |
"id": "9", | |
"attributes": { | |
"body": "I like XMP better" | |
}, | |
"relationships": { | |
"author": { | |
"data": { | |
"type": "people", | |
"id": "9" | |
} | |
} | |
}, | |
"links": { | |
"self": "http://127.0.0.1:8000/api/comments/9" | |
} | |
} | |
] | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment