## Zend_Service_Delicious

Description

Zend_Service_Delicious is a concrete implementation of the del.icio.us web service

- license: New BSD License
- copyright: Copyright (c) 2005-2007 Zend Technologies USA Inc. (http://www.zend.com)

Located in /Service/Delicious.php (line 62)

Class Constant Summary
API_URI = 'https://api.del.icio.us'
JSON_FANS = '/feeds/json/fans/%s'
JSON_NETWORK = '/feeds/json/network/%s'
JSON_POSTS = '/feeds/json/%s/%s'
JSON_TAGS = '/feeds/json/tags/%s'
JSON_URI = 'http://del.icio.us'
PATH_BUNDLES = '/v1/tags/bundles/all'
PATH_BUNDLE_ADD = '/v1/tags/bundles/set'
PATH_BUNDLE_DELETE = '/v1/tags/bundles/delete'
PATH_DATES = '/v1/posts/dates'
PATH_POSTS_ADD = '/v1/posts/add'
PATH_POSTS_ALL = '/v1/posts/all'
PATH_POSTS_GET = '/v1/posts/get'
PATH_POSTS_RECENT = '/v1/posts/recent'
PATH_POST_DELETE = '/v1/posts/delete'
PATH_TAGS = '/v1/tags/get'
PATH_TAG_RENAME = '/v1/tags/rename'
PATH_UPDATE = '/v1/posts/update'
Variable Summary
static float $_lastRequestTime
string $_auth_pass
string $_auth_uname
Zend_Service_Rest $_rest
Method Summary
Zend_Service_Delicio __construct ([string $uname = null], [string $pass = null])
void addBundle (string $bundle, array $tags)
Zend_Service_Delicious_Post createNewPost ( $title, $url)
void deleteBundle (string $bundle)
void deletePost (string $url)
Zend_Service_Delicious_PostList getAllPosts ([string $tag = null])
array getBundles ()
array getDates ([string $tag = null])
Zend_Date getLastUpdate ()
Zend_Service_Delicious_PostList getPosts ([string $tag = null], [Zend_Date $dt = null], [string $url = null])
Zend_Service_Delicious_PostList getRecentPosts ([string $tag = null], [string $count = 15])
array getTags ()
array getUserFans (string $user)
array getUserNetwork (string $user)
Zend_Service_Delicious_PostList getUserPosts (string $user, [int $count = null], [string $tag = null])
array getUserTags (string $user, [int $atleast = null], [int $count = null], [string $sort = 'alpha'])
DOMDocument makeRequest (string $path, [array $parms = array()], [string $type = 'xml'])
void renameTag (string $old, string $new)
Zend_Service_Delicio setAuth (string $uname, string $pass)
Variables
static float $_lastRequestTime = 0 (line 107)

Microtime of last request

- access: protected

string $_auth_pass (line 101)

Password

- access: protected

string $_auth_uname (line 95)

Username

- access: protected

Zend_Service_Rest $_rest (line 89)

Zend_Service_Rest instance

- access: protected

Methods
Constructor __construct (line 116)

Constructs a new del.icio.us Web Services Client

- access: public

Zend_Service_Delicio __construct ([string $uname = null], [string $pass = null])

- string $uname: Client username
- string $pass: Client password

addBundle (line 198)

Adds a new bundle

- access: public

void addBundle (string $bundle, array $tags)

- string $bundle: Name of new bundle
- array $tags: Array of tags

createNewPost (line 317)

Create new post

- access: public

Zend_Service_Delicious_Post createNewPost ( $title, $url)

- $title
- $url

deleteBundle (line 210)

Delete a bundle

- access: public

void deleteBundle (string $bundle)

- string $bundle: Name of bundle to be deleted

deletePost (line 221)

Delete a post

- access: public

void deletePost (string $url)

- string $url: URL of post to be deleted

getAllPosts (line 279)

Get all posts

- access: public

Zend_Service_Delicious_PostList getAllPosts ([string $tag = null])

- string $tag: Optional filtering by tag

getBundles (line 182)

Get all bundles.

Returnd array contains bundles as keys and array of tags as values.

- return: list of boundles
- access: public

array getBundles ()
getDates (line 234)

Get number of posts by date. Returns array where keys are dates and values are numbers of posts.

- return: list of dates
- access: public

array getDates ([string $tag = null])

- string $tag: Optional filtering by tag

getLastUpdate (line 139)

Get time of the last update

- access: public

Zend_Date getLastUpdate ()
getPosts (line 253)

Get posts matching the arguments. If no date or url is given, most recent date will be used.

- access: public

Zend_Service_Delicious_PostList getPosts ([string $tag = null], [Zend_Date $dt = null], [string $url = null])

- string $tag: Optional filtering by tag
- Zend_Date $dt: Optional filtering by date
- string $url: Optional filtering by url

getRecentPosts (line 298)

Get recent posts

- access: public

Zend_Service_Delicious_PostList getRecentPosts ([string $tag = null], [string $count = 15])

- string $tag: Optional filtering by tag
- string $count: Maximal number of posts to be returned (default 15)

getTags (line 158)

Get all tags.

Returnd array contains tags as keys and number of posts in tags as values

- return: list of tags
- access: public

array getTags ()
getUserFans (line 384)

Get fans of some user

- access: public

array getUserFans (string $user)

- string $user

getUserNetwork (line 373)

Get network of some user

- access: public

array getUserNetwork (string $user)

- string $user: Owner of the network

getUserPosts (line 329)

Get posts of some user

- access: public

Zend_Service_Delicious_PostList getUserPosts (string $user, [int $count = null], [string $tag = null])

- string $user: Owner of the posts
- int $count: Number of posts (default 15, max. 100)
- string $tag: Opional filtering by tag

getUserTags (line 351)

Get tags of some user Returend array has tags as keys and number of posts as values

- access: public

array getUserTags (string $user, [int $atleast = null], [int $count = null], [string $sort = 'alpha'])

- string $user: Owner of the posts
- int $atleast: include only tags for which there are at least ### number of posts
- int $count: Number of tags to get (default all)
- string $sort: Order of returned tags ('alpha' || 'count')

makeRequest (line 397)

Handles all GET requests to a web service

- return: response from web service
- access: public

DOMDocument makeRequest (string $path, [array $parms = array()], [string $type = 'xml'])

- string $path: Path
- array $parms: Array of GET parameters
- string $type: Type of a request xml|json

renameTag (line 170)

Rename a tag

- access: public

void renameTag (string $old, string $new)

- string $old: Old tag name
- string $new: New tag name

setAuth (line 129)

Set client username and password

- access: public

Zend_Service_Delicio setAuth (string $uname, string $pass)

- string $uname: Client user name
- string $pass: Client password

Class Constants
API_URI = 'https://api.del.icio.us' (line 64)
JSON_FANS = '/feeds/json/fans/%s' (line 82)
JSON_NETWORK = '/feeds/json/network/%s' (line 81)
JSON_POSTS = '/feeds/json/%s/%s' (line 79)
JSON_TAGS = '/feeds/json/tags/%s' (line 80)
JSON_URI = 'http://del.icio.us' (line 78)
PATH_BUNDLES = '/v1/tags/bundles/all' (line 68)
PATH_BUNDLE_ADD = '/v1/tags/bundles/set' (line 70)
PATH_BUNDLE_DELETE = '/v1/tags/bundles/delete' (line 69)
PATH_DATES = '/v1/posts/dates' (line 71)
PATH_POSTS_ADD = '/v1/posts/add' (line 75)
PATH_POSTS_ALL = '/v1/posts/all' (line 74)
PATH_POSTS_GET = '/v1/posts/get' (line 73)
PATH_POSTS_RECENT = '/v1/posts/recent' (line 76)
PATH_POST_DELETE = '/v1/posts/delete' (line 72)
PATH_TAGS = '/v1/tags/get' (line 66)
PATH_TAG_RENAME = '/v1/tags/rename' (line 67)
PATH_UPDATE = '/v1/posts/update' (line 65)

Documentation generated on Wed, 21 Feb 2007 12:02:24 -0800 by phpDocumentor 1.3.1