Grails Bitly Plugin

  • Tags : shorten, url, bitly
  • Latest : 0.1
  • Last Updated: 31 December 2009
  • Grails version : 1.3.7
  • Authors : Thyago Roberto
2 votes
Dependency :
compile ":bitly:0.1"

Documentation Source Issues

Summary

Plugin to shorten URLs using Bit.ly

Installation

grails install-plugin bitly

Description

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'