lib/upcoming/providers/netflix/client.rb
# Requests and returns a list of upcoming titles.
#
# @return [Array<Movie, Show>] list of upcoming movies and shows.
Requests and returns a list of upcoming titles.
Requests and returns a list of upcoming titles .
def upcoming
        response = get '/gateway/v1/en/titles/upcoming'
        case response.status
        when 200
          json_data = MultiJson.load response.body.to_s
          result_total_items = json_data.dig 'meta', 'result', 'totalItems'
          if result_total_items
            json_data['items'].map do |item|
              klass = get_type_for_item item
              klass.from_json item
            end
          end
        end
      end
def upcoming response = get '/gateway/v1/en/titles/upcoming' case response . status when 200 json_data = MultiJson . load response . body . to_s result_total_items = json_data . dig 'meta' , 'result' , 'totalItems' if result_total_items json_data [ 'items' ] . map do | item | klass = get_type_for_item item klass . from_json item end end end end
Requests and returns a list of upcoming titles.
Requests and returns a list of upcoming titles .
list of upcoming movies and shows.
list of upcoming movies and shows .
Array<Movie, Show>