- 5 Talk
-
API
Contents |
Overview
Edit
The Faviki API is a simple API that provides a way to save/edit bookmarks through other websites and online applications.
- Be efficient and considerate with the frequency of service requests. Current limit is 1000 bookmarks per day.
- All strings, including tags must be properly encoded.
- Tags must correspond to Wikipedia concepts, or they will not be saved. Tags are separated by ';'. For multi-word tags, both '%20' and '_' can be used instead of space.
- English tags can be mixed with tags in other language. For instance, if your lang is 'de' (German), the tags 'Nachrichten' ('News' in German) and 'Semantic web' (in English) can be sent together. This can also be useful if there is no tag in a particular language.
Request Format
Edit
Calls to the Faviki API are sent via POST method to http://www.faviki.com/api/save/.
Parameters
Edit
The values you’ll be sending to Faviki.
| Parameter | Value | Description |
|---|---|---|
| api_key | API key | You can find your API key on your profile page. |
| url | url | A URL string. Must be valid. |
| title | string | A title. If omitted, an original title of a webpage will be used. |
| quote | string | Optional quote from a webpage. |
| note | string | Optional user's note. |
| tags | tag1;tag2;tag3... | A list of tags, semicolon separated. This will completely replace any existing tags for a bookmark. At least one tag must be included! |
| private | 1 or 0 | The bookmark’s privacy status. If omitted, default is 0. |
| lang | de|es|fi|fr|it|ja|nl|no|pl|pt|ru|sv|zh | The language of tags, respectively: English, Deutsch, Español, Suomi, Français, Italiano, 日本語, Nederlands , Norsk (bokmål), Polski, Português, Русский, Svenska, 中文. If lang is omitted, English is used by default. |
Response Format
Edit
The XML response provides the status of the request.
<faviki_response status="[message]" />
Examples
Edit
Say you want to save a bookmark with the following data:
| url | http://en.wikipedia.org/wiki/RDFa |
| title | Wikipedia page on RDFa |
| quote | RDFa is a set of extensions to XHTML being proposed by W3C. |
| note | RDFa rules! |
| tags | RDFa; Resource Description Framework; Semantic Web; XHTML |
Post data you send to http://www.faviki.com/api/save/ should look like this:
api_key=YOUR_API_KEY &url=http://en.wikipedia.org/wiki/RDFa &title=Wikipedia%20page%20on%20RDFa "e=RDFa%20is%20a%20set%20of%20extensions%20to%20XHTML%20being%20proposed%20by%20W3C. ¬e=RDFa%20rules%21 &tags=RDFa;Resource%20Description%20Framework;Semantic%20Web;XHTML