lib/ruby-tmdb3/tmdb_cast.rb in ruby-tmdb3-0.3.2 vs lib/ruby-tmdb3/tmdb_cast.rb in ruby-tmdb3-0.3.3

- old
+ new

@@ -8,14 +8,14 @@ raise ArgumentError, "At least one of: id, name, should be supplied" if(options[:id].nil? && options[:name].nil?) results = [] unless(options[:id].nil? || options[:id].to_s.empty?) - results << Tmdb.api_call("person", {id: options[:id].to_s}, options[:language]) + results << Tmdb.api_call("person", {:id => options[:id].to_s}, options[:language]) end unless(options[:name].nil? || options[:name].to_s.empty?) - api_return = Tmdb.api_call('search/person', {query: options[:name].to_s}, options[:language]) + api_return = Tmdb.api_call('search/person', {:query => options[:name].to_s}, options[:language]) results << api_return["results"] if api_return end results.flatten!(1) results.uniq! @@ -38,10 +38,10 @@ def self.new(raw_data, expand_results = false, language = nil) # expand the result by calling Person.getInfo unless :expand_results is set to false or the data is already complete # (as determined by checking for the 'birthday' property) if(expand_results && !raw_data.has_key?("birthday")) begin - expanded_data = Tmdb.api_call("person", {id: raw_data["id"].to_s}, language) + expanded_data = Tmdb.api_call("person", {:id => raw_data["id"].to_s}, language) rescue RuntimeError => e raise ArgumentError, "Unable to fetch expanded info for Cast ID: '#{raw_data["id"]}'" if expanded_data.nil? end raw_data = expanded_data end \ No newline at end of file