Sha256: b71ba8149cd7312bf0524ca96a5d59e649543d501f12b55f14c9f636777a8859

Contents?: true

Size: 986 Bytes

Versions: 1

Compression:

Stored size: 986 Bytes

Contents

# Dogo

A simple URL shortener service backed by Redis.

## Installation

Add this line to your application"s Gemfile:

    gem "dogo"

And then execute:

    $ bundle

Or install it yourself as:

    $ gem install dogo

## Usage

Set some options, like your API key and the host that will be used to compose the url.

``` ruby
Dogo.api_key = "abc"
Dogo.default_url = "http://hellobits.com"
Dogo.host = "http://fnando.me"
```

You can create shortened urls by using `Dogo::Url.new`.

```ruby
shortened = Dogo::Url.new("http://hellobits.com")
shortened.id    #=> return some an integer
shortened.url   #=> return the long url
shortened.full  #=> return full shortened url
```

Starting the server:

``` ruby
require "dogo"
run Dogo::Server.new
```

## Contributing

1. Fork it
2. Create your feature branch (`git checkout -b my-new-feature`)
3. Commit your changes (`git commit -am "Add some feature"`)
4. Push to the branch (`git push origin my-new-feature`)
5. Create new Pull Request

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
dogo-0.0.1 README.md