This file contains 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
// sample links array | |
{ | |
"collection" : | |
{ | |
"version" : "1.0", | |
"href" : URI, | |
"items" : | |
[ | |
{ | |
"href" : URI, |
This file contains 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
*** REQUEST *** | |
GET /home HTTP/1.1 | |
Accept: text/xml | |
*** RESPONSE *** | |
200 OK HTTP/1.1 | |
Content-Type: text/xml | |
Link: <http://alps.io/profiles/webmention-alps.xml>; rel="profile" | |
.... <payload here> .... |
This file contains 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
// in the text | |
"data" : [ | |
{"amount" : "150000", "currency" : "USD", "date" : "20130922"} | |
] | |
// valid Cj | |
"data" : [ | |
{"name" : "amount", "value" : "150000"}, | |
{"name" : "currency", "value" : "USD"}, | |
{"name" : "date", "value" : "20130922"} |
This file contains 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
{"collection" : | |
{ | |
"version" : "1.0", | |
"href" : "...", | |
"links" : | |
[ | |
{"rel" : "home", "href" : "..."} | |
], | |
This file contains 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
{"collection" : | |
{ | |
"version" : "1.0", | |
"href" : "...", | |
"links" : | |
[ | |
{"rel" : "home", "href" : "..."}, | |
{"rel" : "profile", "href" : "..."} | |
], |
This file contains 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
{ "collection" : | |
{ | |
"version" : "1.0", | |
"href" : "...", | |
"links" : [ | |
{"rel" : "home", "href" : "..."}, | |
{"rel" : "profile", "href" : "..."} | |
], | |
This file contains 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
// *** links | |
// just give me the URLs | |
{ "links" : [ | |
"http://example.com/home", | |
"http://example.com/logo.ong" | |
] | |
} | |
// *** hypermedia | |
// give me: |
This file contains 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
{ "collection" : | |
{ | |
"version" : "1.0", | |
"href" : "...", | |
"items" : [ | |
{ "href" : "http://example.com/users/mike", | |
"data" : [ | |
{"name" : "type", "value" : "user", "prompt" : "User"}, | |
{"name" : "givenName", "value" : "Mike", "prompt" : "Given Name"}, |
This file contains 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
// structure approach | |
"item" : { | |
"id" : "1", | |
"email" : "[email protected]", | |
"familyName" : "amundsen", | |
"givenName" : "mike" | |
} | |
// data approach | |
"item" : [ |
This file contains 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
var thisPage = function() { | |
var g = {}; | |
g.msg = {}; | |
g.addUrl = '/tasks/'; | |
g.listUrl = '/tasks/'; | |
g.searchUrl = '/tasks/search?text={@text}'; | |
g.completeUrl = '/tasks/complete/'; |