Class: FanartApi::Movie
Overview
documentation: fanart.tv/api-docs/movie-api
Instance Method Summary collapse
- #find(id, type = 'all', sort = '1', limit = '2') ⇒ Object
- #update(timestamp = (Time.now - 172800).to_i) ⇒ Object
Methods inherited from Base
#get, #initialize, #params, #prepare_uri, #response, #restful_param_keys, #shared_uri, #uri
Constructor Details
This class inherits a constructor from FanartApi::Base
Instance Method Details
#find(id, type = 'all', sort = '1', limit = '2') ⇒ Object
3 4 5 |
# File 'lib/fanart_api/movie.rb', line 3 def find(id, type = 'all', sort = '1', limit = '2') get("movies/#{shared_uri}").params(id: id, type: type, sort: sort, limit: limit).response end |
#update(timestamp = (Time.now - 172800).to_i) ⇒ Object
7 8 9 |
# File 'lib/fanart_api/movie.rb', line 7 def update( = (Time.now - 172800).to_i) get('newmovies/{api_key}/{timestamp}').params(timestamp: ).response end |