30 Jul '16, 1am

RailsのAPIにHATEOASを散りばめてみる : RESTの拡張、HATEOASの詳解と実装例 | プログラミング | POSTD:… https://t.co/bparfZ4ExO [ruby]

RailsのAPIにHATEOASを散りばめてみる : RESTの拡張、HATEOASの詳解と実装例 | プログラミング | POSTD:… https://t.co/bparfZ4ExO [ruby]

{ "data": [ { "id": "1", "type": "author", "attributes": { "first-name": "ilija", "last-name": "eftimov", "created-at": "2016-06-25T20:52:12.804Z", "updated-at": "2016-06-25T20:52:12.804Z" }, "relationships": { "articles": { "data": [ { "id": "1", "type": "article" }, { "id": "2", "type": "article" } ] } }, "links": { "self": { "href": "/authors/1" } } } ], "included": [ { "id": "1", "type": "article", "attributes": { "title": "Lorem ipsum", "body": "Lorem ipsum dolor sit amet", "created-at": "2016-06-25T22:25:51.874Z", "updated-at": "2016-06-25T22:25:51.874Z" }, "relationships": { "author": { "data": { "id": "1", "type": "author" } } }, "links": { "self": { "href": "/authors/1/articles/1" } } }, { "id": "2", "type": "article", "attributes": { "title": "A princess of Mars", "body": "His reference to the great games of which I had heard so much while among the Tharks convin...

Full article: http://postd.cc/sprinkle-some-hateoas-on-your-rails-apis/

Tweets