Sitehoover API is an interface making integration of outside applications with sitehoover.com service possible. Sitehoover API is based on JSON-RPC protocol.
API requests are directed to the following address:
Sitehoover API Key is an authorization key required by each of Sitehoover API methods. The individual Sitehoover API Key is available to every registered user in Account Settings.
{
"id" : "1",
"method" : "ping",
"params" : [
YOUR_SITEHOOVER_API_KEY, {
"echo" : "my pong"
}
]
}
id – Request identifier.method – Method name.params – Parameters, first value of the array is Sitehoover API Key.{
"result": "my pong",
"error": null,
"id": "1"
}
result – Response data.error – Error code:
null – No error.400 – Bad request, example invalid request data format or lack of the required parameters.403 – Authorization error. Incorrect Sitehoover API Key.404 – Method does not exist.500 – Internal server error.id – Request identifier.data field.
Example (JavaScript):
var url = 'http://api.sitehoover.com/api/?data=' + escape(JSON.stringify(_request_json)) + '&jsoncallback=jsonp1268568693530';gdzie:
_request_json – Obiekt JSON żądania.Connection test.
JSON Request:{
"id" : "1",
"method" : "ping",
"params" : [
YOUR_SITEHOOVER_API_KEY, {
"echo" : "my pong" [OPTIONAL]
}
]
}
JSON Response:
{
"result": "my pong",
"error": null,
"id": "1"
}
Return array of hoovers.
JSON Request:{
"id" : "1",
"method" : "get_hoovers",
"params" : [
YOUR_SITEHOOVER_API_KEY
]
}
JSON Response:
{
"result": [
{
"oid" : 423,
"name" : "Example hoover 1",
"path" : "example-hoover-1",
"thumb" : "",
"tags" : "development, api, php, json",
"public" : 1,
"main" : 1
},
{
"oid" : 1123,
"name" : "Example hoover 2",
"path" : "example-hoover-2",
"thumb" : "",
"tags" : "",
"public" : 0
"main" : 0
}
],
"error" : null,
"id" : "1"
}
Return array of folders from hoover.
JSON Request:{
"id" : "1",
"method" : "get_folders",
"params" : [
YOUR_SITEHOOVER_API_KEY, {
"hoover_oid" : 4
}
]
}
JSON Response:
{
"result" : [
{
"oid" : 121,
"name" : "___main___",
"sortorder" : 0,
"main" : 1
},{
"oid" : 432,
"name" : "My folder name",
"sortorder" : 1,
"main" : 0
},{
"oid" : 1242,
"name" : "Second folder name",
"sortorder" : 2,
"main" : 0
}
],
"error" : null,
"id" : "1"
}
Add folder to hoover.
JSON Request:{
"id" : "1",
"method" : "add_folder",
"params" : [
YOUR_SITEHOOVER_API_KEY, {
"hoover_oid" : 4,
"name" : "New folder",
"sortorder" : 0 [OPTIONAL]
}
]
}
JSON Response:
{
"result" : 2355,
"error" : null,
"id" : "1"
}
Edit folder.
JSON Request:{
"id' : "1",
"method" : "edit_folder",
"params" : [
YOUR_SITEHOOVER_API_KEY, {
"oid" : 10,
"name" : "new name",
"sortorder": 1 [OPTIONAL]
}
]
}
JSON Response:
{
"result" : true,
"error" : null,
"id" : "1"
}
Delete folder.
JSON Request:{
"id" : "1",
"method" : "delete_folder",
"params" : [
YOUR_SITEHOOVER_API_KEY, {
"oid" : 7
}
]
}
JSON Response:
{
"result" : true,
"error" : null,
"id" : "1"
}
Return array of pages from folder.
JSON Request:{
"id" : "1",
"method" : "get_pages",
"params" : [
YOUR_SITEHOOVER_API_KEY, {
"folder_oid" : 9
}
]
}
JSON Response:
{
"result": [
{
"oid" : "128",
"title" : "Another title of Yahoo!",
"url" : "http://www.yahoo.com/",
"thumb" : "https://thumbs.w3media.pl/thumbs/2f9704c729e7ed3b41647b7d0ad649fe,1,5.jpg",
"note" : "sample note",
"rss" : "http://sports.yahoo.com/olympics/rss.xml",
"sortorder" : "1"
},{
"oid" : "229",
"title" : "Simply google",
"url" : "http://www.google.com/",
"thumb" : "https://thumbs.w3media.pl/thumbs/3e4c44d9f192da3bcf0c1ece96717408,1,5.jpg",
"note" : "",
"rss" : "",
"sortorder" : "2"
}
],
"error":null,
"id":"1"
}
Add page to folder.
JSON Request:{
"id" : "1",
"method" : "add_page",
"params" : [
YOUR_SITEHOOVER_API_KEY, {
"folder_oid" : 9,
"url" : "http://www.web-album.org",
"title" : "My page title", [OPTIONAL]
"rss" : "http://www.web-album.org/pl/rss-last-photos/", [OPTIONAL]
"note" : "my note", [OPTIONAL]
"sortorder" : 1 [OPTIONAL]
}
]
}
JSON Response:
{
"result" : 2134,
"error" : null,
"id" : "1"
}
Edit page.
JSON Request:{
"id" : "1",
"method" : "edit_page",
"params" : [
YOUR_SITEHOOVER_API_KEY, {
"oid" : 2134,
"folder_oid" : 8, [OPTIONAL]
"title" : "My new page title", [OPTIONAL]
"rss" : "http://www.web-album.org/pl/rss-last-comments/", [OPTIONAL]
"note" : "my new note", [OPTIONAL]
"sortorder" : 1 [OPTIONAL]
}
]
}
JSON Response:
{
"result" : true,
"error" : null,
"id" : "1"
}
Delete page.
JSON Request:{
"id" : "1",
"method" : "delete_page",
"params" : [
YOUR_SITEHOOVER_API_KEY, {
"oid" : 3
}
]
}
JSON Response:
{
"result" : true,
"error" : null,
"id" : "1"
}