API Documentation

Service/Simpy.php

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.

category
Zend  
copyright
Copyright (c) 2005-2011 Zend Technologies USA Inc. (http://www.zend.com)  
license
New BSD License  
package
Zend_Service  
subpackage
Simpy  
version
$Id: Simpy.php 23775 2011-03-01 17:25:24Z ralph $  

\Zend_Service_Simpy

category
Zend  
copyright
Copyright (c) 2005-2011 Zend Technologies USA Inc. (http://www.zend.com)  
license
New BSD License  
link
http://www.simpy.com/doc/api/rest/  
package
Zend_Service  
subpackage
Simpy  

Properties

Propertyprotectedstring  $_baseUri= 'http://simpy.com/simpy/api/rest/'

Base URI to which API methods and parameters will be appended

Default valuehttp://simpy.com/simpy/api/rest/Details
Type
string
Propertyprotected\Zend_Http_Client  $_http= ''

HTTP client for use in making web service calls

Details
Type
\Zend_Http_Client

Methods

methodpublic__construct( string $username, string $password ) : void

Constructs a new Simpy (free) REST API Client

Parameters
Name Type Description
$username string Username for the Simpy user account
$password string Password for the Simpy user account
methodprotected_makeRequest( string $op, array $query = null ) : \DOMDocument

Sends a request to the REST API service and does initial processing on the response.

Parameters
Name Type Description
$op string Name of the operation for the request
$query array

Query data for the request (optional)

Returns
Type Description
\DOMDocument Parsed XML response
Throws
Exception Description
\Zend_Service_Exception
methodpublicdeleteLink( string $href ) : \Zend_Service_Simpy

Deletes a given link.

Parameters
Name Type Description
$href string URL of the bookmark to delete
Returns
Type Description
\Zend_Service_Simpy Provides a fluent interface
Details
link
http://www.simpy.com/doc/api/rest/DeleteLink  
methodpublicdeleteNote( int $noteId ) : \Zend_Service_Simpy

Deletes a given note.

Parameters
Name Type Description
$noteId int ID of the note to delete
Returns
Type Description
\Zend_Service_Simpy Provides a fluent interface
Details
link
http://www.simpy.com/doc/api/rest/DeleteNote  
methodpublicgetHttpClient( ) : \Zend_Http_Client

Returns the HTTP client currently in use by this class for REST API calls, intended mainly for testing.

Returns
Type Description
\Zend_Http_Client
methodpublicgetLinks( \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)

Parameters
Name Type Description
$q \Zend_Service_Simpy_LinkQuery

Query object to use (optional)

Returns
Type Description
\Zend_Service_Simpy_LinkSet
methodpublicgetNotes( string $q = null, int $limit = null ) : \Zend_Service_Simpy_NoteSet

Returns all notes in reverse chronological order by add date or by rank.

Parameters
Name Type Description
$q string

Query string formatted using Simpy search syntax and search fields (optional)

$limit int

Limits the number notes returned (optional)

Returns
Type Description
\Zend_Service_Simpy_NoteSet
Details
link
http://www.simpy.com/doc/api/rest/GetNotes  
link
http://www.simpy.com/simpy/FAQ.do#searchSyntax  
link
http://www.simpy.com/simpy/FAQ.do#searchFieldsLinks  
methodpublicgetTags( int $limit = null ) : \Zend_Service_Simpy_TagSet

Returns a list of all tags and their counts, ordered by count in decreasing order

Parameters
Name Type Description
$limit int

Limits the number of tags returned (optional)

Returns
Type Description
\Zend_Service_Simpy_TagSet
Throws
Exception Description
\Zend_Service_Exception
Details
link
http://www.simpy.com/doc/api/rest/GetTags  
methodpublicgetWatchlist( int $watchlistId ) : \Zend_Service_Simpy_Watchlist

Returns the meta-data for a given watchlist.

Parameters
Name Type Description
$watchlistId int ID of the watchlist to retrieve
Returns
Type Description
\Zend_Service_Simpy_Watchlist
Details
link
http://www.simpy.com/doc/api/rest/GetWatchlist  
methodpublicgetWatchlists( ) : \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.

methodpublicmergeTags( string $fromTag1, string $fromTag2, string $toTag ) : \Zend_Service_Simpy

Merges two tags into a new tag.

Parameters
Name Type Description
$fromTag1 string First tag to merge.
$fromTag2 string Second tag to merge.
$toTag string Tag to merge the two tags into.
Returns
Type Description
\Zend_Service_Simpy Provides a fluent interface
Details
link
http://www.simpy.com/doc/api/rest/MergeTags  
methodpublicremoveTag( string $tag ) : \Zend_Service_Simpy

Removes a tag.

Parameters
Name Type Description
$tag string Tag to be removed
Returns
Type Description
\Zend_Service_Simpy Provides a fluent interface
Details
link
http://www.simpy.com/doc/api/rest/RemoveTag  
methodpublicrenameTag( string $fromTag, string $toTag ) : \Zend_Service_Simpy

Renames a tag.

Parameters
Name Type Description
$fromTag string Tag to be renamed
$toTag string New tag name
Returns
Type Description
\Zend_Service_Simpy Provides a fluent interface
Details
link
http://www.simpy.com/doc/api/rest/RenameTag  
methodpublicsaveLink( string $title, string $href, int $accessType, mixed $tags = null, string $urlNickname = null, string $note = null ) : \Zend_Service_Simpy

Saves a given link.

Parameters
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)

Returns
Type Description
\Zend_Service_Simpy Provides a fluent interface
Details
link
Zend_Service_Simpy::ACCESSTYPE_PUBLIC  
link
Zend_Service_Simpy::ACCESSTYPE_PRIVATE  
link
http://www.simpy.com/doc/api/rest/SaveLink  
methodpublicsaveNote( string $title, mixed $tags = null, string $description = null, int $noteId = null ) : \Zend_Service_Simpy

Saves a note.

Parameters
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)

Returns
Type Description
\Zend_Service_Simpy Provides a fluent interface
Details
link
http://www.simpy.com/doc/api/rest/SaveNote  
methodpublicsplitTag( string $tag, string $toTag1, string $toTag2 ) : \Zend_Service_Simpy

Splits a single tag into two separate tags.

Parameters
Name Type Description
$tag string Tag to split
$toTag1 string First tag to split into
$toTag2 string Second tag to split into
Returns
Type Description
\Zend_Service_Simpy Provides a fluent interface
Details
link
http://www.simpy.com/doc/api/rest/SplitTag  
Documentation was generated by DocBlox 0.13.3.