Sha256: a1e2b8cfe9fa0a9d3aca2b6d06205633e26216261fee65dda25dd00dd5b6d331

Contents?: true

Size: 1.48 KB

Versions: 3

Compression:

Stored size: 1.48 KB

Contents

[![Code Climate](https://codeclimate.com/repos/53d81d1de30ba01f16012d2a/badges/5a6842ba6fe26d49d83b/gpa.png)](https://codeclimate.com/repos/53d81d1de30ba01f16012d2a/feed)
[![Test Coverage](https://codeclimate.com/repos/53d81d1de30ba01f16012d2a/badges/5a6842ba6fe26d49d83b/coverage.png)](https://codeclimate.com/repos/53d81d1de30ba01f16012d2a/feed)

# Strutta::Api

Official wrapper for the Strutta API

## Installation

Add this line to your application's Gemfile:

    gem 'strutta-api'

And then execute:

    $ bundle

Or install it yourself as:

    $ gem install strutta-api

## Usage

This Gem is designed to have is calls resemble actual API URIs.

For example, if we want to get Rounds in Game 333, we would GET the following URI:

```
http://api.strutta.com/v2/games/333/rounds
```

The Gem copies this pattern:

```
# Initialize
strutta = Strutta::API.new 'mystruttatoken'

# Get Rounds in Game 333
strutta.games(333).rounds.get
```

There are detailed examples for each endpoint found in the Strutta API docs.

## Errors

This Gem Raises exceptions whenever anything other than a `200`, `201` or `204` is returned.
The errors are defined in lib/strutta/api/errors and generated Strutta::Api#error_map.

## Contributing

1. Fork it ( http://github.com/<my-github-username>/strutta-api/fork )
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

3 entries across 3 versions & 1 rubygems

Version Path
strutta-api-1.0.3.1 README.md
strutta-api-1.0.2 README.md
strutta-api-1.0.1 README.md