class GetFilmInfoFullHandler
Constants
- REQUEST_ATTRIBUTES
- RESPONSE_KEYS
Attributes
attributes[R]
movie_id[R]
Public Class Methods
new(**attributes)
click to toggle source
# File lib/filmweb_api/method_handlers/get_film_info_full_handler.rb, line 35 def initialize(**attributes) @attributes = attributes @movie_id = attributes[:movie_id] end
Public Instance Methods
call()
click to toggle source
# File lib/filmweb_api/method_handlers/get_film_info_full_handler.rb, line 40 def call raise ArgumentError.new("You need to pass all required attributes for that method") unless all_required_attributes? Hash[RESPONSE_KEYS.zip(filmweb_response)] end
Private Instance Methods
all_required_attributes?()
click to toggle source
# File lib/filmweb_api/method_handlers/get_film_info_full_handler.rb, line 47 def all_required_attributes? REQUEST_ATTRIBUTES.all? { |sym| attributes.key?(sym) } end
filmweb_response()
click to toggle source
# File lib/filmweb_api/method_handlers/get_film_info_full_handler.rb, line 51 def filmweb_response @filmweb_response ||= MakeFilmwebRequest.new(method: "getFilmInfoFull", movie_id: movie_id).call end