Service/Delicious.php
- Category
- Zend
- Copyright
- Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com)
- License
- New BSD License
- Package
- Zend_Service
- Subpackage
- Delicious
- Version
- $Id$
\Zend_Service_Delicious
- Category
- Zend
- Copyright
- Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com)
- License
- New BSD License
Constants
Properties
Methods
__construct(string $uname = null, string $pass = null) : void
Constructs a new del.icio.us Web Services Client
Name | Type | Description |
---|---|---|
$uname | string | Client username |
$pass | string | Client password |
_evalXmlResult(\DOMDocument $response) : void
Evaluates XML response
Name | Type | Description |
---|---|---|
$response | \DOMDocument |
Exception | Description |
---|---|
\Zend_Service_Delicious_Exception |
_parseXmlPostList(\DOMDocument $response) : \Zend_Service_Delicious_PostList
Constructs Zend_Service_Delicious_PostList from XML response
Name | Type | Description |
---|---|---|
$response | \DOMDocument |
Type | Description |
---|---|
\Zend_Service_Delicious_PostList |
Exception | Description |
---|---|
\Zend_Service_Delicious_Exception |
_xmlResponseToArray(\DOMDocument $response, string $root, string $child, string $attKey, string $attValue) : array
Transform XML string to array
Name | Type | Description |
---|---|---|
$response | \DOMDocument | |
$root | string | Name of root tag |
$child | string | Name of children tags |
$attKey | string | Attribute of child tag to be used as a key |
$attValue | string | Attribute of child tag to be used as a value |
Type | Description |
---|---|
array |
Exception | Description |
---|---|
\Zend_Service_Delicious_Exception |
addBundle(string $bundle, array $tags) : \Zend_Service_Delicious
Adds a new bundle
Name | Type | Description |
---|---|---|
$bundle | string | Name of new bundle |
$tags | array | Array of tags |
Type | Description |
---|---|
\Zend_Service_Delicious | Provides a fluent interface |
createNewPost( $title, $url) : \Zend_Service_Delicious_Post
Create new post
Name | Type | Description |
---|---|---|
$title | ||
$url |
Type | Description |
---|---|
\Zend_Service_Delicious_Post |
deleteBundle(string $bundle) : \Zend_Service_Delicious
Delete a bundle
Name | Type | Description |
---|---|---|
$bundle | string | Name of bundle to be deleted |
Type | Description |
---|---|
\Zend_Service_Delicious | Provides a fluent interface |
deletePost(string $url) : \Zend_Service_Delicious
Delete a post
Name | Type | Description |
---|---|---|
$url | string | URL of post to be deleted |
Type | Description |
---|---|
\Zend_Service_Delicious | Provides a fluent interface |
getAllPosts(string $tag = null) : \Zend_Service_Delicious_PostList
Get all posts
Name | Type | Description |
---|---|---|
$tag | string | Optional filtering by tag |
Type | Description |
---|---|
\Zend_Service_Delicious_PostList |
getBundles() : array
Get all bundles, returning an array with bundles as keys and array of tags as values
Type | Description |
---|---|
array | list of bundles |
getDates(string $tag = null) : array
Get number of posts by date
Name | Type | Description |
---|---|---|
$tag | string | Optional filtering by tag |
Type | Description |
---|---|
array | list of dates |
getLastUpdate() : \Zend_Date
Get time of the last update
Type | Description |
---|---|
\Zend_Date |
Exception | Description |
---|---|
\Zend_Service_Delicious_Exception |
getPosts(string $tag = null, \Zend_Date $dt = null, string $url = null) : \Zend_Service_Delicious_PostList
Get posts matching the arguments
Name | Type | Description |
---|---|---|
$tag | string | Optional filtering by tag |
$dt | \Zend_Date | Optional filtering by date |
$url | string | Optional filtering by url |
Type | Description |
---|---|
\Zend_Service_Delicious_PostList |
Exception | Description |
---|---|
\Zend_Service_Delicious_Exception |
getRecentPosts(string $tag = null, string $count = 15) : \Zend_Service_Delicious_PostList
Get recent posts
Name | Type | Description |
---|---|---|
$tag | string | Optional filtering by tag |
$count | string | Maximum number of posts to be returned (default 15) |
Type | Description |
---|---|
\Zend_Service_Delicious_PostList |
getTags() : array
Get all tags, returning an array with tags as keys and number of corresponding posts as values
Type | Description |
---|---|
array | list of tags |
getUrlDetails(string $url) : array
Get details on a particular bookmarked URL
Name | Type | Description |
---|---|---|
$url | string | URL for which to get details |
Type | Description |
---|---|
array |
getUserFans(string $user) : array
Get fans of a user
Name | Type | Description |
---|---|---|
$user | string | Owner of the fans |
Type | Description |
---|---|
array |
getUserNetwork(string $user) : array
Get network of a user
Name | Type | Description |
---|---|---|
$user | string | Owner of the network |
Type | Description |
---|---|
array |
getUserPosts(string $user, int $count = null, string $tag = null) : \Zend_Service_Delicious_PostList
Get posts of a user
Name | Type | Description |
---|---|---|
$user | string | Owner of the posts |
$count | int | Number of posts (default 15, max. 100) |
$tag | string | Optional filtering by tag |
Type | Description |
---|---|
\Zend_Service_Delicious_PostList |
getUserTags(string $user, int $atleast = null, int $count = null, string $sort = 'alpha') : array
Get tags of a user
Name | Type | Description |
---|---|---|
$user | string | Owner of the posts |
$atleast | int | Include only tags for which there are at least ### number of posts |
$count | int | Number of tags to get (default all) |
$sort | string | Order of returned tags ('alpha' || 'count') |
Type | Description |
---|---|
array |
makeRequest(string $path, array $parms = array(), string $type = 'xml') : mixed
Handles all GET requests to a web service
Name | Type | Description |
---|---|---|
$path | string | Path |
$parms | array | Array of GET parameters |
$type | string | Type of a request ("xml"|"json") |
Type | Description |
---|---|
mixed | decoded response from web service |
Exception | Description |
---|---|
\Zend_Service_Delicious_Exception |
renameTag(string $old, string $new) : \Zend_Service_Delicious
Rename a tag
Name | Type | Description |
---|---|---|
$old | string | Old tag name |
$new | string | New tag name |
Type | Description |
---|---|
\Zend_Service_Delicious | Provides a fluent interface |
setAuth(string $uname, string $pass) : \Zend_Service_Delicious
Set client username and password
Name | Type | Description |
---|---|---|
$uname | string | Client user name |
$pass | string | Client password |
Type | Description |
---|---|
\Zend_Service_Delicious | Provides a fluent interface |