Build Status Dependency Status Code Climate Coverage Status

FanartApi

Ruby client for fanart.tv API

Getting started

You can add it to your Gemfile with:

gem 'fanart_api'

Run the bundle command to install it.

rails generate fanart_api:install

The generator will install an initializer where you must past your api_key.

How to use

There is one entry point, in initialize you can past hash with api_key value, or leave empty:

client = FanartApi::Client.new('API_KEY')

Usage

Movie API

client.movie.find(id, type = 'all', sort = '1', limit = '2')
client.movie.update(timestamp)

Music API

client.music.artist(id, type = 'all', sort = '1', limit = '2')
client.music.album(id, type = 'all', sort = '1', limit = '2')
client.music.label(id, type = 'all', sort = '1', limit = '2')
client.music.update(timestamp)

Tv API

client.tv.find(id, type = 'all', sort = '1', limit = '2')
client.tv.update(timestamp)

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