Zend Framework
LICENSE
This source file is subject to the new BSD license that is bundled with this package in the file LICENSE.txt. It is also available through the world-wide-web at this URL: http://framework.zend.com/license/new-bsd If you did not receive a copy of the license and are unable to obtain it through the world-wide-web, please send an email to license@zend.com so we can send you a copy immediately.

string
$_baseUri= ''http://simpy.com/simpy/api/rest/''
Base URI to which API methods and parameters will be appended
'http://simpy.com/simpy/api/rest/'
Details
\Zend_Http_Client
$_http= ''
HTTP client for use in making web service calls

__construct(
string $username, string $password
)
:
void
Constructs a new Simpy (free) REST API Client
Name | Type | Description |
---|---|---|
$username | string | Username for the Simpy user account |
$password | string | Password for the Simpy user account |

_makeRequest(
string $op, array $query
=
null
)
:
\DOMDocument
Sends a request to the REST API service and does initial processing on the response.
Name | Type | Description |
---|---|---|
$op | string | Name of the operation for the request |
$query | array | Query data for the request (optional) |
Type | Description |
---|---|
\DOMDocument | Parsed XML response |
Exception | Description |
---|---|
\Zend_Service_Exception |

deleteLink(
string $href
)
:
\Zend_Service_Simpy
Deletes a given link.
Name | Type | Description |
---|---|---|
$href | string | URL of the bookmark to delete |
Type | Description |
---|---|
\Zend_Service_Simpy | Provides a fluent interface |

deleteNote(
int $noteId
)
:
\Zend_Service_Simpy
Deletes a given note.
Name | Type | Description |
---|---|---|
$noteId | int | ID of the note to delete |
Type | Description |
---|---|
\Zend_Service_Simpy | Provides a fluent interface |

getHttpClient(
)
:
\Zend_Http_Client
Returns the HTTP client currently in use by this class for REST API calls, intended mainly for testing.
Type | Description |
---|---|
\Zend_Http_Client |

getLinks(
\Zend_Service_Simpy_LinkQuery $q
=
null
)
:
\Zend_Service_Simpy_LinkSet
Performs a query on existing links and returns the results or returns all links if no particular query is specified (which should be used sparingly to prevent overloading Simpy servers)
Name | Type | Description |
---|---|---|
$q | \Zend_Service_Simpy_LinkQuery | Query object to use (optional) |
Type | Description |
---|---|
\Zend_Service_Simpy_LinkSet |

getNotes(
string $q
=
null, int $limit
=
null
)
:
\Zend_Service_Simpy_NoteSet
Returns all notes in reverse chronological order by add date or by rank.
Name | Type | Description |
---|---|---|
$q | string | Query string formatted using Simpy search syntax and search fields (optional) |
$limit | int | Limits the number notes returned (optional) |
Type | Description |
---|---|
\Zend_Service_Simpy_NoteSet |

getTags(
int $limit
=
null
)
:
\Zend_Service_Simpy_TagSet
Returns a list of all tags and their counts, ordered by count in decreasing order
Name | Type | Description |
---|---|---|
$limit | int | Limits the number of tags returned (optional) |
Type | Description |
---|---|
\Zend_Service_Simpy_TagSet |
Exception | Description |
---|---|
\Zend_Service_Exception |

getWatchlist(
int $watchlistId
)
:
\Zend_Service_Simpy_Watchlist
Returns the meta-data for a given watchlist.
Name | Type | Description |
---|---|---|
$watchlistId | int | ID of the watchlist to retrieve |
Type | Description |
---|---|
\Zend_Service_Simpy_Watchlist |

getWatchlists(
)
:
\Zend_Service_Simpy_WatchlistSet
Return a list of watchlists and their meta-data, including the number of new links added to each watchlist since last login.
Type | Description |
---|---|
\Zend_Service_Simpy_WatchlistSet |

mergeTags(
string $fromTag1, string $fromTag2, string $toTag
)
:
\Zend_Service_Simpy
Merges two tags into a new tag.
Name | Type | Description |
---|---|---|
$fromTag1 | string | First tag to merge. |
$fromTag2 | string | Second tag to merge. |
$toTag | string | Tag to merge the two tags into. |
Type | Description |
---|---|
\Zend_Service_Simpy | Provides a fluent interface |

removeTag(
string $tag
)
:
\Zend_Service_Simpy
Removes a tag.
Name | Type | Description |
---|---|---|
$tag | string | Tag to be removed |
Type | Description |
---|---|
\Zend_Service_Simpy | Provides a fluent interface |

renameTag(
string $fromTag, string $toTag
)
:
\Zend_Service_Simpy
Renames a tag.
Name | Type | Description |
---|---|---|
$fromTag | string | Tag to be renamed |
$toTag | string | New tag name |
Type | Description |
---|---|
\Zend_Service_Simpy | Provides a fluent interface |

saveLink(
string $title, string $href, int $accessType, mixed $tags
=
null, string $urlNickname
=
null, string $note
=
null
)
:
\Zend_Service_Simpy
Saves a given link.
Name | Type | Description |
---|---|---|
$title | string | Title of the page to save |
$href | string | URL of the page to save |
$accessType | int | ACCESSTYPE_PUBLIC or ACCESSTYPE_PRIVATE |
$tags | mixed | String containing a comma-separated list of tags or array of strings containing tags (optional) |
$urlNickname | string | Alternative custom title (optional) |
$note | string | Free text note (optional) |
Type | Description |
---|---|
\Zend_Service_Simpy | Provides a fluent interface |

saveNote(
string $title, mixed $tags
=
null, string $description
=
null, int $noteId
=
null
)
:
\Zend_Service_Simpy
Saves a note.
Name | Type | Description |
---|---|---|
$title | string | Title of the note |
$tags | mixed | String containing a comma-separated list of tags or array of strings containing tags (optional) |
$description | string | Free-text note (optional) |
$noteId | int | Unique identifier for an existing note to update (optional) |
Type | Description |
---|---|
\Zend_Service_Simpy | Provides a fluent interface |

splitTag(
string $tag, string $toTag1, string $toTag2
)
:
\Zend_Service_Simpy
Splits a single tag into two separate tags.
Name | Type | Description |
---|---|---|
$tag | string | Tag to split |
$toTag1 | string | First tag to split into |
$toTag2 | string | Second tag to split into |
Type | Description |
---|---|
\Zend_Service_Simpy | Provides a fluent interface |