Skip to content

Instantly share code, notes, and snippets.

@mamund
Created March 3, 2012 03:25
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 mamund/1964131 to your computer and use it in GitHub Desktop.
Save mamund/1964131 to your computer and use it in GitHub Desktop.
Conery API Challenge - HTML API
<!-- see docs at bottom of file -->
<html>
<head>
<title>Sample Conery API</title>
</head>
<body>
<!-- assume a starting URI of the server's choosing -->
<!-- login -->
<form action="..." method="post" class="login">
<input name="email" type="email" required="true" />
<input name="password" type="password" required="true" />
<input type="submit" />
</form>
<!-- returns -->
<p class="thanks">
...
</p>
<!-- request to browse all prodcutinos returns a set of links -->
<a href="..." rel="browse-all-productions">Browse all productions</a>
<!-- narrow browse all by category -->
<form method="get" action="..." class="browse-by-category">
<label>Select category</label>
<select name="catgegory">
<option value="Microsoft">Microsoft</option>
<option value="Ruby">Ruby</option>
<option value="Javascript">Javascript</option>
<option value="Mobile">Mobile</option>
</select>
<input type="submit" />
</form>
<!-- get list of new episodes -->
<a href="..." rel="new-episodes">New episodes</a>
<!-- production links -->
<ul>
<li>
<a href="..." rel="production allowed">
<span class="production-name">...</span>
</a>
</li>
<li>
<a href="..." rel="production not-allowed">
<span class="production-name">...</span>
</a>
</li>
</ul>
<!-- episode links -->
<ul>
<li>
<a href="..." rel="episode">
<span class="episode-name">...</span>
</a>
</li>
<li>
<a href="..." rel="episode">
<span class="episode-name">...</span>
</a>
</li>
</ul>
<!-- selected video -->
<video width="..." height="..." controls="controls" class="video">
<source src="..." type="video/mp4" />
<source src=..." type="video/ogg" />
</video>
</body>
</html>
<!--
*** Conery API ***
Conery vocabulary:
- email
- password
- category
- produciton-name
- episode-name
- MUST render and activate HTML.FORM@login using HTTPS BASIC AUTH
- MUST render and activate HTML.FORM@method="get" using HTTP.GET + querystring
- MUST render and activate HTML.A@href using HTTP.GET
+ SHOULD understand A@rel="allowed|not-allowed"
- MUST render HTML.UL/LI
- MUST render/play HTML.video
-->
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment