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": { | |
"self": { "href": "/orders/123" }, | |
"shipment-type": { "href": "http://api.company.com/logistics/shipmenttypes/2" }, | |
"warehouse": { "href": "http://api.company.com/logistics/warehouses/7449?Country=Australia" }, | |
"products": [{ | |
"href": "http://api.company.com/master/products/87", | |
"title": "Shirt" | |
},{ | |
"href": "http://api.company.com/master/products/122", |
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
<resource href="/"> | |
<link rel="events" href="..."> | |
</resource> |
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
<control action="submit-completed-task" href="http://api.email-service.com/messages" method="POST" content-type="application/xml" > | |
<email> | |
<message>Tremendous. You finished {{task.name}}</message> | |
<sender>you@example.com</sender> | |
<recipient>you@example.com</recipient> | |
</email> | |
</control> |
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": { | |
"self": { "href": "..." }, | |
"productions": { "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
class DashboardController < ResourceController | |
def get | |
# show dashboard | |
end | |
end |
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
# This LOOKS pretty straightforward, but it took awhile to sort out issues with | |
# py2cairo and pygobject, so I hope I've saved you some time :-) | |
# | |
# This assumes you already subscribe to a nice clean virtualenvwrapper workflow | |
# -- see https://gist.github.com/771394 if you need advice on getting there. | |
# There are some optional dependencies omitted, so if you're going to be doing | |
# heavy development with these libs, you may want to look into them. | |
# | |
# We go to some configure option pains to avoid polluting the system-level | |
# Python, and `brew link`ing Cairo which is keg-only by default. |
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 GEO_LOCATION = { | |
watchID: null, | |
callback: null | |
}; | |
GEO_LOCATION.mySpot = function(position){ | |
var lat = (position.coords) ? new String(position.coords.latitude) : position.x; | |
var lon = (position.coords) ? new String(position.coords.longitude) : position.y; | |
return GEO_LOCATION.callback(lat, lon); | |
} |
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
{ | |
"name": "A product", | |
"weight": 400, | |
"dimensions": { | |
"width": 100, | |
"height": 10, | |
"depth": 100 | |
}, | |
"description": "A great product" | |
} |
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": { | |
"self": { "href": "/todo-list" }, | |
"search": { "href": "/todo-list/search;{searchterm}" }, | |
"description": { "href": "/todo-list/description" } | |
}, | |
"_embedded": { | |
"item": [ | |
{ | |
"_links": { |
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
[ | |
"AA BOX, | |
49.19379, | |
-2.03498, | |
2323, | |
3, | |
1", | |
"AALSMEER, | |
49.22448, | |
-2.06781, |