Class Zend_Service_Delicious

Description

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

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

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


	
			
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 $_authPass
 string $_authUname
 Zend_Service_Rest $_rest
Method Summary
 void __construct ([string $uname = null], [string $pass = null])
 Zend_Service_Delicious addBundle (string $bundle,  $tags)
 array getBundles ()
 array getDates ([string $tag = null])
 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, [ $parms = array()], [string $type = 'xml'])
 Zend_Service_Delicious renameTag (string $old, string $new)
 Zend_Service_Delicious setAuth (string $uname, string $pass)
Variables
static float $_lastRequestTime = 0 (line 109)

Microtime of last request

  • access: protected
string $_authPass (line 102)

Password

  • access: protected
string $_authUname (line 95)

Username

  • access: protected
Zend_Service_Rest $_rest (line 88)

Zend_Service_Rest instance

  • access: protected
Methods
Constructor __construct (line 118)

Constructs a new del.icio.us Web Services Client

  • access: public
void __construct ([string $uname = null], [string $pass = null])
  • string $uname: Client username
  • string $pass: Client password
addBundle (line 216)

Adds a new bundle

  • return: Provides a fluent interface
  • access: public
Zend_Service_Delicious addBundle (string $bundle,  $tags)
  • string $bundle: Name of new bundle
  • array $tags: Array of tags
createNewPost (line 357)

Create new post

  • access: public
Zend_Service_Delicious_Post createNewPost ( $title,  $url)
  • $title
  • $url
deleteBundle (line 232)

Delete a bundle

  • return: Provides a fluent interface
  • access: public
Zend_Service_Delicious deleteBundle (string $bundle)
  • string $bundle: Name of bundle to be deleted
deletePost (line 247)

Delete a post

  • return: Provides a fluent interface
  • access: public
Zend_Service_Delicious deletePost (string $url)
  • string $url: URL of post to be deleted
getAllPosts (line 318)

Get all posts

  • access: public
Zend_Service_Delicious_PostList getAllPosts ([string $tag = null])
  • string $tag: Optional filtering by tag
getBundles (line 198)

Get all bundles, returning an array with bundles as keys and array of tags as values

  • return: list of bundles
  • access: public
array getBundles ()
getDates (line 264)

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

Get time of the last update

  • throws: Zend_Service_Delicious_Exception
  • access: public
Zend_Date getLastUpdate ()
getPosts (line 287)

Get posts matching the arguments

If no date or url is given, most recent date will be used

  • throws: Zend_Service_Delicious_Exception
  • 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 337)

Get recent posts

  • access: public
Zend_Service_Delicious_PostList getRecentPosts ([string $tag = null], [string $count = 15])
  • string $tag: Optional filtering by tag
  • string $count: Maximum number of posts to be returned (default 15)
getTags (line 170)

Get all tags, returning an array with tags as keys and number of corresponding posts as values

  • return: list of tags
  • access: public
array getTags ()
getUserFans (line 430)

Get fans of a user

  • access: public
array getUserFans (string $user)
  • string $user: Owner of the fans
getUserNetwork (line 418)

Get network of a user

  • access: public
array getUserNetwork (string $user)
  • string $user: Owner of the network
getUserPosts (line 370)

Get posts of a 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: Optional filtering by tag
getUserTags (line 394)

Get tags of a user

Returned 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 444)

Handles all GET requests to a web service

  • return: response from web service
  • access: public
DOMDocument makeRequest (string $path, [ $parms = array()], [string $type = 'xml'])
  • string $path: Path
  • array $parms: Array of GET parameters
  • string $type: Type of a request xml|json
renameTag (line 184)

Rename a tag

  • return: Provides a fluent interface
  • access: public
Zend_Service_Delicious renameTag (string $old, string $new)
  • string $old: Old tag name
  • string $new: New tag name
setAuth (line 132)

Set client username and password

  • return: Provides a fluent interface
  • access: public
Zend_Service_Delicious setAuth (string $uname, string $pass)
  • string $uname: Client user name
  • string $pass: Client password
Class Constants
API_URI = 'https://api.del.icio.us' (line 62)
JSON_FANS = '/feeds/json/fans/%s' (line 81)
JSON_NETWORK = '/feeds/json/network/%s' (line 80)
JSON_POSTS = '/feeds/json/%s/%s' (line 78)
JSON_TAGS = '/feeds/json/tags/%s' (line 79)
JSON_URI = 'http://del.icio.us' (line 77)
PATH_BUNDLES = '/v1/tags/bundles/all' (line 67)
PATH_BUNDLE_ADD = '/v1/tags/bundles/set' (line 69)
PATH_BUNDLE_DELETE = '/v1/tags/bundles/delete' (line 68)
PATH_DATES = '/v1/posts/dates' (line 70)
PATH_POSTS_ADD = '/v1/posts/add' (line 74)
PATH_POSTS_ALL = '/v1/posts/all' (line 73)
PATH_POSTS_GET = '/v1/posts/get' (line 72)
PATH_POSTS_RECENT = '/v1/posts/recent' (line 75)
PATH_POST_DELETE = '/v1/posts/delete' (line 71)
PATH_TAGS = '/v1/tags/get' (line 65)
PATH_TAG_RENAME = '/v1/tags/rename' (line 66)
PATH_UPDATE = '/v1/posts/update' (line 64)

Documentation generated on Sun, 27 May 2007 23:22:35 -0700 by phpDocumentor 1.3.2