API Documentation

Service/Simpy.php

Includes Classes 
category
Zend
copyright
Copyright (c) 2005-2010 Zend Technologies USA Inc. (http://www.zend.com)
license
http://framework.zend.com/license/new-bsd New BSD License
package
Zend_Service
subpackage
Simpy
version
$Id: Simpy.php 20096 2010-01-06 02:05:09Z bkarwin $
Classes
Zend_Service_Simpy

Description

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.

Zend_Service_Simpy

category
Zend
copyright
Copyright (c) 2005-2010 Zend Technologies USA Inc. (http://www.zend.com)
license
http://framework.zend.com/license/new-bsd New BSD License
link
http://www.simpy.com/doc/api/rest/
package
Zend_Service
subpackage
Simpy
Properties
$_baseUri
$_http
Methods
__construct
getHttpClient
_makeRequest
getTags
removeTag
renameTag
mergeTags
splitTag
getLinks
saveLink
deleteLink
getWatchlists
getWatchlist
getNotes
saveNote
deleteNote

Description

Properties

$_baseUri

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

Base URI to which API methods and parameters will be appended

Details

$_baseUri
string
visibility
protected
default
http://simpy.com/simpy/api/rest/
final
false
static
false

$_http

Zend_Http_Client $_http = ''

HTTP client for use in making web service calls

Details

$_http
Zend_Http_Client
visibility
protected
default
final
false
static
false

Methods

__construct

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

Constructs a new Simpy (free) REST API Client

Arguments
$username
string
Username for the Simpy user account
$password
string
Password for the Simpy user account
Details
visibility
public
final
false
static
false

_makeRequest

_makeRequest( string $op, array $query = null ) : DOMDocument

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

Arguments
$op
string
Name of the operation for the request
$query
array
Query data for the request (optional)
Output
DOMDocument
Parsed XML response
Details
visibility
protected
final
false
static
false
throws

deleteLink

deleteLink( string $href ) : Zend_Service_Simpy

Deletes a given link.

Arguments
$href
string
URL of the bookmark to delete
Output
Zend_Service_Simpy
Provides a fluent interface
Details
visibility
public
final
false
static
false
link
http://www.simpy.com/doc/api/rest/DeleteLink

deleteNote

deleteNote( int $noteId ) : Zend_Service_Simpy

Deletes a given note.

Arguments
$noteId
int
ID of the note to delete
Output
Zend_Service_Simpy
Provides a fluent interface
Details
visibility
public
final
false
static
false
link
http://www.simpy.com/doc/api/rest/DeleteNote

getHttpClient

getHttpClient( ) : Zend_Http_Client

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

Details
visibility
public
final
false
static
false

getLinks

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)

Arguments
$q
Zend_Service_Simpy_LinkQuery
Query object to use (optional)
Details
visibility
public
final
false
static
false

getNotes

getNotes( string $q = null, int $limit = null ) : Zend_Service_Simpy_NoteSet

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

Arguments
$q
string
Query string formatted using Simpy search syntax and search fields (optional)
$limit
int
Limits the number notes returned (optional)
Details
visibility
public
final
false
static
false
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

getTags

getTags( int $limit = null ) : Zend_Service_Simpy_TagSet

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

Arguments
$limit
int
Limits the number of tags returned (optional)
Details
visibility
public
final
false
static
false
link
http://www.simpy.com/doc/api/rest/GetTags
throws

getWatchlist

getWatchlist( int $watchlistId ) : Zend_Service_Simpy_Watchlist

Returns the meta-data for a given watchlist.

Arguments
$watchlistId
int
ID of the watchlist to retrieve
Details
visibility
public
final
false
static
false
link
http://www.simpy.com/doc/api/rest/GetWatchlist

getWatchlists

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.

Details
visibility
public
final
false
static
false
link
http://www.simpy.com/doc/api/rest/GetWatchlists

mergeTags

mergeTags( string $fromTag1, string $fromTag2, string $toTag ) : Zend_Service_Simpy

Merges two tags into a new tag.

Arguments
$fromTag1
string
First tag to merge.
$fromTag2
string
Second tag to merge.
$toTag
string
Tag to merge the two tags into.
Output
Zend_Service_Simpy
Provides a fluent interface
Details
visibility
public
final
false
static
false
link
http://www.simpy.com/doc/api/rest/MergeTags

removeTag

removeTag( string $tag ) : Zend_Service_Simpy

Removes a tag.

Arguments
$tag
string
Tag to be removed
Output
Zend_Service_Simpy
Provides a fluent interface
Details
visibility
public
final
false
static
false
link
http://www.simpy.com/doc/api/rest/RemoveTag

renameTag

renameTag( string $fromTag, string $toTag ) : Zend_Service_Simpy

Renames a tag.

Arguments
$fromTag
string
Tag to be renamed
$toTag
string
New tag name
Output
Zend_Service_Simpy
Provides a fluent interface
Details
visibility
public
final
false
static
false
link
http://www.simpy.com/doc/api/rest/RenameTag

saveLink

saveLink( string $title, string $href, int $accessType, mixed $tags = null, string $urlNickname = null, string $note = null ) : Zend_Service_Simpy

Saves a given link.

Arguments
$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)
Output
Zend_Service_Simpy
Provides a fluent interface
Details
visibility
public
final
false
static
false
link
Zend_Service_Simpy::ACCESSTYPE_PUBLIC
link
Zend_Service_Simpy::ACCESSTYPE_PRIVATE
link
http://www.simpy.com/doc/api/rest/SaveLink

saveNote

saveNote( string $title, mixed $tags = null, string $description = null, int $noteId = null ) : Zend_Service_Simpy

Saves a note.

Arguments
$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)
Output
Zend_Service_Simpy
Provides a fluent interface
Details
visibility
public
final
false
static
false
link
http://www.simpy.com/doc/api/rest/SaveNote

splitTag

splitTag( string $tag, string $toTag1, string $toTag2 ) : Zend_Service_Simpy

Splits a single tag into two separate tags.

Arguments
$tag
string
Tag to split
$toTag1
string
First tag to split into
$toTag2
string
Second tag to split into
Output
Zend_Service_Simpy
Provides a fluent interface
Details
visibility
public
final
false
static
false
link
http://www.simpy.com/doc/api/rest/SplitTag
Documentation was generated by DocBlox.