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
/* Rob Conery API Sample */ | |
// see docs at bottom of file | |
// based on Collection+JSON media type | |
// http://www.amundsen.com/media-types/collection/ | |
// login template | |
// use this data to execute HTTP BASIC over HTTPS | |
template : [ |
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
<!-- Conery API in XML --> | |
<!-- see docs at bottom of file --> | |
<!-- assume a starting uRI supplied by the host server --> | |
<conery> | |
<login href="..."> | |
<email>...</email> | |
<password>...</password> |
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
<PageInformation> | |
<CurrentPage href="...">2</CurrentPage> | |
<FirstPage href="..">1</NextPage> | |
<PreviousPage href="..">1</LastPage> | |
<NextPage href="..">5</NextPage> | |
<LastPage href="..">44</LastPage> | |
<TotalItems>1085</TotalItems> | |
<PageSize>25</PageSize> | |
<SelectPage href="...?page={@pagenumber}" /> | |
<SetPageSize href="..."><size value="" /></SetPageSize> |
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" : "http://example.org/posts/", | |
"items" : [ | |
{ | |
"href" : "http://example.org/posts/1", | |
"data" : [ | |
{"name" : "full-name", "value" : "J. Doe", "prompt" : "Full 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
<html> | |
<head> | |
<style type="text/css"> | |
body { | |
font-family: sans-serif; | |
} | |
table.aspects { | |
margin: 3em; | |
padding: 1em; |
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
// typical generic request routine (handles GET and POST) | |
function makeRequest(href, next, body, contentType) { | |
var ajax; | |
ajax=new XMLHttpRequest(); | |
if(ajax) { | |
ajax.onreadystatechange = next(); | |
if(body) { |
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
north | south | east | west | |
---|---|---|---|---|
300 | 200 | 350 | 150 |
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" : { | |
"href" : "...", | |
"items" : [ | |
{ | |
"href" : "/orders/1", | |
"data" : [...], | |
"links" : [ | |
{"rel" : "type", "href" : "http://example.org/rels#order"} | |
] |
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
<!-- | |
Date: 2013-05-06 | |
Author: @mamund | |
Note: Some ways to determine when a URI has an associated resolver and whether it SHOULD be resolvable. | |
--> | |
<root> | |
<scheme> | |
<!-- the scheme portion of the URI can indicate which (if any) resolver should be used --> | |
<example> |
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, |