Skip to content

Commit b7aefca

Browse files
committed
Update homepage example for new relationships object
1 parent b7e7ab9 commit b7aefca

File tree

1 file changed

+12
-6
lines changed

1 file changed

+12
-6
lines changed

index.md

Lines changed: 12 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -30,21 +30,27 @@ Here's an example response from a blog that implements JSON API:
3030
"attributes": {
3131
"title": "JSON API paints my bikeshed!"
3232
},
33-
"links": {
34-
"self": "http://example.com/posts/1",
33+
"relationships": {
3534
"author": {
36-
"self": "http://example.com/posts/1/links/author",
37-
"related": "http://example.com/posts/1/author",
35+
"links": {
36+
"self": "http://example.com/posts/1/relationships/author",
37+
"related": "http://example.com/posts/1/author"
38+
},
3839
"linkage": { "type": "people", "id": "9" }
3940
},
4041
"comments": {
41-
"self": "http://example.com/posts/1/links/comments",
42-
"related": "http://example.com/posts/1/comments",
42+
"links": {
43+
"self": "http://example.com/posts/1/relationships/comments",
44+
"related": "http://example.com/posts/1/comments"
45+
},
4346
"linkage": [
4447
{ "type": "comments", "id": "5" },
4548
{ "type": "comments", "id": "12" }
4649
]
4750
}
51+
},
52+
"links": {
53+
"self": "http://example.com/posts/1"
4854
}
4955
}],
5056
"included": [{

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy