API Documentation

Zend/Service/Simpy.php

Show: inherited
Table of Contents

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-2012 Zend Technologies USA Inc. (http://www.zend.com)  
License
New BSD License  
Package
Zend_Service  
Subpackage
Simpy  
Version
$Id: Simpy.php 24594 2012-01-05 21:27:01Z matthew $  

\Zend_Service_Simpy

Package: Zend\Service\Simpy

Category
Zend  
Copyright
Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com)  
License
New BSD License  
Link
http://www.simpy.com/doc/api/rest/  

Properties

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

Base URI to which API methods and parameters will be appended

Default value'http://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.15.1.