Skip to content

Instantly share code, notes, and snippets.

@rutgervanwaveren
Created November 19, 2012 10:37
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/4110030 to your computer and use it in GitHub Desktop.
Save rutgervanwaveren/4110030 to your computer and use it in GitHub Desktop.
Silk API (3)
# get the taglist of a site
$ curl https://api.silkapp.com/v1.4.0/site/uri/yoursite.silkapp.com/taglist
# update user information
$ curl https://api.silkapp.com/v1.4.0/user/uuid/{..uuid..}
-b 'silk_sid=...'
-H "Content-Type: application/xml"
-X PUT
-d '<update><name>string</name><email>string</email><old>string</old><password>string</password><emailNews>string</emailNews></update>'
# sign out
$ curl https://api.silkapp.com/v1.4.0/user/current/signout
-b 'silk_sid=...'
-X POST
<!-- A part of the taglist showing the <context> element. An example from world.silkapp.com -->
<tag uri="http://world.silkapp.com/tag/Birthdate">
...
<context>
<with-count>
<count>335</count>
<value>http://world.silkapp.com/tag/Person</value>
</with-count>
</context>
...
</tag>
<!-- A part of the taglist showing the <metadata> element. An example from world.silkapp.com -->
<tag uri="http://world.silkapp.com/tag/Country">
...
<metadata>
<board-image>
<board-image>
{url to file} or "undefined"
</board-image>
</board-image>
<name>
<name>
Name of the tag
</name>
</name>
<style>
<style>
{valid CSS}
</style>
</style>
</metadata>
...
</tag>
<!-- A part of the taglist showing the <outtypes> element. An example from world.silkapp.com -->
<tag uri="http://world.silkapp.com/tag/Capital">
...
<outtypes>
<with-count>
<count>193</count>
<value>http://world.silkapp.com/tag/City</value>
</with-count>
</outtypes>
...
</tag>
<!-- The overall structure of the taglist, this example shows the taglist of world.silkapp.com -->
<tags>
<tag uri="http://world.silkapp.com/tag/Birthdate">...</tag>
<tag uri="http://world.silkapp.com/tag/Borders%20With">...</tag>
<tag uri="http://world.silkapp.com/tag/Capital">...</tag>
<tag uri="http://world.silkapp.com/tag/City">...</tag>
<tag uri="http://world.silkapp.com/tag/Country">...</tag>
... etc ...
</tags>
<!-- A part of the taglist showing the <revcontext> element. An example from world.silkapp.com -->
<tag uri="http://world.silkapp.com/tag/Person">
...
<revcontext>
<with-count>
<count>335</count>
<value>http://world.silkapp.com/tag/Birthdate</value>
</with-count>
<with-count>
<count>359</count>
<value>http://world.silkapp.com/tag/Country%20of%20Residence</value>
</with-count>
</revcontext>
...
</tag>
<!-- A part of the taglist, the <tag> element. An example from world.silkapp.com -->
<tag uri="http://world.silkapp.com/tag/Country">
<name>Country</name>
<total>195</total>
<doclevel>192</doclevel>
<ctxlevel>0</ctxlevel>
<arity>1.0</arity>
<context>...</context>
<revcontext>...</revcontext>
<outtypes>...</outtypes>
<types>...</types>
<metadata>...</metadata>
<fuzzy>country</fuzzy>
<enum>...</enum>
</tag>
<!-- A part of the taglist showing the <types> element. An example from world.silkapp.com -->
<tag uri="http://world.silkapp.com/tag/GDP">
...
<types>
<with-count>
<count>567 1.0</count>
<value>total</value>
</with-count>
<with-count>
<count>567 1.0</count>
<value>currency</value>
</with-count>
<with-count>
<count>91 0.574930563941553</count>
<value>geo</value>
</with-count>
<with-count>
<count>567 1.0</count>
<value>textual</value>
</with-count>
</types>
...
</tag>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment