Skip to content

Instantly share code, notes, and snippets.

@rutgervanwaveren
Created November 21, 2012 11:43
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 rutgervanwaveren/4124485 to your computer and use it in GitHub Desktop.
Save rutgervanwaveren/4124485 to your computer and use it in GitHub Desktop.
Silk API (5)
<!-- key value component -->
<article>
...
<div class="block" data-component-uri="http://silkapp.com/component/block/keyvalue">
<div data-component-uri="http://typlab.com/2010/components/keyvalue" class="component"/>
<table>
<tbody>
<tr>
<td class="key">gender</td> <!-- example tag: gender -->
<td class="value">
<a data-tag-uri="http://yoursite.silkapp.com/tag/gender">male</a>
</td>
</tr>
... <!-- insert more key value pairs here -->
</tbody>
</table>
</div>
</div>
...
</article>
<!-- map -->
<article>
...
<div data-component-uri="http://typlab.com/2010/components/queryview">
<query t="o">
<raw t="b">false</raw>
<relations t="a">
<i t="a">
<i t="s">document name</i>
</i>
</relations>
<nonempty t="a" />
<filters t="a">
<i t="a">
<i t="s">type</i>
<i t="s">http://yoursite.silkapp.com/tag/sometag</i>
<i t="a">
<i t="s">document name</i>
</i>
</i>
</filters>
<filterrels t="a" />
<orders t="a" />
<limits t="a" />
<query t="s">from all documents where (document has type http://yoursite.silkapp.com/tag/country)
select document name slice from 0 to 99</query>
</query>
<viewdata t="o">
<values t="u" />
<label t="u" />
<enumrelation t="u" />
<address t="u" />
<tablefilters t="u" />
</viewdata>
<view t="s">http://typlab.com/2010/components/googleviz/map</view>
<queryslice t="n">100</queryslice>
</div>
...
</article>
<!-- recent documents -->
<article>
...
<div class="block widget" data-component-uri="http://silkapp.com/component/block/widget">
<div data-component-uri="http://typlab.com/2010/components/recentdocs"/>
</div>
...
</article>
<!-- table of contents -->
<article>
...
<div class="block widget" data-component-uri="http://silkapp.com/component/block/widget">
<div data-component-uri="http://typlab.com/2010/components/toc">
<depth t="n">3</depth>
</div>
</div>
...
</article>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment