lita-googl
lita-googl is a handler for Lita that shortens URLs via URL Shortener API
Installation
Add lita-googl to your Lita instance's Gemfile:
gem "lita-googl"
Configuration
Add the configuration lines (listed below) to your application lita_config.rb
-
config.handlers.googl.api_key="YOUR_API_KEY"
- Get a Public API access key from Google Developer Console
and replace the
YOUR_API_KEY
above. - More detailed information about Google Public API key
- Get a Public API access key from Google Developer Console
and replace the
Secure it
You may "hide" your API key from the application config like this
config.handlers.googl.api_key=ENV['GOOGL_API_KEY']
and in your terminal
$ GOOGL_API_KEY=XXXXXXXX
$ export GOOGL_API_KEY
$ # Ensure it's there
$ echo $GOOGL_API_KEY
XXXXXXXX
Usage
22:55 <SecretR> ZaraRobo googl http://zaralab.org/
22:55 <ZaraRobo> SecretR http://goo.gl/x5PsTf