Sha256: 2e64412cdfc1e8375e99aa7b2a14c2ea58ade8991e5f30eaee78a9b4d67ea649
Contents?: true
Size: 762 Bytes
Versions: 2
Compression:
Stored size: 762 Bytes
Contents
module Play module Tmdb class Movie def self.new(raw_data, fetch_all_data = false, language = nil) # expand the result by calling Movie.getInfo unless :expand_results is false or the data is already complete # (as determined by checking for the trailer property in the raw data) if (fetch_all_data) #Call getInfo end DeepOpenStruct.load(raw_data) end def self.search(params={}) if !params[:query] or params[:query].empty? raise ArgumentError.new("query param is required") end body = Play::Tmdb::Base.api_call("search/movie", params) results = body.results.map do |r| new(r) end results end end end end
Version data entries
2 entries across 2 versions & 1 rubygems
Version | Path |
---|---|
play-tmdb-0.0.2 | lib/play-tmdb/movie.rb |
play-tmdb-0.0.1 | lib/play-tmdb/movie.rb |