Class: Mediaman::Trakt::Movie
Instance Attribute Summary
Attributes inherited from Fetcher
#options, #response
Instance Method Summary
collapse
Methods inherited from Fetcher
from_hash, #initialize
Instance Method Details
#fetch! ⇒ Object
41
42
43
|
# File 'lib/mediaman/trakt.rb', line 41
def fetch!
Movie.get("http://api.trakt.tv/movie/summary.json/#{Trakt.api_key}/#{slug}")
end
|
#slug ⇒ Object
37
38
39
|
# File 'lib/mediaman/trakt.rb', line 37
def slug
options[:slug].presence || "#{options[:title].parameterize}-#{options[:year].to_s.parameterize}"
end
|