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
# GET /invoice/1203897 | |
<resource rel="self" href="/invoice/1203897"> | |
<link rel="client" href="http://evilinc.com" /> | |
<resource rel="line-item" href="/invoice/1203897/line-item/1"> | |
<resource rel="item" href="/invetory/9821732"> | |
<sku>WHMK5662</sku> | |
<description>Interesting Widget</description> | |
</resource> | |
<quantity>5</quantity> |
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
#GET /invoice/1203897 | |
<resource rel="self" href="/invoice/1203897"> | |
<link rel="client" href="http://evilinc.com" /> | |
<resource rel="line-item" href="/invoice/1203897/line-item/1"> | |
<resource rel="item" href="/invetory/9821732"> | |
<sku>WHMK5662</sku> | |
<description>Interesting Widget</description> | |
</resource> | |
<quantity>5</quantity> |
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
<resource rel="self" href="/my_collection"> | |
<link rel="next" href="/another_collection" /> | |
<link rel="search" templated="true" href="/my_collection/search={searchterm}" /> | |
<control activity="createItem" target="/my_collection" template="/my_collection/new" method="PUT" content-type="application/vnd.ericjbowman+xml"/> | |
<resource rel="info" href="/my_collection/info" etag="ZOMGSCIENCE1337" cache-control="public, max-age=600"> | |
<items>12</items> | |
<foo>bar</foo> | |
</resource> | |
</resource> |
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
var x = foo.bar["func"](param); |
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
$(document).ready(function () { | |
$('#gco_slider_01').cycle({ | |
fx: 'scrollHorz', | |
speed: 450, | |
timeout: 0, | |
after: function (curr, next, opts) { | |
var index = opts.currSlide; | |
$('#gco_slider_01_prev')[index == 0 ? 'hide' : 'show'](); | |
$('#gco_slider_01_next')[index == opts.slideCount - 1 ? 'hide' : 'show'](); |
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
I've added a control element with these properties/attributes: | |
method ; method to use for generated request e.g. POST/PUT/DELETE | |
content-type ; (optional) content-type of the request body generated by the template (defaults to application/hal+xml) | |
schema ; contains schema for data submitted to template | |
template ; (optional) A string or object representing the template or form for the request. | |
template-href ; (optional) Contains a URI which links to a resource where the template or form can be fetched. | |
template-type ; (optional) URI used to identify the template format in use (defaults to mustache). |
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
(defresource "example" | |
(GET (lambda (req) | |
'(200 | |
(:content-type "text/plain") | |
("This is the example resource")))) | |
(POST (lambda (req) | |
'(200 | |
(:content-type "text/plain") | |
("Thanks for posting something"))))) |
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
<resource rel="self" href="/" xmlns:ex="http://example.org/rels/"> | |
<link rel="ex:look" href="/bleh" /> | |
<link rel="ex:search" href="/search?term={searchTerm}" /> | |
<resource rel="ex:member" name="1" href="/foo"> | |
<link rel="ex:created_by" href="/some_dude" /> | |
<example>bar</example> | |
<resource rel="ex:status" href="/foo;status"> | |
<some_property>disabled</some_property> | |
</resource> | |
</resource> |
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
<resource href="http://example.com/" /> |
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
{ | |
"_links": { | |
"self": { "href": "/orders" }, | |
"next": { "href": "/orders?page=2" }, | |
"search": { "href": "/orders?id={order_id}" } | |
}, | |
"_embedded": { | |
"order": [ | |
{ | |
"_links": { |