Zend Framework
1.12
|
Public Member Functions | |
__construct ($uname=null, $pass=null) | |
Constructs a new del.icio.us Web Services Client. | |
setAuth ($uname, $pass) | |
Set client username and password. | |
getLastUpdate () | |
Get time of the last update. | |
getTags () | |
Get all tags, returning an array with tags as keys and number of corresponding posts as values. | |
renameTag ($old, $new) | |
Rename a tag. | |
getBundles () | |
Get all bundles, returning an array with bundles as keys and array of tags as values. | |
addBundle ($bundle, array $tags) | |
Adds a new bundle. | |
deleteBundle ($bundle) | |
Delete a bundle. | |
deletePost ($url) | |
Delete a post. | |
getDates ($tag=null) | |
Get number of posts by date. | |
getPosts ($tag=null, Zend_Date $dt=null, $url=null) | |
Get posts matching the arguments. | |
getAllPosts ($tag=null) | |
Get all posts. | |
getRecentPosts ($tag=null, $count=15) | |
Get recent posts. | |
createNewPost ($title, $url) | |
Create new post. | |
getUserPosts ($user, $count=null, $tag=null) | |
Get posts of a user. | |
getUserTags ($user, $atleast=null, $count=null, $sort= 'alpha') | |
Get tags of a user. | |
getUserNetwork ($user) | |
Get network of a user. | |
getUserFans ($user) | |
Get fans of a user. | |
getUrlDetails ($url) | |
Get details on a particular bookmarked URL. | |
makeRequest ($path, array $parms=array(), $type= 'xml') | |
Handles all GET requests to a web service. | |
Public Attributes | |
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 |
__construct | ( | $uname = null , |
|
$pass = null |
|||
) |
Constructs a new del.icio.us Web Services Client.
string | $uname | Client username |
string | $pass | Client password |
addBundle | ( | $bundle, | |
array | $tags | ||
) |
Adds a new bundle.
string | $bundle | Name of new bundle |
array | $tags | Array of tags |
createNewPost | ( | $title, | |
$url | |||
) |
Create new post.
deleteBundle | ( | $bundle | ) |
Delete a bundle.
string | $bundle | Name of bundle to be deleted |
deletePost | ( | $url | ) |
Delete a post.
string | $url | URL of post to be deleted |
getAllPosts | ( | $tag = null | ) |
Get all posts.
string | $tag | Optional filtering by tag |
getBundles | ( | ) |
Get all bundles, returning an array with bundles as keys and array of tags as values.
getDates | ( | $tag = null | ) |
Get number of posts by date.
Returns array where keys are dates and values are numbers of posts
string | $tag | Optional filtering by tag |
getLastUpdate | ( | ) |
Get time of the last update.
Zend_Service_Delicious_Exception |
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
string | $tag | Optional filtering by tag |
Zend_Date | $dt | Optional filtering by date |
string | $url | Optional filtering by url |
Zend_Service_Delicious_Exception |
getRecentPosts | ( | $tag = null , |
|
$count = 15 |
|||
) |
Get recent posts.
string | $tag | Optional filtering by tag |
string | $count | Maximum number of posts to be returned (default 15) |
getTags | ( | ) |
Get all tags, returning an array with tags as keys and number of corresponding posts as values.
getUrlDetails | ( | $url | ) |
Get details on a particular bookmarked URL.
Returned array contains four elements:
If URL hasen't been bookmarked null is returned.
string | $url | URL for which to get details |
getUserFans | ( | $user | ) |
Get fans of a user.
string | $user | Owner of the fans |
getUserNetwork | ( | $user | ) |
Get network of a user.
string | $user | Owner of the network |
getUserPosts | ( | $user, | |
$count = null , |
|||
$tag = null |
|||
) |
Get posts of a user.
string | $user | Owner of the posts |
int | $count | Number of posts (default 15, max. 100) |
string | $tag | Optional filtering by tag |
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
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 | ( | $path, | |
array | $parms = array() , |
||
$type = 'xml' |
|||
) |
Handles all GET requests to a web service.
string | $path | Path |
array | $parms | Array of GET parameters |
string | $type | Type of a request ("xml"|"json") |
Zend_Service_Delicious_Exception |
renameTag | ( | $old, | |
$new | |||
) |
Rename a tag.
string | $old | Old tag name |
string | $new | New tag name |
setAuth | ( | $uname, | |
$pass | |||
) |
Set client username and password.
string | $uname | Client user name |
string | $pass | Client password |
|
protected |
|
protected |
|
staticprotected |
|
protected |
const API_URI = 'https://api.del.icio.us' |
const JSON_FANS = '/feeds/json/fans/%s' |
const JSON_NETWORK = '/feeds/json/network/%s' |
const JSON_POSTS = '/feeds/json/%s/%s' |
const JSON_TAGS = '/feeds/json/tags/%s' |
const JSON_URI = 'http://del.icio.us' |
const JSON_URL = '/feeds/json/url/data' |
const PATH_BUNDLE_ADD = '/v1/tags/bundles/set' |
const PATH_BUNDLE_DELETE = '/v1/tags/bundles/delete' |
const PATH_BUNDLES = '/v1/tags/bundles/all' |
const PATH_DATES = '/v1/posts/dates' |
const PATH_POST_DELETE = '/v1/posts/delete' |
const PATH_POSTS_ADD = '/v1/posts/add' |
const PATH_POSTS_ALL = '/v1/posts/all' |
const PATH_POSTS_GET = '/v1/posts/get' |
const PATH_POSTS_RECENT = '/v1/posts/recent' |
const PATH_TAG_RENAME = '/v1/tags/rename' |
const PATH_TAGS = '/v1/tags/get' |
const PATH_UPDATE = '/v1/posts/update' |