lib/ruby-tmdb3/tmdb.rb in ruby-tmdb3-0.3.1 vs lib/ruby-tmdb3/tmdb.rb in ruby-tmdb3-0.3.2

- old
+ new

@@ -40,10 +40,10 @@ def self.base_api_url "http://api.themoviedb.org/3" end - def self.api_call(method, data, language = @@default_language) + def self.api_call(method, data, language = nil) raise ArgumentError, "Tmdb.api_key must be set before using the API" if(Tmdb.api_key.nil? || Tmdb.api_key.empty?) raise ArgumentError, "Invalid data." if(data.nil? || (data.class != Hash)) method, action = method.split '/'