Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/myovchev/lita-googl
Lita handler - Googl URL shortener
https://github.com/myovchev/lita-googl
Last synced: 3 days ago
JSON representation
Lita handler - Googl URL shortener
- Host: GitHub
- URL: https://github.com/myovchev/lita-googl
- Owner: myovchev
- Created: 2015-05-13T03:08:58.000Z (almost 10 years ago)
- Default Branch: master
- Last Pushed: 2015-06-08T07:22:28.000Z (over 9 years ago)
- Last Synced: 2025-01-23T21:04:15.533Z (26 days ago)
- Language: Ruby
- Size: 152 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# lita-googl
[](https://travis-ci.org/myovchev/lita-googl)
[](https://coveralls.io/r/myovchev/lita-googl?branch=master)
[](https://codeclimate.com/github/myovchev/lita-googl)
[](http://badge.fury.io/rb/lita-googl)**lita-googl** is a handler for [Lita][lita] that shortens URLs
via [URL Shortener API][googl-dev]## Installation
Add lita-googl to your Lita instance's Gemfile:
``` ruby
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][google-console]
and replace the `YOUR_API_KEY` above.
* More detailed information about [Google Public API key][google-pauth]### 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```shell
$ GOOGL_API_KEY=XXXXXXXX
$ export GOOGL_API_KEY
$ # Ensure it's there
$ echo $GOOGL_API_KEY
XXXXXXXX
```## Usage
```
22:55 ZaraRobo googl http://zaralab.org/
22:55 SecretR http://goo.gl/x5PsTf
```[lita]: http://lita.io/ "A robot companion for your company's chat room"
[googl-dev]: https://developers.google.com/url-shortener/ "The Google URL Shortener at goo.gl"
[google-pauth]: https://developers.google.com/url-shortener/v1/getting_started#APIKey
[google-console]: https://console.developers.google.com/ "Google Developer Console"