Grails Bitly plugin
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Failed to load latest commit information.
.settings
grails-app
scripts
target
test/unit
web-app/WEB-INF
.classpath
.project
Bitly-grailsPlugins.iml
Bitly.iml
Bitly.ipr
Bitly.iws
BitlyGrailsPlugin.groovy
README.markdown
application.properties
plugin.xml

README.markdown

Grails Bitly Plugin

You need be a registred in Bit.ly first

after registration you should get the API key here: http://bit.ly/a/your_api_key

Tags

The plugin includes two tags to make the process of shorten urls easy.

bitly:short

This tag short a url and returns the type of html tag you have chosen.

params:

    url - the url you want to shorten
    type - the return you want, can be a text, a link or a textField (optional)

usage:

    <bitly:shorten type="textField" url="www.google.com"/>

bitly:qrcode

This tag returns a qrcode image of a url.

params:

    url - the url you want to transform to qrcode

usage:

    <bitly:qrcode url="www.google.com"/>

Configuration

The plugin requires credentials to short url by your application. Please read the Authentication Credentials section on how to configure.

Authentication Credentials

The following section describes where to get each authentication values needed for this application.

Access this page: http://bit.ly/a/your_api_key

You will see your Username and API Key in the form:

bitly Username: your_username
bitly API Key:  B_nk8njkjk345by90nuiippmvddstoe6023

add these to config.groovy as

grails.plugin.bitly.username = 'Your username'
grails.plugin.bitly.key = 'Your secret'