Skip to content

Instantly share code, notes, and snippets.

@cpb
Last active December 17, 2015 21:30
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 cpb/5675568 to your computer and use it in GitHub Desktop.
Save cpb/5675568 to your computer and use it in GitHub Desktop.
Brief example of illustrating how a tweet might be represented in application/hal+json
{
"_links": {
"self": {
"href": "https://twitter.com/calebbuxton/status/328995716200558592" },
"reply": {
"href": "https://twitter.com/i/tweet/create?in_reply_to_status_id=328995716200558592" },
"favourite": {
"href": "https://twitter.com/i/tweet/favorite?id=328995716200558592" }
},
"text": "@amateurhuman #railsconf hypermedia api's contain state and behaviour",
"created_at": "3:14 PM - 29 Apr 13",
"_embedded": {
"author": {
"_links": {
"self": {
"href": "https://twitter.com/calebbuxton" },
"portrait": {
"href": "https://si0.twimg.com/profile_images/2168448366/Screen_Shot_2012-04-26_at_3.25.14_PM_normal.png" }
},
"name": "Caleb Buxton",
"handle": "@calebbuxton"
},
"mentions": {
"_links": {
"self": {
"href": "https://twitter.com/amateurhuman" },
},
"handle": "@amateurhuman"
},
"topics": {
"_links": {
"self": {
"href": "https://twitter.com/search?q=%23railsconf&src=hash" }
},
"tag": "#railsconf"
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment