Moodle  2.2.1
http://www.collinsharper.com
Zend_Service_Delicious Class Reference

Public Member Functions

 __construct ($uname=null, $pass=null)
 setAuth ($uname, $pass)
 getLastUpdate ()
 getTags ()
 renameTag ($old, $new)
 getBundles ()
 addBundle ($bundle, array $tags)
 deleteBundle ($bundle)
 deletePost ($url)
 getDates ($tag=null)
 getPosts ($tag=null, Zend_Date $dt=null, $url=null)
 getAllPosts ($tag=null)
 getRecentPosts ($tag=null, $count=15)
 createNewPost ($title, $url)
 getUserPosts ($user, $count=null, $tag=null)
 getUserTags ($user, $atleast=null, $count=null, $sort= 'alpha')
 getUserNetwork ($user)
 getUserFans ($user)
 getUrlDetails ($url)
 makeRequest ($path, array $parms=array(), $type= 'xml')

Data Fields

const API_URI = 'https://api.del.icio.us'
const PATH_UPDATE = '/v1/posts/update'
const PATH_TAGS = '/v1/tags/get'
const PATH_TAG_RENAME = '/v1/tags/rename'
const PATH_BUNDLES = '/v1/tags/bundles/all'
const PATH_BUNDLE_DELETE = '/v1/tags/bundles/delete'
const PATH_BUNDLE_ADD = '/v1/tags/bundles/set'
const PATH_DATES = '/v1/posts/dates'
const PATH_POST_DELETE = '/v1/posts/delete'
const PATH_POSTS_GET = '/v1/posts/get'
const PATH_POSTS_ALL = '/v1/posts/all'
const PATH_POSTS_ADD = '/v1/posts/add'
const PATH_POSTS_RECENT = '/v1/posts/recent'
const JSON_URI = 'http://del.icio.us'
const JSON_POSTS = '/feeds/json/%s/%s'
const JSON_TAGS = '/feeds/json/tags/%s'
const JSON_NETWORK = '/feeds/json/network/%s'
const JSON_FANS = '/feeds/json/fans/%s'
const JSON_URL = '/feeds/json/url/data'

Protected Attributes

 $_rest
 $_authUname
 $_authPass

Static Protected Attributes

static $_lastRequestTime = 0

Detailed Description

Definition at line 60 of file Delicious.php.


Constructor & Destructor Documentation

__construct ( uname = null,
pass = null 
)

Constructs a new del.icio.us Web Services Client

Parameters:
string$unameClient username
string$passClient password
Returns:
void

Definition at line 119 of file Delicious.php.

Here is the call graph for this function:


Member Function Documentation

addBundle ( bundle,
array tags 
)

Adds a new bundle

Parameters:
string$bundleName of new bundle
array$tagsArray of tags
Returns:
Zend_Service_Delicious Provides a fluent interface

Definition at line 217 of file Delicious.php.

Here is the call graph for this function:

createNewPost ( title,
url 
)

Create new post

Returns:
Zend_Service_Delicious_Post

Definition at line 351 of file Delicious.php.

deleteBundle ( bundle)

Delete a bundle

Parameters:
string$bundleName of bundle to be deleted
Returns:
Zend_Service_Delicious Provides a fluent interface

Definition at line 233 of file Delicious.php.

Here is the call graph for this function:

deletePost ( url)

Delete a post

Parameters:
string$urlURL of post to be deleted
Returns:
Zend_Service_Delicious Provides a fluent interface

Definition at line 248 of file Delicious.php.

Here is the call graph for this function:

getAllPosts ( tag = null)

Get all posts

Parameters:
string$tagOptional filtering by tag
Returns:
Zend_Service_Delicious_PostList

Definition at line 312 of file Delicious.php.

Here is the call graph for this function:

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

Returns:
array list of bundles

Definition at line 199 of file Delicious.php.

Here is the call graph for this function:

getDates ( tag = null)

Get number of posts by date

Returns array where keys are dates and values are numbers of posts

Parameters:
string$tagOptional filtering by tag
Returns:
array list of dates

Definition at line 265 of file Delicious.php.

Here is the call graph for this function:

Get time of the last update

Exceptions:
Zend_Service_Delicious_Exception
Returns:
Zend_Date
Todo:
replace strtotime() with Zend_Date equivalent
See also:
Zend_Service_Delicious_Exception

Definition at line 147 of file Delicious.php.

Here is the call graph for this function:

getPosts ( tag = null,
Zend_Date dt = null,
url = null 
)

Get posts matching the arguments

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

Parameters:
string$tagOptional filtering by tag
Zend_Date$dtOptional filtering by date
string$urlOptional filtering by url
Exceptions:
Zend_Service_Delicious_Exception
Returns:
Zend_Service_Delicious_PostList

Definition at line 288 of file Delicious.php.

Here is the call graph for this function:

getRecentPosts ( tag = null,
count = 15 
)

Get recent posts

Parameters:
string$tagOptional filtering by tag
string$countMaximum number of posts to be returned (default 15)
Returns:
Zend_Service_Delicious_PostList

Definition at line 331 of file Delicious.php.

Here is the call graph for this function:

getTags ( )

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

Returns:
array list of tags

Definition at line 171 of file Delicious.php.

Here is the call graph for this function:

getUrlDetails ( url)

Get details on a particular bookmarked URL

Returned array contains four elements:

  • hash - md5 hash of URL
  • top_tags - array of tags and their respective usage counts
  • url - URL for which details were returned
  • total_posts - number of users that have bookmarked URL

If URL hasen't been bookmarked null is returned.

Parameters:
string$urlURL for which to get details
Returns:
array

Definition at line 444 of file Delicious.php.

Here is the call graph for this function:

getUserFans ( user)

Get fans of a user

Parameters:
string$userOwner of the fans
Returns:
array

Definition at line 424 of file Delicious.php.

Here is the call graph for this function:

getUserNetwork ( user)

Get network of a user

Parameters:
string$userOwner of the network
Returns:
array

Definition at line 412 of file Delicious.php.

Here is the call graph for this function:

getUserPosts ( user,
count = null,
tag = null 
)

Get posts of a user

Parameters:
string$userOwner of the posts
int$countNumber of posts (default 15, max. 100)
string$tagOptional filtering by tag
Returns:
Zend_Service_Delicious_PostList

Definition at line 364 of file Delicious.php.

Here is the call graph for this function:

getUserTags ( user,
atleast = null,
count = null,
sort = 'alpha' 
)

Get tags of a user

Returned array has tags as keys and number of posts as values

Parameters:
string$userOwner of the posts
int$atleastInclude only tags for which there are at least ### number of posts
int$countNumber of tags to get (default all)
string$sortOrder of returned tags ('alpha' || 'count')
Returns:
array

Definition at line 388 of file Delicious.php.

Here is the call graph for this function:

makeRequest ( path,
array parms = array(),
type = 'xml' 
)

Handles all GET requests to a web service

Parameters:
string$pathPath
array$parmsArray of GET parameters
string$typeType of a request ("xml"|"json")
Returns:
mixed decoded response from web service
Exceptions:
Zend_Service_Delicious_Exception
See also:
Zend_Service_Delicious_Exception
Zend_Service_Delicious_Exception
Zend_Service_Delicious_Exception

Definition at line 466 of file Delicious.php.

Here is the caller graph for this function:

renameTag ( old,
new 
)

Rename a tag

Parameters:
string$oldOld tag name
string$newNew tag name
Returns:
Zend_Service_Delicious Provides a fluent interface

Definition at line 185 of file Delicious.php.

Here is the call graph for this function:

setAuth ( uname,
pass 
)

Set client username and password

Parameters:
string$unameClient user name
string$passClient password
Returns:
Zend_Service_Delicious Provides a fluent interface

Definition at line 133 of file Delicious.php.

Here is the caller graph for this function:


Field Documentation

$_authPass [protected]

Definition at line 103 of file Delicious.php.

$_authUname [protected]

Definition at line 96 of file Delicious.php.

$_lastRequestTime = 0 [static, protected]

Definition at line 110 of file Delicious.php.

$_rest [protected]

Definition at line 89 of file Delicious.php.

const API_URI = 'https://api.del.icio.us'

Definition at line 62 of file Delicious.php.

const JSON_FANS = '/feeds/json/fans/%s'

Definition at line 81 of file Delicious.php.

const JSON_NETWORK = '/feeds/json/network/%s'

Definition at line 80 of file Delicious.php.

const JSON_POSTS = '/feeds/json/%s/%s'

Definition at line 78 of file Delicious.php.

const JSON_TAGS = '/feeds/json/tags/%s'

Definition at line 79 of file Delicious.php.

const JSON_URI = 'http://del.icio.us'

Definition at line 77 of file Delicious.php.

const JSON_URL = '/feeds/json/url/data'

Definition at line 82 of file Delicious.php.

const PATH_BUNDLE_ADD = '/v1/tags/bundles/set'

Definition at line 69 of file Delicious.php.

const PATH_BUNDLE_DELETE = '/v1/tags/bundles/delete'

Definition at line 68 of file Delicious.php.

const PATH_BUNDLES = '/v1/tags/bundles/all'

Definition at line 67 of file Delicious.php.

const PATH_DATES = '/v1/posts/dates'

Definition at line 70 of file Delicious.php.

const PATH_POST_DELETE = '/v1/posts/delete'

Definition at line 71 of file Delicious.php.

const PATH_POSTS_ADD = '/v1/posts/add'

Definition at line 74 of file Delicious.php.

const PATH_POSTS_ALL = '/v1/posts/all'

Definition at line 73 of file Delicious.php.

const PATH_POSTS_GET = '/v1/posts/get'

Definition at line 72 of file Delicious.php.

const PATH_POSTS_RECENT = '/v1/posts/recent'

Definition at line 75 of file Delicious.php.

const PATH_TAG_RENAME = '/v1/tags/rename'

Definition at line 66 of file Delicious.php.

const PATH_TAGS = '/v1/tags/get'

Definition at line 65 of file Delicious.php.

const PATH_UPDATE = '/v1/posts/update'

Definition at line 64 of file Delicious.php.


The documentation for this class was generated from the following file:
 All Data Structures Namespaces Files Functions Variables Enumerations