Thank you - your API key request will be handled manually. Expect a reply in the next few days.
Welcome to the shrib.com API service.
You can now use the API to read and write notes to shrib.com.
Please note that this is a brand new service. In order to get your API key, request it from me here:
The URL is
https://api.shrib.com/<note>
Where <note> is your note name (as in https://shrib.com/<note>).
The data is
<key> is your API key
<text> is the new note (only used to overwrite a note)
The recommended way to access the service is through a correct HTTP request (everything UTF-8):
use the HTTP GET method to read a note, the HTTP POST method to write a note.
send your API key as a HTTP header.
to write a note: urlencode your note text in one POST field called "text" and send it as content-type application/x-www-form-urlencoded
.
use the URL
https://api.shrib.com/<note>
.
If the call is successful, the reply contains a HTTP header and the urlencoded (new) note text as text/plain. If there is an error, it is reported in the HTTP request/response line.
Here's an example PHP code to read a note (GET):
<?php $ch = curl_init("https://api.shrib.com/<note>"); curl_setopt($ch, CURLOPT_HEADER, FALSE); curl_setopt($ch, CURLOPT_HTTPHEADER, array('key: <key>')); curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1); $response = curl_exec($ch); curl_close ($ch); $text=urldecode($response); echo '<pre>'.$text.'</pre>'; ?>
Here's an example PHP code to write a note (POST):
<?php $ch = curl_init("https://api.shrib.com/<note>"); curl_setopt($ch, CURLOPT_HEADER, FALSE); curl_setopt($ch, CURLOPT_HTTPHEADER, array('key: <key>')); curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1); curl_setopt($ch, CURLOPT_POSTFIELDS, 'text='.urlencode('<text>')); $response = curl_exec($ch); curl_close ($ch); $text=urldecode($response); echo '<pre>'.$text.'</pre>'; ?>
For testing purposes, there is also a URL-based method. However, this is not recommended. It requires you to put your API key into the URL.
Example:
https://api.shrib.com/somenote?key=wer987lejf&text=testUrl
This is an experimental service. Currently, the following restrictions are applied:
limited calls per day (assigned individually at sign-up)
no encryption (since this is done on the client side anyway)
no backups and saves (cover this in your app)
The note text is limited to max. 10'000 Bytes.