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_Delicious is a concrete implementation of the del.icio.us web service
API_URI = 'https://api.del.icio.us'
PATH_UPDATE = '/v1/posts/update'
PATH_TAGS = '/v1/tags/get'
PATH_TAG_RENAME = '/v1/tags/rename'
PATH_BUNDLES = '/v1/tags/bundles/all'
PATH_BUNDLE_DELETE = '/v1/tags/bundles/delete'
PATH_BUNDLE_ADD = '/v1/tags/bundles/set'
PATH_DATES = '/v1/posts/dates'
PATH_POST_DELETE = '/v1/posts/delete'
PATH_POSTS_GET = '/v1/posts/get'
PATH_POSTS_ALL = '/v1/posts/all'
PATH_POSTS_ADD = '/v1/posts/add'
PATH_POSTS_RECENT = '/v1/posts/recent'
JSON_URI = 'http://del.icio.us'
JSON_POSTS = '/feeds/json/%s/%s'
JSON_TAGS = '/feeds/json/tags/%s'
JSON_NETWORK = '/feeds/json/network/%s'
JSON_FANS = '/feeds/json/fans/%s'
JSON_URL = '/feeds/json/url/data'
string $_authPass = ''
Password
string $_authUname = ''
Username
float $_lastRequestTime = '0'
Microtime of last request
Zend_Service_Rest $_rest = ''
Zend_Service_Rest instance
__construct(
string $uname
=
null, string $pass
=
null
)
:
void
Constructs a new del.icio.us Web Services Client
_evalXmlResult(
DOMDocument $response
)
:
void
Evaluates XML response
_parseXmlPostList(
DOMDocument $response
)
:
Zend_Service_Delicious_PostList
Constructs Zend_Service_Delicious_PostList from XML response
_xmlResponseToArray(
DOMDocument $response, string $root, string $child, string $attKey, string $attValue
)
:
array
Transform XML string to array
addBundle(
string $bundle, array $tags
)
:
Zend_Service_Delicious
Adds a new bundle
createNewPost(
$title, $url
)
:
Zend_Service_Delicious_Post
Create new post
deleteBundle(
string $bundle
)
:
Zend_Service_Delicious
Delete a bundle
deletePost(
string $url
)
:
Zend_Service_Delicious
Delete a post
getAllPosts(
string $tag
=
null
)
:
Zend_Service_Delicious_PostList
Get all posts
getBundles(
)
:
array
Get all bundles, returning an array with bundles as keys and array of tags as values
getDates(
string $tag
=
null
)
:
array
Get number of posts by date
Returns array where keys are dates and values are numbers of posts
getLastUpdate(
)
:
Zend_Date
Get time of the last update
getPosts(
string $tag
=
null, Zend_Date $dt
=
null, string $url
=
null
)
:
Zend_Service_Delicious_PostList
Get posts matching the arguments
If no date or url is given, most recent date will be used
getRecentPosts(
string $tag
=
null, string $count
=
15
)
:
Zend_Service_Delicious_PostList
Get recent posts
getTags(
)
:
array
Get all tags, returning an array with tags as keys and number of corresponding posts as values
getUrlDetails(
string $url
)
:
array
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.
getUserFans(
string $user
)
:
array
Get fans of a user
getUserNetwork(
string $user
)
:
array
Get network of a user
getUserPosts(
string $user, int $count
=
null, string $tag
=
null
)
:
Zend_Service_Delicious_PostList
Get posts of a user
getUserTags(
string $user, int $atleast
=
null, int $count
=
null, string $sort
=
alpha
)
:
array
Get tags of a user
Returned array has tags as keys and number of posts as values
makeRequest(
string $path, array $parms
=
array, string $type
=
xml
)
:
mixed
Handles all GET requests to a web service
renameTag(
string $old, string $new
)
:
Zend_Service_Delicious
Rename a tag
setAuth(
string $uname, string $pass
)
:
Zend_Service_Delicious
Set client username and password