Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP

Home

sharma-gaurav edited this page · 5 revisions
Clone this wiki locally

This plugin provide ability to add, update and delete post on delicious.com using Del.icio.us API.


The information is sent to the plugin in the form of the DeliciousPost object:

DeliciousPost post = new DeliciousPost(url: it, description: "Testing plugin", notes: "Testing plugin", deliciousConnection: connection)

It has following fields:

  • url : The url which has to be added
  • description : It is the description/ heading provided for the link
  • notes : It refers to the notes that provided along with the link on Delicious.
  • deliciousConnection : It refers to the Delicious object that you have to create by providing the delicious Credentials to the application.

To get Delicious object you just have to call one of the following function of deliciousService :

  Delicious deliciousConnection
  deliciousConnection = deliciousService(username, password)
            /*OR*/
  deliciousConnection = deliciousService(apiEndPoint, username, password)
            /*OR*/
  deliciousConnection = deliciousService(username, password, apiEndPoint, proxyHost, proxyPort)

Add Post:

To add a post create an object of DeliciousPost class which exist in the plugin and pass this object to the addPosts function in the deliciousService.

def deliciousService

def addPost = {
    Delicious connection = deliciousService.getDeliciousConnection(userName, password)
    ["http://grails.org", "http://testLink.org", "http://google.com"].each {
        DeliciousPost post = new DeliciousPost(url: it, description: "Testing plugin", notes: "Testing plugin",
                deliciousConnection: connection)
        deliciousService.addPost(post)
    }
    render "postAdded"
}

Update post:

To update a post create an object of DeliciousPost for the URL whose information you want to update information you want to update. Pass this object to the updatePost function in the deliciousService.

 def updatePost = {
     Delicious connection = deliciousService.getDeliciousConnection(userName, password)
     DeliciousPost post = new DeliciousPost(url: "http://grails.org", description: "Grails Web Page", notes: "Grails.org",
             deliciousConnection: connection)
     render "postUpdated"
 }

Delete post:

To delete a post create an object of DeliciousPost with only the URL of the post which you want to update information you want to update. Pass this object to the deletePost function in the deliciousService.

 def deletePost = {
     Delicious connection = deliciousService.getDeliciousConnection(userName, password)
     DeliciousPost post = new DeliciousPost(url: "http://google.com", deliciousConnection: connection)
     render "postDeleted"
 }

All the above function will return a DeliciousResponse class object having following attributes :

  • entity : The DeliciousPost object you added
  • status : true/false (It is true for successful addition and false for failing to add post)
Something went wrong with that request. Please try again.