Created
November 15, 2012 16:39
-
-
Save rutgervanwaveren/4079620 to your computer and use it in GitHub Desktop.
Silk API (2)
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
<!-- a tag in Silk using the data-tag-uri attribute --> | |
John is <a data-tag-uri="http://yoursite.silkapp.com/tag/age">46</a> years old. | |
<!-- to add a category to a page, use the data-tag-context attribute --> | |
<!-- this page has as title "John Doe" and it has the category "person" --> | |
<article data-tag-context="http://yoursite.silkapp.com/tag/person" data-title="John Doe">...</article> |
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
<!-- a Silk document is valid XML within article tags --> | |
<article> | |
... | |
</article> | |
<!-- the basic structure of a document --> | |
<article> | |
<section class="body"> | |
<div class="layout meta">.. this is the left column ..</div> | |
<div class="layout content">.. this is the right column ..</div> | |
</section> | |
</article> |
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
# get the autosave for a particular page for a user | |
$ curl https://api.silkapp.com/v1.4.0/site/uri/yoursite.silkapp.com/page/mypage/autosave | |
-b 'silk_sid=...' |
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
# get the page called 'home' (the home page) from yoursite.silkapp.com | |
$ curl https://api.silkapp.com/v1.4.0/site/uri/yoursite.silkapp.com/page/home | |
# for private sites add the silk_sid cookie for authentication | |
$ curl https://api.silkapp.com/v1.4.0/site/uri/site.silkapp.com/page/home | |
-b 'silk_sid=...' |
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
# get list (max 100) of public sites with information about the creator, creation date and permissions | |
$ curl https://api.silkapp.com/v1.4.0/site | |
# get the next 100 public sites | |
$ curl https://api.silkapp.com/v1.4.0/site?offset=2 | |
# get more or less results | |
$ curl https://api.silkapp.com/v1.4.0/site?count=20 |
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
# get a list of versions for a page | |
$ curl https://api.silkapp.com/v1.4.0/site/uri/yoursite.silkapp.com/page/mypage/version | |
-b 'silk_sid=...' |
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
# get list of users and their permissions for a site | |
$ curl https://api.silkapp.com/v1.4.0/site/uri/mysite.silkapp.com/permission | |
-b 'silk_sid=...' |
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
# search for a site by name | |
$ curl https://api.silkapp.com/v1.4.0/site/search/<string> |
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
# get information if a site is available to create | |
$ curl https://api.silkapp.com/v1.4.0/site/available | |
-d 'yoursite.silkapp.com' | |
-X POST | |
-H "Content-Type: text/plain" |
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
# subscribe to email updates for changes to a site | |
$ curl https://api.silkapp.com/v1.4.0/site/uri/yoursite.silkapp.com/subscription/current | |
-b 'silk_sid=...' | |
-d '"daily"' | |
-X PUT | |
-H "Content-Type:application/json" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment