|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES All Classes | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectdel.icio.us.Delicious
Delicious is a class for accessing the del.icio.us API.
Constructor Summary | |
Delicious(java.lang.String username,
java.lang.String password)
Create an object to interact with del.icio.us. |
|
Delicious(java.lang.String username,
java.lang.String password,
java.lang.String apiEndpoint)
Create an object to interact with del.icio.us |
|
Delicious(java.lang.String username,
java.lang.String password,
java.lang.String apiEndpoint,
java.lang.String proxyHost,
int proxyPort)
Create an object to interact with del.icio.us |
Method Summary | |
boolean |
addBundle(java.lang.String bundleName,
java.lang.String tags)
Add a new tag bundle. |
boolean |
addPost(java.lang.String url,
java.lang.String description)
Make a post to del.icio.us |
boolean |
addPost(java.lang.String url,
java.lang.String description,
java.lang.String extended,
java.lang.String tags,
java.util.Date date)
Make a post to del.icio.us |
boolean |
addPost(java.lang.String url,
java.lang.String description,
java.lang.String extended,
java.lang.String tags,
java.util.Date date,
boolean replace,
boolean shared)
Make a post to del.icio.us. |
protected void |
checkNotAuthorized(int result)
Check to see if the user is not authorized. |
protected void |
clearResultMetaInformation()
Clear the result meta information by setting the object to null . |
boolean |
deleteBundle(java.lang.String bundleName)
Delete a bundle of the given name |
boolean |
deletePost(java.lang.String url)
Deletes a post |
java.util.List |
getAllPosts()
Return a list of all Post objects. |
java.util.List |
getAllPosts(java.lang.String filterTag)
Return a list of all Post objects. |
java.util.List |
getBundles()
Return a list of Bundle objects |
java.util.List |
getDatesWithInboxEntries()
Return a list of DeliciousDate objects containing inbox entries |
java.util.List |
getDatesWithPost()
Return list of DeliciousDate objects |
java.util.List |
getDatesWithPost(java.lang.String tag)
Return list of DeliciousDate objects |
int |
getHttpResult()
Return the HTTP status code of the last operation |
java.util.List |
getInboxEntries(java.util.Date date)
Return a list of Post items in your inbox |
java.util.Date |
getLastUpdate()
Get the time of the last update |
java.util.List |
getPostForURL(java.lang.String url)
Return a list of Post objects for a given URL |
java.util.List |
getPosts()
Return a list of Post objects |
java.util.List |
getPosts(java.lang.String filterTag,
java.util.Date date,
java.lang.String url)
Return a list of Post objects |
java.util.List |
getPostsForDate(java.lang.String filterTag,
java.util.Date date)
Return a list of Post objects |
java.util.List |
getPostsForTag(java.lang.String tag)
Return a list of Post objects for a given tag |
java.util.List |
getPostsForTags(java.lang.String[] tags)
Return a list of Post objects for a given set of tags. |
java.util.List |
getRecentPosts()
Return a list of recent Post objects; uses default number of items to retrieve DeliciousConstants.DEFAULT_POST_COUNT |
java.util.List |
getRecentPosts(java.lang.String filterTag)
Return a list of Post objects |
java.util.List |
getRecentPosts(java.lang.String filterTag,
int count)
Return a list of Post objects |
java.lang.Object |
getResultMetaInformation()
Retrieve an object containing meta information about the last call. |
java.util.List |
getSubscriptions()
Return a list of Subscription objects |
java.util.List |
getTags()
Return a list of Tag objects |
boolean |
renameTag(java.lang.String oldTag,
java.lang.String newTag)
Renames a tag |
void |
setApiEndpoint(java.lang.String apiEndpoint)
Set a new API endpoint which may be different from the default DeliciousConstants.API_ENDPOINT |
void |
setProxyAuthenticationConfiguration(java.lang.String proxyUsername,
java.lang.String proxyPassword)
Sets proxy authentication information. |
void |
setProxyConfiguration(java.lang.String proxyHost,
int proxyPort)
Sets proxy configuration information. |
boolean |
subs(java.lang.String user,
java.lang.String tag,
boolean unsubscribe)
Add or remove a subscription |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
public Delicious(java.lang.String username, java.lang.String password)
username
- del.icio.us usernamepassword
- del.icio.us passwordpublic Delicious(java.lang.String username, java.lang.String password, java.lang.String apiEndpoint)
username
- del.icio.us usernamepassword
- del.icio.us passwordapiEndpoint
- del.icio.us API endpointpublic Delicious(java.lang.String username, java.lang.String password, java.lang.String apiEndpoint, java.lang.String proxyHost, int proxyPort)
username
- del.icio.us usernamepassword
- del.icio.us passwordapiEndpoint
- del.icio.us API endpointproxyHost
- Proxy hostproxyPort
- Proxy portMethod Detail |
public void setProxyConfiguration(java.lang.String proxyHost, int proxyPort)
proxyHost
- Proxy hostproxyPort
- Proxy portpublic void setProxyAuthenticationConfiguration(java.lang.String proxyUsername, java.lang.String proxyPassword)
proxyUsername
- Username to access proxyproxyPassword
- Password to access proxypublic void setApiEndpoint(java.lang.String apiEndpoint)
DeliciousConstants.API_ENDPOINT
apiEndpoint
- New API endpointpublic int getHttpResult()
public java.util.List getDatesWithPost(java.lang.String tag)
DeliciousDate
objects
tag
- Filter by this tag (optional)
DeliciousDate
objectspublic java.util.List getDatesWithPost()
DeliciousDate
objects
DeliciousDate
objectspublic java.util.List getTags()
Tag
objects
Tag
objectspublic java.util.List getPosts(java.lang.String filterTag, java.util.Date date, java.lang.String url)
Post
objects
filterTag
- filter by this tag (optional)date
- Filter by this dateurl
- URL of post to retrieve (if present, only retrieves a single Post
object
Post
objectspublic java.util.List getPostsForDate(java.lang.String filterTag, java.util.Date date)
Post
objects
filterTag
- filter by this tag (optional)date
- Filter by this date
Post
objectspublic java.util.List getPosts()
Post
objects
Post
objectspublic java.util.List getPostForURL(java.lang.String url)
Post
objects for a given URL
url
- Filter by this URL
Post
objects for a given URLpublic java.util.List getPostsForTag(java.lang.String tag)
Post
objects for a given tag
tag
- Filter by this tag
Post
objects for a given tagpublic java.util.List getPostsForTags(java.lang.String[] tags)
Post
objects for a given set of tags. Calls getPostsForTag(String)
for each tag.
tags
- Filter by these tags
Post
objects for the given set of tagspublic java.util.List getRecentPosts(java.lang.String filterTag, int count)
Post
objects
filterTag
- filter by this tag (optional)count
- Must be > 0 and < 100
Post
objectspublic java.util.List getRecentPosts(java.lang.String filterTag)
Post
objects
filterTag
- filter by this tag (optional)
Post
objectspublic java.util.List getRecentPosts()
Post
objects; uses default number of items to retrieve DeliciousConstants.DEFAULT_POST_COUNT
Post
objectspublic java.util.List getAllPosts(java.lang.String filterTag)
Post
objects. This method populates the result meta information
field with a Date
object containing the last update time.
filterTag
- Filter by this tag
Post
objectspublic java.util.List getAllPosts()
Post
objects. This method populates the result meta information
field with a Date
object containing the last update time.
Post
objectspublic boolean addPost(java.lang.String url, java.lang.String description, java.lang.String extended, java.lang.String tags, java.util.Date date, boolean replace, boolean shared)
url
or description
parameters are null or
blank, this method immediately returns false
.
url
- URL for postdescription
- Description for postextended
- Extended for posttags
- Space-delimited list of tagsdate
- Date for postreplace
- true
if call should replace postshared
- Make the item private
true
if posted, false
otherwisepublic boolean addPost(java.lang.String url, java.lang.String description, java.lang.String extended, java.lang.String tags, java.util.Date date)
url
- URL for postdescription
- Description for postextended
- Extended for posttags
- Space-delimited list of tagsdate
- Date for post
true
if posted, false
otherwisepublic boolean addPost(java.lang.String url, java.lang.String description)
url
- URL for postdescription
- Description for post
true
if posted, false
otherwisepublic boolean deletePost(java.lang.String url)
url
- URL for post
true
if post deleted, false
otherwisepublic boolean renameTag(java.lang.String oldTag, java.lang.String newTag)
oldTag
- Old tagnewTag
- New tag
true
if tag renamed, false
otherwisepublic java.util.List getInboxEntries(java.util.Date date)
Post
items in your inbox
date
- Filter by this date
Post
items in your inboxpublic java.util.List getDatesWithInboxEntries()
DeliciousDate
objects containing inbox entries
DeliciousDate
objects containing inbox entriespublic java.util.List getSubscriptions()
Subscription
objects
Subscription
objectspublic java.util.List getBundles()
Bundle
objects
Bundle
objectspublic boolean addBundle(java.lang.String bundleName, java.lang.String tags)
false
is returned immediately
bundleName
- Bundle nametags
- Space-separated list of tags
true
if the bundle was created, false
otherwisepublic boolean deleteBundle(java.lang.String bundleName)
bundleName
- Bundle to delete
true
if the bundle was deleted, false otherwisepublic boolean subs(java.lang.String user, java.lang.String tag, boolean unsubscribe)
user
- Usernametag
- Optional, set to null
for all postsunsubscribe
- If you want to unsubscribe
true
if add/remove subscription successful, false
otherwisepublic java.util.Date getLastUpdate()
Date
object of last update time or null
if there was an error in the callprotected void checkNotAuthorized(int result)
DeliciousNotAuthorizedException
is thrown
result
- Result code from executing HTTP methodprotected void clearResultMetaInformation()
null
.
public java.lang.Object getResultMetaInformation()
getAllPosts()
method.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES All Classes | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |