shorturl
shorturl.cr 
A simple library to use URL shortening services. Inspired by Robby Russell's shorturl.
Installation
As a dependency in shards.yml
:
dependencies:
shorturl:
github: veelenga/shorturl.cr
branch: master
Usage
As easy as it could be:
require "shorturl"
# shorten
ShortURL.shorten "http://google.com" # => "http://tinyurl.com/2tx"
ShortURL.shorten "http://google.com", :tinyurl # => "http://tinyurl.com/2tx"
ShortURL.shorten "http://google.com", :isgd # => "http://is.gd/OwycZW"
# expand
ShortURL.expand "http://tinyurl.com/2tx" # => "http://google.com"
Available services
Here is a list of available shortening services in shorturl.cr:
Contributing
- Fork it
- Create your feature branch
- Implement your feature
- Run tests with
crystal spec
- Commit your changes
- Push to the branch
- Create a new Pull Request