TraktApi
trakt_api is a simple ruby client for trakt.tv API.
Installation
With Bundler:
gem 'trakt_api'
$ bundle install
Otherwhise:
gem install trakt_api
How to use
You have two way for access to api:
- I case (create client class, one entry point)
Language attribute is optional with default value 'en'
client = TraktApi::Client.new(api_key: '...')
client.search # => #<TraktApi::Search>
client.show # => #<TraktApi::Show>
- II case (direct access to api class, many entry points)
Language attribute is required
ThetvdbApi::Search.new(api_key: '...').call({...})
Methods
Full documentation is available here: http://docs.trakt.apiary.io
Search methods
- call
- call_url
Show methods
- find
- find_url
- seasons
- seasons.all
- seasons.all_url
- seasons.find
- seasons.find_url
- seasons.episodes
- seasons.episodes.find
- seasons.episodes.find_url
Contributing
- Fork it
- Create your feature branch (
git checkout -b my-new-feature
) - Commit your changes (
git commit -am 'Add some feature'
) - Push to the branch (
git push origin my-new-feature
) - Create new Pull Request