Fest32

# Altmetric Badger

> *Badger turns data into badges!*

A small gem which can generate an Altmetric badge URI from a hash of post types and a score.

## Usage

```ruby
  AltmetricBadger.new(
    score: 123, 
    data: {
      'twitter' => 100,
      'facebook' => 100
    }
  ).to_donut_uri(svg: true)
  # => #<URI::HTTPS:0x007f8641ea75f8 URL:https://altmetric-badges.a.ssl.fastly.net/?style=donut&score=123&types=ttttffff&size=640&svg>
```

Pretty simple. Available methods are:

```
#to_donut_uri
#to_bar_uri
#to_pie_uri
#to_helix_uri
```

## Requirements

Tested with Ruby 2.1.3+ and nothing lower. Luck may vary with other versions.

## Testing

```
bundle exec rake spec
```