Class: Kuapir::FilmsApi
- Inherits:
-
Object
- Object
- Kuapir::FilmsApi
- Defined in:
- lib/kuapir/api/films_api.rb
Instance Attribute Summary collapse
-
#api_client ⇒ Object
Returns the value of attribute api_client.
Instance Method Summary collapse
-
#api_v21_films_id_sequels_and_prequels_get(id, opts = {}) ⇒ Array<FilmSequelsAndPrequelsResponse>
получить сиквелы и приквелы для фильма по kinopoisk film id tbd.
-
#api_v21_films_id_sequels_and_prequels_get_with_http_info(id, opts = {}) ⇒ Array<(Array<FilmSequelsAndPrequelsResponse>, Integer, Hash)>
получить сиквелы и приквелы для фильма по kinopoisk film id tbd.
-
#api_v21_films_releases_get(year, month, opts = {}) ⇒ DigitalReleaseResponse
получить список цифровых релизов Данный эндпоинт возвращает список цифровых релизов.
-
#api_v21_films_releases_get_with_http_info(year, month, opts = {}) ⇒ Array<(DigitalReleaseResponse, Integer, Hash)>
получить список цифровых релизов Данный эндпоинт возвращает список цифровых релизов.
-
#api_v21_films_search_by_keyword_get(keyword, opts = {}) ⇒ FilmSearchResponse
получить список фильмов по ключевым словам Возвращает список фильмов с пагинацией.
-
#api_v21_films_search_by_keyword_get_with_http_info(keyword, opts = {}) ⇒ Array<(FilmSearchResponse, Integer, Hash)>
получить список фильмов по ключевым словам Возвращает список фильмов с пагинацией.
-
#api_v22_films_filters_get(opts = {}) ⇒ FiltersResponse
получить id стран и жанров для использования в /api/v2.2/films Возвращает список id стран и жанров, которые могут быть использованы в /api/v2.2/films.
-
#api_v22_films_filters_get_with_http_info(opts = {}) ⇒ Array<(FiltersResponse, Integer, Hash)>
получить id стран и жанров для использования в /api/v2.2/films Возвращает список id стран и жанров, которые могут быть использованы в /api/v2.2/films.
-
#api_v22_films_get(opts = {}) ⇒ FilmSearchByFiltersResponse
получить список фильмов по различным фильтрам Возвращает список фильмов с пагинацией.
-
#api_v22_films_get_with_http_info(opts = {}) ⇒ Array<(FilmSearchByFiltersResponse, Integer, Hash)>
получить список фильмов по различным фильтрам Возвращает список фильмов с пагинацией.
-
#api_v22_films_id_box_office_get(id, opts = {}) ⇒ BoxOfficeResponse
получить данные о бюджете и сборах фильма по kinopoisk film id Данный эндпоинт возвращает данные о бюджете и сборах.
-
#api_v22_films_id_box_office_get_with_http_info(id, opts = {}) ⇒ Array<(BoxOfficeResponse, Integer, Hash)>
получить данные о бюджете и сборах фильма по kinopoisk film id Данный эндпоинт возвращает данные о бюджете и сборах.
-
#api_v22_films_id_distributions_get(id, opts = {}) ⇒ DistributionResponse
получить данные о прокате фильма по kinopoisk film id Данный эндпоинт возвращает данные о прокате в разных странах.
-
#api_v22_films_id_distributions_get_with_http_info(id, opts = {}) ⇒ Array<(DistributionResponse, Integer, Hash)>
получить данные о прокате фильма по kinopoisk film id Данный эндпоинт возвращает данные о прокате в разных странах.
-
#api_v22_films_id_facts_get(id, opts = {}) ⇒ FactResponse
получить данные о фактах и ошибках в фильме по kinopoisk film id Данный эндпоинт возвращает список фактов и ошибок в фильме.
-
#api_v22_films_id_facts_get_with_http_info(id, opts = {}) ⇒ Array<(FactResponse, Integer, Hash)>
получить данные о фактах и ошибках в фильме по kinopoisk film id Данный эндпоинт возвращает список фактов и ошибок в фильме.
-
#api_v22_films_id_get(id, opts = {}) ⇒ Film
получить данные о фильме по kinopoisk id Данный эндпоинт возвращает базовые данные о фильме.
-
#api_v22_films_id_get_with_http_info(id, opts = {}) ⇒ Array<(Film, Integer, Hash)>
получить данные о фильме по kinopoisk id Данный эндпоинт возвращает базовые данные о фильме.
-
#api_v22_films_id_images_get(id, opts = {}) ⇒ ImageResponse
получить изображения(кадры, постеры, фан-арты, обои и т.д.) связанные с фильмом по kinopoisk film id Данный эндпоинт возвращает изображения связанные с фильмом с пагинацией.
-
#api_v22_films_id_images_get_with_http_info(id, opts = {}) ⇒ Array<(ImageResponse, Integer, Hash)>
получить изображения(кадры, постеры, фан-арты, обои и т.д.) связанные с фильмом по kinopoisk film id Данный эндпоинт возвращает изображения связанные с фильмом с пагинацией.
-
#api_v22_films_id_seasons_get(id, opts = {}) ⇒ SeasonResponse
получить данные о сезонах для сериала по kinopoisk film id Данный эндпоинт возвращает данные о сезонах для сериала.
-
#api_v22_films_id_seasons_get_with_http_info(id, opts = {}) ⇒ Array<(SeasonResponse, Integer, Hash)>
получить данные о сезонах для сериала по kinopoisk film id Данный эндпоинт возвращает данные о сезонах для сериала.
-
#api_v22_films_id_similars_get(id, opts = {}) ⇒ RelatedFilmResponse
получить список похожих фильмов по kinopoisk film id.
-
#api_v22_films_id_similars_get_with_http_info(id, opts = {}) ⇒ Array<(RelatedFilmResponse, Integer, Hash)>
получить список похожих фильмов по kinopoisk film id.
-
#api_v22_films_id_videos_get(id, opts = {}) ⇒ VideoResponse
получить трейлеры,тизеры,видео для фильма по kinopoisk film id Данный эндпоинт возвращает трейлеры,тизеры,видео для фильма по kinopoisk film id.
-
#api_v22_films_id_videos_get_with_http_info(id, opts = {}) ⇒ Array<(VideoResponse, Integer, Hash)>
получить трейлеры,тизеры,видео для фильма по kinopoisk film id Данный эндпоинт возвращает трейлеры,тизеры,видео для фильма по kinopoisk film id.
-
#api_v22_films_premieres_get(year, month, opts = {}) ⇒ PremiereResponse
получить список кинопремьер Данный эндпоинт возвращает список кинопремьер.
-
#api_v22_films_premieres_get_with_http_info(year, month, opts = {}) ⇒ Array<(PremiereResponse, Integer, Hash)>
получить список кинопремьер Данный эндпоинт возвращает список кинопремьер.
-
#api_v22_films_top_get(opts = {}) ⇒ FilmTopResponse
получить список фильмов из различных топов или коллекций.
-
#api_v22_films_top_get_with_http_info(opts = {}) ⇒ Array<(FilmTopResponse, Integer, Hash)>
получить список фильмов из различных топов или коллекций.
-
#initialize(api_client = ApiClient.default) ⇒ FilmsApi
constructor
A new instance of FilmsApi.
Constructor Details
#initialize(api_client = ApiClient.default) ⇒ FilmsApi
Returns a new instance of FilmsApi.
9 10 11 |
# File 'lib/kuapir/api/films_api.rb', line 9 def initialize(api_client = ApiClient.default) @api_client = api_client end |
Instance Attribute Details
#api_client ⇒ Object
Returns the value of attribute api_client.
7 8 9 |
# File 'lib/kuapir/api/films_api.rb', line 7 def api_client @api_client end |
Instance Method Details
#api_v21_films_id_sequels_and_prequels_get(id, opts = {}) ⇒ Array<FilmSequelsAndPrequelsResponse>
получить сиквелы и приквелы для фильма по kinopoisk film id tbd
18 19 20 21 |
# File 'lib/kuapir/api/films_api.rb', line 18 def api_v21_films_id_sequels_and_prequels_get(id, opts = {}) data, _status_code, _headers = api_v21_films_id_sequels_and_prequels_get_with_http_info(id, opts) data end |
#api_v21_films_id_sequels_and_prequels_get_with_http_info(id, opts = {}) ⇒ Array<(Array<FilmSequelsAndPrequelsResponse>, Integer, Hash)>
получить сиквелы и приквелы для фильма по kinopoisk film id tbd
28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 |
# File 'lib/kuapir/api/films_api.rb', line 28 def api_v21_films_id_sequels_and_prequels_get_with_http_info(id, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug "Calling API: FilmsApi.api_v21_films_id_sequels_and_prequels_get ..." end # verify the required parameter 'id' is set if @api_client.config.client_side_validation && id.nil? raise ArgumentError, "Missing the required parameter 'id' when calling FilmsApi.api_v21_films_id_sequels_and_prequels_get" end if @api_client.config.client_side_validation && id > 500_000_000 raise ArgumentError, 'invalid value for "id" when calling FilmsApi.api_v21_films_id_sequels_and_prequels_get, must be smaller than or equal to 500_000_000.' end if @api_client.config.client_side_validation && id < 1 raise ArgumentError, 'invalid value for "id" when calling FilmsApi.api_v21_films_id_sequels_and_prequels_get, must be greater than or equal to 1.' end # resource path local_var_path = "/api/v2.1/films/{id}/sequels_and_prequels".sub("{id}", CGI.escape(id.to_s)) # query parameters query_params = opts[:query_params] || {} # header parameters header_params = opts[:header_params] || {} # HTTP header 'Accept' (if needed) header_params["Accept"] = @api_client.select_header_accept(["application/json"]) # form parameters form_params = opts[:form_params] || {} # http body (model) post_body = opts[:debug_body] # return_type return_type = opts[:debug_return_type] || "Array<FilmSequelsAndPrequelsResponse>" # auth_names auth_names = opts[:debug_auth_names] || ["ApiKeyAuth"] = opts.merge( operation: :"FilmsApi.api_v21_films_id_sequels_and_prequels_get", header_params: header_params, query_params: query_params, form_params: form_params, body: post_body, auth_names: auth_names, return_type: return_type ) data, status_code, headers = @api_client.call_api(:GET, local_var_path, ) if @api_client.config.debugging @api_client.config.logger.debug "API called: FilmsApi#api_v21_films_id_sequels_and_prequels_get\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end [data, status_code, headers] end |
#api_v21_films_releases_get(year, month, opts = {}) ⇒ DigitalReleaseResponse
получить список цифровых релизов Данный эндпоинт возвращает список цифровых релизов. Например www.kinopoisk.ru/comingsoon/digital/
94 95 96 97 |
# File 'lib/kuapir/api/films_api.rb', line 94 def api_v21_films_releases_get(year, month, opts = {}) data, _status_code, _headers = api_v21_films_releases_get_with_http_info(year, month, opts) data end |
#api_v21_films_releases_get_with_http_info(year, month, opts = {}) ⇒ Array<(DigitalReleaseResponse, Integer, Hash)>
получить список цифровых релизов Данный эндпоинт возвращает список цифровых релизов. Например www.kinopoisk.ru/comingsoon/digital/
106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 |
# File 'lib/kuapir/api/films_api.rb', line 106 def api_v21_films_releases_get_with_http_info(year, month, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug "Calling API: FilmsApi.api_v21_films_releases_get ..." end # verify the required parameter 'year' is set if @api_client.config.client_side_validation && year.nil? raise ArgumentError, "Missing the required parameter 'year' when calling FilmsApi.api_v21_films_releases_get" end # verify the required parameter 'month' is set if @api_client.config.client_side_validation && month.nil? raise ArgumentError, "Missing the required parameter 'month' when calling FilmsApi.api_v21_films_releases_get" end # verify enum value allowable_values = %w[JANUARY FEBRUARY MARCH APRIL MAY JUNE JULY AUGUST SEPTEMBER OCTOBER NOVEMBER DECEMBER] if @api_client.config.client_side_validation && !allowable_values.include?(month) raise ArgumentError, "invalid value for \"month\", must be one of #{allowable_values}" end if @api_client.config.client_side_validation && !opts[:page].nil? && opts[:page] > 20 raise ArgumentError, 'invalid value for "opts[:"page"]" when calling FilmsApi.api_v21_films_releases_get, must be smaller than or equal to 20.' end if @api_client.config.client_side_validation && !opts[:page].nil? && opts[:page] < 1 raise ArgumentError, 'invalid value for "opts[:"page"]" when calling FilmsApi.api_v21_films_releases_get, must be greater than or equal to 1.' end # resource path local_var_path = "/api/v2.1/films/releases" # query parameters query_params = opts[:query_params] || {} query_params[:year] = year query_params[:month] = month query_params[:page] = opts[:page] unless opts[:page].nil? # header parameters header_params = opts[:header_params] || {} # HTTP header 'Accept' (if needed) header_params["Accept"] = @api_client.select_header_accept(["application/json"]) # form parameters form_params = opts[:form_params] || {} # http body (model) post_body = opts[:debug_body] # return_type return_type = opts[:debug_return_type] || "DigitalReleaseResponse" # auth_names auth_names = opts[:debug_auth_names] || ["ApiKeyAuth"] = opts.merge( operation: :"FilmsApi.api_v21_films_releases_get", header_params: header_params, query_params: query_params, form_params: form_params, body: post_body, auth_names: auth_names, return_type: return_type ) data, status_code, headers = @api_client.call_api(:GET, local_var_path, ) if @api_client.config.debugging @api_client.config.logger.debug "API called: FilmsApi#api_v21_films_releases_get\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end [data, status_code, headers] end |
#api_v21_films_search_by_keyword_get(keyword, opts = {}) ⇒ FilmSearchResponse
получить список фильмов по ключевым словам Возвращает список фильмов с пагинацией. Каждая страница содержит не более чем 20 фильмов.
186 187 188 189 |
# File 'lib/kuapir/api/films_api.rb', line 186 def api_v21_films_search_by_keyword_get(keyword, opts = {}) data, _status_code, _headers = api_v21_films_search_by_keyword_get_with_http_info(keyword, opts) data end |
#api_v21_films_search_by_keyword_get_with_http_info(keyword, opts = {}) ⇒ Array<(FilmSearchResponse, Integer, Hash)>
получить список фильмов по ключевым словам Возвращает список фильмов с пагинацией. Каждая страница содержит не более чем 20 фильмов.
197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 |
# File 'lib/kuapir/api/films_api.rb', line 197 def api_v21_films_search_by_keyword_get_with_http_info(keyword, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug "Calling API: FilmsApi.api_v21_films_search_by_keyword_get ..." end # verify the required parameter 'keyword' is set if @api_client.config.client_side_validation && keyword.nil? raise ArgumentError, "Missing the required parameter 'keyword' when calling FilmsApi.api_v21_films_search_by_keyword_get" end if @api_client.config.client_side_validation && !opts[:page].nil? && opts[:page] > 20 raise ArgumentError, 'invalid value for "opts[:"page"]" when calling FilmsApi.api_v21_films_search_by_keyword_get, must be smaller than or equal to 20.' end if @api_client.config.client_side_validation && !opts[:page].nil? && opts[:page] < 1 raise ArgumentError, 'invalid value for "opts[:"page"]" when calling FilmsApi.api_v21_films_search_by_keyword_get, must be greater than or equal to 1.' end # resource path local_var_path = "/api/v2.1/films/search-by-keyword" # query parameters query_params = opts[:query_params] || {} query_params[:keyword] = keyword query_params[:page] = opts[:page] unless opts[:page].nil? # header parameters header_params = opts[:header_params] || {} # HTTP header 'Accept' (if needed) header_params["Accept"] = @api_client.select_header_accept(["application/json"]) # form parameters form_params = opts[:form_params] || {} # http body (model) post_body = opts[:debug_body] # return_type return_type = opts[:debug_return_type] || "FilmSearchResponse" # auth_names auth_names = opts[:debug_auth_names] || ["ApiKeyAuth"] = opts.merge( operation: :"FilmsApi.api_v21_films_search_by_keyword_get", header_params: header_params, query_params: query_params, form_params: form_params, body: post_body, auth_names: auth_names, return_type: return_type ) data, status_code, headers = @api_client.call_api(:GET, local_var_path, ) if @api_client.config.debugging @api_client.config.logger.debug "API called: FilmsApi#api_v21_films_search_by_keyword_get\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end [data, status_code, headers] end |
#api_v22_films_filters_get(opts = {}) ⇒ FiltersResponse
получить id стран и жанров для использования в /api/v2.2/films Возвращает список id стран и жанров, которые могут быть использованы в /api/v2.2/films
262 263 264 265 |
# File 'lib/kuapir/api/films_api.rb', line 262 def api_v22_films_filters_get(opts = {}) data, _status_code, _headers = api_v22_films_filters_get_with_http_info(opts) data end |
#api_v22_films_filters_get_with_http_info(opts = {}) ⇒ Array<(FiltersResponse, Integer, Hash)>
получить id стран и жанров для использования в /api/v2.2/films Возвращает список id стран и жанров, которые могут быть использованы в /api/v2.2/films
271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 |
# File 'lib/kuapir/api/films_api.rb', line 271 def api_v22_films_filters_get_with_http_info(opts = {}) if @api_client.config.debugging @api_client.config.logger.debug "Calling API: FilmsApi.api_v22_films_filters_get ..." end # resource path local_var_path = "/api/v2.2/films/filters" # query parameters query_params = opts[:query_params] || {} # header parameters header_params = opts[:header_params] || {} # HTTP header 'Accept' (if needed) header_params["Accept"] = @api_client.select_header_accept(["application/json"]) # form parameters form_params = opts[:form_params] || {} # http body (model) post_body = opts[:debug_body] # return_type return_type = opts[:debug_return_type] || "FiltersResponse" # auth_names auth_names = opts[:debug_auth_names] || ["ApiKeyAuth"] = opts.merge( operation: :"FilmsApi.api_v22_films_filters_get", header_params: header_params, query_params: query_params, form_params: form_params, body: post_body, auth_names: auth_names, return_type: return_type ) data, status_code, headers = @api_client.call_api(:GET, local_var_path, ) if @api_client.config.debugging @api_client.config.logger.debug "API called: FilmsApi#api_v22_films_filters_get\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end [data, status_code, headers] end |
#api_v22_films_get(opts = {}) ⇒ FilmSearchByFiltersResponse
получить список фильмов по различным фильтрам Возвращает список фильмов с пагинацией. Каждая страница содержит не более чем 20 фильмов. Данный эндпоинт не возращает более 400 фильмов. Используй /api/v2.2/films/filters чтобы получить id стран и жанров.
330 331 332 333 |
# File 'lib/kuapir/api/films_api.rb', line 330 def api_v22_films_get(opts = {}) data, _status_code, _headers = api_v22_films_get_with_http_info(opts) data end |
#api_v22_films_get_with_http_info(opts = {}) ⇒ Array<(FilmSearchByFiltersResponse, Integer, Hash)>
получить список фильмов по различным фильтрам Возвращает список фильмов с пагинацией. Каждая страница содержит не более чем 20 фильмов. Данный эндпоинт не возращает более 400 фильмов. <i>Используй /api/v2.2/films/filters чтобы получить id стран и жанров.</i>
350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 417 418 419 420 421 422 423 424 425 |
# File 'lib/kuapir/api/films_api.rb', line 350 def api_v22_films_get_with_http_info(opts = {}) @api_client.config.logger.debug "Calling API: FilmsApi.api_v22_films_get ..." if @api_client.config.debugging allowable_values = %w[RATING NUM_VOTE YEAR] if @api_client.config.client_side_validation && opts[:order] && !allowable_values.include?(opts[:order]) raise ArgumentError, "invalid value for \"order\", must be one of #{allowable_values}" end allowable_values = %w[FILM VIDEO TV_SERIES MINI_SERIES TV_SHOW ALL] if @api_client.config.client_side_validation && opts[:type] && !allowable_values.include?(opts[:type]) raise ArgumentError, "invalid value for \"type\", must be one of #{allowable_values}" end if @api_client.config.client_side_validation && !opts[:page].nil? && opts[:page] > 20 raise ArgumentError, 'invalid value for "opts[:"page"]" when calling FilmsApi.api_v22_films_get, must be smaller than or equal to 20.' end if @api_client.config.client_side_validation && !opts[:page].nil? && opts[:page] < 1 raise ArgumentError, 'invalid value for "opts[:"page"]" when calling FilmsApi.api_v22_films_get, must be greater than or equal to 1.' end # resource path local_var_path = "/api/v2.2/films" # query parameters query_params = opts[:query_params] || {} unless opts[:countries].nil? query_params[:countries] = @api_client.build_collection_param(opts[:countries], :multi) end query_params[:genres] = @api_client.build_collection_param(opts[:genres], :multi) unless opts[:genres].nil? query_params[:order] = opts[:order] unless opts[:order].nil? query_params[:type] = opts[:type] unless opts[:type].nil? query_params[:ratingFrom] = opts[:rating_from] unless opts[:rating_from].nil? query_params[:ratingTo] = opts[:rating_to] unless opts[:rating_to].nil? query_params[:yearFrom] = opts[:year_from] unless opts[:year_from].nil? query_params[:yearTo] = opts[:year_to] unless opts[:year_to].nil? query_params[:imdbId] = opts[:imdb_id] unless opts[:imdb_id].nil? query_params[:keyword] = opts[:keyword] unless opts[:keyword].nil? query_params[:page] = opts[:page] unless opts[:page].nil? # header parameters header_params = opts[:header_params] || {} # HTTP header 'Accept' (if needed) header_params["Accept"] = @api_client.select_header_accept(["application/json"]) # form parameters form_params = opts[:form_params] || {} # http body (model) post_body = opts[:debug_body] # return_type return_type = opts[:debug_return_type] || "FilmSearchByFiltersResponse" # auth_names auth_names = opts[:debug_auth_names] || ["ApiKeyAuth"] = opts.merge( operation: :"FilmsApi.api_v22_films_get", header_params: header_params, query_params: query_params, form_params: form_params, body: post_body, auth_names: auth_names, return_type: return_type ) data, status_code, headers = @api_client.call_api(:GET, local_var_path, ) if @api_client.config.debugging @api_client.config.logger.debug "API called: FilmsApi#api_v22_films_get\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end [data, status_code, headers] end |
#api_v22_films_id_box_office_get(id, opts = {}) ⇒ BoxOfficeResponse
получить данные о бюджете и сборах фильма по kinopoisk film id Данный эндпоинт возвращает данные о бюджете и сборах.
432 433 434 435 |
# File 'lib/kuapir/api/films_api.rb', line 432 def api_v22_films_id_box_office_get(id, opts = {}) data, _status_code, _headers = api_v22_films_id_box_office_get_with_http_info(id, opts) data end |
#api_v22_films_id_box_office_get_with_http_info(id, opts = {}) ⇒ Array<(BoxOfficeResponse, Integer, Hash)>
получить данные о бюджете и сборах фильма по kinopoisk film id Данный эндпоинт возвращает данные о бюджете и сборах.
442 443 444 445 446 447 448 449 450 451 452 453 454 455 456 457 458 459 460 461 462 463 464 465 466 467 468 469 470 471 472 473 474 475 476 477 478 479 480 481 482 483 484 485 486 487 488 489 490 491 492 493 494 495 496 497 498 499 |
# File 'lib/kuapir/api/films_api.rb', line 442 def api_v22_films_id_box_office_get_with_http_info(id, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug "Calling API: FilmsApi.api_v22_films_id_box_office_get ..." end # verify the required parameter 'id' is set if @api_client.config.client_side_validation && id.nil? raise ArgumentError, "Missing the required parameter 'id' when calling FilmsApi.api_v22_films_id_box_office_get" end if @api_client.config.client_side_validation && id > 500_000_000 raise ArgumentError, 'invalid value for "id" when calling FilmsApi.api_v22_films_id_box_office_get, must be smaller than or equal to 500_000_000.' end if @api_client.config.client_side_validation && id < 1 raise ArgumentError, 'invalid value for "id" when calling FilmsApi.api_v22_films_id_box_office_get, must be greater than or equal to 1.' end # resource path local_var_path = "/api/v2.2/films/{id}/box_office".sub("{id}", CGI.escape(id.to_s)) # query parameters query_params = opts[:query_params] || {} # header parameters header_params = opts[:header_params] || {} # HTTP header 'Accept' (if needed) header_params["Accept"] = @api_client.select_header_accept(["application/json"]) # form parameters form_params = opts[:form_params] || {} # http body (model) post_body = opts[:debug_body] # return_type return_type = opts[:debug_return_type] || "BoxOfficeResponse" # auth_names auth_names = opts[:debug_auth_names] || ["ApiKeyAuth"] = opts.merge( operation: :"FilmsApi.api_v22_films_id_box_office_get", header_params: header_params, query_params: query_params, form_params: form_params, body: post_body, auth_names: auth_names, return_type: return_type ) data, status_code, headers = @api_client.call_api(:GET, local_var_path, ) if @api_client.config.debugging @api_client.config.logger.debug "API called: FilmsApi#api_v22_films_id_box_office_get\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end [data, status_code, headers] end |
#api_v22_films_id_distributions_get(id, opts = {}) ⇒ DistributionResponse
получить данные о прокате фильма по kinopoisk film id Данный эндпоинт возвращает данные о прокате в разных странах.
506 507 508 509 |
# File 'lib/kuapir/api/films_api.rb', line 506 def api_v22_films_id_distributions_get(id, opts = {}) data, _status_code, _headers = api_v22_films_id_distributions_get_with_http_info(id, opts) data end |
#api_v22_films_id_distributions_get_with_http_info(id, opts = {}) ⇒ Array<(DistributionResponse, Integer, Hash)>
получить данные о прокате фильма по kinopoisk film id Данный эндпоинт возвращает данные о прокате в разных странах.
516 517 518 519 520 521 522 523 524 525 526 527 528 529 530 531 532 533 534 535 536 537 538 539 540 541 542 543 544 545 546 547 548 549 550 551 552 553 554 555 556 557 558 559 560 561 562 563 564 565 566 567 568 569 570 571 572 573 |
# File 'lib/kuapir/api/films_api.rb', line 516 def api_v22_films_id_distributions_get_with_http_info(id, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug "Calling API: FilmsApi.api_v22_films_id_distributions_get ..." end # verify the required parameter 'id' is set if @api_client.config.client_side_validation && id.nil? raise ArgumentError, "Missing the required parameter 'id' when calling FilmsApi.api_v22_films_id_distributions_get" end if @api_client.config.client_side_validation && id > 500_000_000 raise ArgumentError, 'invalid value for "id" when calling FilmsApi.api_v22_films_id_distributions_get, must be smaller than or equal to 500_000_000.' end if @api_client.config.client_side_validation && id < 1 raise ArgumentError, 'invalid value for "id" when calling FilmsApi.api_v22_films_id_distributions_get, must be greater than or equal to 1.' end # resource path local_var_path = "/api/v2.2/films/{id}/distributions".sub("{id}", CGI.escape(id.to_s)) # query parameters query_params = opts[:query_params] || {} # header parameters header_params = opts[:header_params] || {} # HTTP header 'Accept' (if needed) header_params["Accept"] = @api_client.select_header_accept(["application/json"]) # form parameters form_params = opts[:form_params] || {} # http body (model) post_body = opts[:debug_body] # return_type return_type = opts[:debug_return_type] || "DistributionResponse" # auth_names auth_names = opts[:debug_auth_names] || ["ApiKeyAuth"] = opts.merge( operation: :"FilmsApi.api_v22_films_id_distributions_get", header_params: header_params, query_params: query_params, form_params: form_params, body: post_body, auth_names: auth_names, return_type: return_type ) data, status_code, headers = @api_client.call_api(:GET, local_var_path, ) if @api_client.config.debugging @api_client.config.logger.debug "API called: FilmsApi#api_v22_films_id_distributions_get\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end [data, status_code, headers] end |
#api_v22_films_id_facts_get(id, opts = {}) ⇒ FactResponse
получить данные о фактах и ошибках в фильме по kinopoisk film id Данный эндпоинт возвращает список фактов и ошибок в фильме.
type - FACT, обозначает интересный факт о фильме.
type - BLOOPER, обозначает ошибку в фильме.
580 581 582 583 |
# File 'lib/kuapir/api/films_api.rb', line 580 def api_v22_films_id_facts_get(id, opts = {}) data, _status_code, _headers = api_v22_films_id_facts_get_with_http_info(id, opts) data end |
#api_v22_films_id_facts_get_with_http_info(id, opts = {}) ⇒ Array<(FactResponse, Integer, Hash)>
получить данные о фактах и ошибках в фильме по kinopoisk film id Данный эндпоинт возвращает список фактов и ошибок в фильме. <br> type - <b>FACT</b>, обозначает интересный факт о фильме. <br> type - <b>BLOOPER</b>, обозначает ошибку в фильме.
590 591 592 593 594 595 596 597 598 599 600 601 602 603 604 605 606 607 608 609 610 611 612 613 614 615 616 617 618 619 620 621 622 623 624 625 626 627 628 629 630 631 632 633 634 635 636 637 638 639 640 641 642 643 644 645 646 647 |
# File 'lib/kuapir/api/films_api.rb', line 590 def api_v22_films_id_facts_get_with_http_info(id, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug "Calling API: FilmsApi.api_v22_films_id_facts_get ..." end # verify the required parameter 'id' is set if @api_client.config.client_side_validation && id.nil? raise ArgumentError, "Missing the required parameter 'id' when calling FilmsApi.api_v22_films_id_facts_get" end if @api_client.config.client_side_validation && id > 500_000_000 raise ArgumentError, 'invalid value for "id" when calling FilmsApi.api_v22_films_id_facts_get, must be smaller than or equal to 500_000_000.' end if @api_client.config.client_side_validation && id < 1 raise ArgumentError, 'invalid value for "id" when calling FilmsApi.api_v22_films_id_facts_get, must be greater than or equal to 1.' end # resource path local_var_path = "/api/v2.2/films/{id}/facts".sub("{id}", CGI.escape(id.to_s)) # query parameters query_params = opts[:query_params] || {} # header parameters header_params = opts[:header_params] || {} # HTTP header 'Accept' (if needed) header_params["Accept"] = @api_client.select_header_accept(["application/json"]) # form parameters form_params = opts[:form_params] || {} # http body (model) post_body = opts[:debug_body] # return_type return_type = opts[:debug_return_type] || "FactResponse" # auth_names auth_names = opts[:debug_auth_names] || ["ApiKeyAuth"] = opts.merge( operation: :"FilmsApi.api_v22_films_id_facts_get", header_params: header_params, query_params: query_params, form_params: form_params, body: post_body, auth_names: auth_names, return_type: return_type ) data, status_code, headers = @api_client.call_api(:GET, local_var_path, ) if @api_client.config.debugging @api_client.config.logger.debug "API called: FilmsApi#api_v22_films_id_facts_get\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end [data, status_code, headers] end |
#api_v22_films_id_get(id, opts = {}) ⇒ Film
получить данные о фильме по kinopoisk id Данный эндпоинт возвращает базовые данные о фильме. Поле lastSync показывает дату последнего обновления данных.
654 655 656 657 |
# File 'lib/kuapir/api/films_api.rb', line 654 def api_v22_films_id_get(id, opts = {}) data, _status_code, _headers = api_v22_films_id_get_with_http_info(id, opts) data end |
#api_v22_films_id_get_with_http_info(id, opts = {}) ⇒ Array<(Film, Integer, Hash)>
получить данные о фильме по kinopoisk id Данный эндпоинт возвращает базовые данные о фильме. Поле <b>lastSync</b> показывает дату последнего обновления данных.
664 665 666 667 668 669 670 671 672 673 674 675 676 677 678 679 680 681 682 683 684 685 686 687 688 689 690 691 692 693 694 695 696 697 698 699 700 701 702 703 704 705 706 707 708 709 710 711 712 713 714 715 716 717 718 719 |
# File 'lib/kuapir/api/films_api.rb', line 664 def api_v22_films_id_get_with_http_info(id, opts = {}) @api_client.config.logger.debug "Calling API: FilmsApi.api_v22_films_id_get ..." if @api_client.config.debugging # verify the required parameter 'id' is set if @api_client.config.client_side_validation && id.nil? raise ArgumentError, "Missing the required parameter 'id' when calling FilmsApi.api_v22_films_id_get" end if @api_client.config.client_side_validation && id > 500_000_000 raise ArgumentError, 'invalid value for "id" when calling FilmsApi.api_v22_films_id_get, must be smaller than or equal to 500_000_000.' end if @api_client.config.client_side_validation && id < 1 raise ArgumentError, 'invalid value for "id" when calling FilmsApi.api_v22_films_id_get, must be greater than or equal to 1.' end # resource path local_var_path = "/api/v2.2/films/{id}".sub("{id}", CGI.escape(id.to_s)) # query parameters query_params = opts[:query_params] || {} # header parameters header_params = opts[:header_params] || {} # HTTP header 'Accept' (if needed) header_params["Accept"] = @api_client.select_header_accept(["application/json"]) # form parameters form_params = opts[:form_params] || {} # http body (model) post_body = opts[:debug_body] # return_type return_type = opts[:debug_return_type] || "Film" # auth_names auth_names = opts[:debug_auth_names] || ["ApiKeyAuth"] = opts.merge( operation: :"FilmsApi.api_v22_films_id_get", header_params: header_params, query_params: query_params, form_params: form_params, body: post_body, auth_names: auth_names, return_type: return_type ) data, status_code, headers = @api_client.call_api(:GET, local_var_path, ) if @api_client.config.debugging @api_client.config.logger.debug "API called: FilmsApi#api_v22_films_id_get\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end [data, status_code, headers] end |
#api_v22_films_id_images_get(id, opts = {}) ⇒ ImageResponse
получить изображения(кадры, постеры, фан-арты, обои и т.д.) связанные с фильмом по kinopoisk film id Данный эндпоинт возвращает изображения связанные с фильмом с пагинацией. Каждая страница содержит не более чем 20 фильмов.</br> Доступные изображения:</br> <ul> <li>STILL - кадры</li> <li>SHOOTING - изображения со съемок</li> <li>POSTER - постеры</li> <li>FAN_ART - фан-арты</li> <li>PROMO - промо</li> <li>CONCEPT - концепт-арты</li> <li>WALLPAPER - обои</li> <li>COVER - обложки</li> <li>SCREENSHOT - скриншоты</li> </ul>
728 729 730 731 |
# File 'lib/kuapir/api/films_api.rb', line 728 def api_v22_films_id_images_get(id, opts = {}) data, _status_code, _headers = api_v22_films_id_images_get_with_http_info(id, opts) data end |
#api_v22_films_id_images_get_with_http_info(id, opts = {}) ⇒ Array<(ImageResponse, Integer, Hash)>
получить изображения(кадры, постеры, фан-арты, обои и т.д.) связанные с фильмом по kinopoisk film id Данный эндпоинт возвращает изображения связанные с фильмом с пагинацией. Каждая страница содержит <b>не более чем 20 фильмов</b>.</br> Доступные изображения:</br> <ul> <li>STILL - кадры</li> <li>SHOOTING - изображения со съемок</li> <li>POSTER - постеры</li> <li>FAN_ART - фан-арты</li> <li>PROMO - промо</li> <li>CONCEPT - концепт-арты</li> <li>WALLPAPER - обои</li> <li>COVER - обложки</li> <li>SCREENSHOT - скриншоты</li> </ul>
740 741 742 743 744 745 746 747 748 749 750 751 752 753 754 755 756 757 758 759 760 761 762 763 764 765 766 767 768 769 770 771 772 773 774 775 776 777 778 779 780 781 782 783 784 785 786 787 788 789 790 791 792 793 794 795 796 797 798 799 800 801 802 803 804 805 806 807 808 809 810 811 812 813 814 |
# File 'lib/kuapir/api/films_api.rb', line 740 def api_v22_films_id_images_get_with_http_info(id, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug "Calling API: FilmsApi.api_v22_films_id_images_get ..." end # verify the required parameter 'id' is set if @api_client.config.client_side_validation && id.nil? raise ArgumentError, "Missing the required parameter 'id' when calling FilmsApi.api_v22_films_id_images_get" end if @api_client.config.client_side_validation && id > 500_000_000 raise ArgumentError, 'invalid value for "id" when calling FilmsApi.api_v22_films_id_images_get, must be smaller than or equal to 500_000_000.' end if @api_client.config.client_side_validation && id < 1 raise ArgumentError, 'invalid value for "id" when calling FilmsApi.api_v22_films_id_images_get, must be greater than or equal to 1.' end allowable_values = %w[STILL SHOOTING POSTER FAN_ART PROMO CONCEPT WALLPAPER COVER SCREENSHOT] if @api_client.config.client_side_validation && opts[:type] && !allowable_values.include?(opts[:type]) raise ArgumentError, "invalid value for \"type\", must be one of #{allowable_values}" end if @api_client.config.client_side_validation && !opts[:page].nil? && opts[:page] > 20 raise ArgumentError, 'invalid value for "opts[:"page"]" when calling FilmsApi.api_v22_films_id_images_get, must be smaller than or equal to 20.' end if @api_client.config.client_side_validation && !opts[:page].nil? && opts[:page] < 1 raise ArgumentError, 'invalid value for "opts[:"page"]" when calling FilmsApi.api_v22_films_id_images_get, must be greater than or equal to 1.' end # resource path local_var_path = "/api/v2.2/films/{id}/images".sub("{id}", CGI.escape(id.to_s)) # query parameters query_params = opts[:query_params] || {} query_params[:type] = opts[:type] unless opts[:type].nil? query_params[:page] = opts[:page] unless opts[:page].nil? # header parameters header_params = opts[:header_params] || {} # HTTP header 'Accept' (if needed) header_params["Accept"] = @api_client.select_header_accept(["application/json"]) # form parameters form_params = opts[:form_params] || {} # http body (model) post_body = opts[:debug_body] # return_type return_type = opts[:debug_return_type] || "ImageResponse" # auth_names auth_names = opts[:debug_auth_names] || ["ApiKeyAuth"] = opts.merge( operation: :"FilmsApi.api_v22_films_id_images_get", header_params: header_params, query_params: query_params, form_params: form_params, body: post_body, auth_names: auth_names, return_type: return_type ) data, status_code, headers = @api_client.call_api(:GET, local_var_path, ) if @api_client.config.debugging @api_client.config.logger.debug "API called: FilmsApi#api_v22_films_id_images_get\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end [data, status_code, headers] end |
#api_v22_films_id_seasons_get(id, opts = {}) ⇒ SeasonResponse
получить данные о сезонах для сериала по kinopoisk film id Данный эндпоинт возвращает данные о сезонах для сериала.
821 822 823 824 |
# File 'lib/kuapir/api/films_api.rb', line 821 def api_v22_films_id_seasons_get(id, opts = {}) data, _status_code, _headers = api_v22_films_id_seasons_get_with_http_info(id, opts) data end |
#api_v22_films_id_seasons_get_with_http_info(id, opts = {}) ⇒ Array<(SeasonResponse, Integer, Hash)>
получить данные о сезонах для сериала по kinopoisk film id Данный эндпоинт возвращает данные о сезонах для сериала.
831 832 833 834 835 836 837 838 839 840 841 842 843 844 845 846 847 848 849 850 851 852 853 854 855 856 857 858 859 860 861 862 863 864 865 866 867 868 869 870 871 872 873 874 875 876 877 878 879 880 881 882 883 884 885 886 887 888 |
# File 'lib/kuapir/api/films_api.rb', line 831 def api_v22_films_id_seasons_get_with_http_info(id, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug "Calling API: FilmsApi.api_v22_films_id_seasons_get ..." end # verify the required parameter 'id' is set if @api_client.config.client_side_validation && id.nil? raise ArgumentError, "Missing the required parameter 'id' when calling FilmsApi.api_v22_films_id_seasons_get" end if @api_client.config.client_side_validation && id > 500_000_000 raise ArgumentError, 'invalid value for "id" when calling FilmsApi.api_v22_films_id_seasons_get, must be smaller than or equal to 500_000_000.' end if @api_client.config.client_side_validation && id < 1 raise ArgumentError, 'invalid value for "id" when calling FilmsApi.api_v22_films_id_seasons_get, must be greater than or equal to 1.' end # resource path local_var_path = "/api/v2.2/films/{id}/seasons".sub("{id}", CGI.escape(id.to_s)) # query parameters query_params = opts[:query_params] || {} # header parameters header_params = opts[:header_params] || {} # HTTP header 'Accept' (if needed) header_params["Accept"] = @api_client.select_header_accept(["application/json"]) # form parameters form_params = opts[:form_params] || {} # http body (model) post_body = opts[:debug_body] # return_type return_type = opts[:debug_return_type] || "SeasonResponse" # auth_names auth_names = opts[:debug_auth_names] || ["ApiKeyAuth"] = opts.merge( operation: :"FilmsApi.api_v22_films_id_seasons_get", header_params: header_params, query_params: query_params, form_params: form_params, body: post_body, auth_names: auth_names, return_type: return_type ) data, status_code, headers = @api_client.call_api(:GET, local_var_path, ) if @api_client.config.debugging @api_client.config.logger.debug "API called: FilmsApi#api_v22_films_id_seasons_get\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end [data, status_code, headers] end |
#api_v22_films_id_similars_get(id, opts = {}) ⇒ RelatedFilmResponse
получить список похожих фильмов по kinopoisk film id
894 895 896 897 |
# File 'lib/kuapir/api/films_api.rb', line 894 def api_v22_films_id_similars_get(id, opts = {}) data, _status_code, _headers = api_v22_films_id_similars_get_with_http_info(id, opts) data end |
#api_v22_films_id_similars_get_with_http_info(id, opts = {}) ⇒ Array<(RelatedFilmResponse, Integer, Hash)>
получить список похожих фильмов по kinopoisk film id
903 904 905 906 907 908 909 910 911 912 913 914 915 916 917 918 919 920 921 922 923 924 925 926 927 928 929 930 931 932 933 934 935 936 937 938 939 940 941 942 943 944 945 946 947 948 949 950 951 952 953 954 955 956 957 958 959 960 |
# File 'lib/kuapir/api/films_api.rb', line 903 def api_v22_films_id_similars_get_with_http_info(id, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug "Calling API: FilmsApi.api_v22_films_id_similars_get ..." end # verify the required parameter 'id' is set if @api_client.config.client_side_validation && id.nil? raise ArgumentError, "Missing the required parameter 'id' when calling FilmsApi.api_v22_films_id_similars_get" end if @api_client.config.client_side_validation && id > 500_000_000 raise ArgumentError, 'invalid value for "id" when calling FilmsApi.api_v22_films_id_similars_get, must be smaller than or equal to 500_000_000.' end if @api_client.config.client_side_validation && id < 1 raise ArgumentError, 'invalid value for "id" when calling FilmsApi.api_v22_films_id_similars_get, must be greater than or equal to 1.' end # resource path local_var_path = "/api/v2.2/films/{id}/similars".sub("{id}", CGI.escape(id.to_s)) # query parameters query_params = opts[:query_params] || {} # header parameters header_params = opts[:header_params] || {} # HTTP header 'Accept' (if needed) header_params["Accept"] = @api_client.select_header_accept(["application/json"]) # form parameters form_params = opts[:form_params] || {} # http body (model) post_body = opts[:debug_body] # return_type return_type = opts[:debug_return_type] || "RelatedFilmResponse" # auth_names auth_names = opts[:debug_auth_names] || ["ApiKeyAuth"] = opts.merge( operation: :"FilmsApi.api_v22_films_id_similars_get", header_params: header_params, query_params: query_params, form_params: form_params, body: post_body, auth_names: auth_names, return_type: return_type ) data, status_code, headers = @api_client.call_api(:GET, local_var_path, ) if @api_client.config.debugging @api_client.config.logger.debug "API called: FilmsApi#api_v22_films_id_similars_get\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end [data, status_code, headers] end |
#api_v22_films_id_videos_get(id, opts = {}) ⇒ VideoResponse
получить трейлеры,тизеры,видео для фильма по kinopoisk film id Данный эндпоинт возвращает трейлеры,тизеры,видео для фильма по kinopoisk film id. В данный момент доступно два site: <br/> <ul><li>YOUTUBE - в этом случае url это просто ссылка на youtube видео.</li><li>KINOPOISK_WIDGET - в этом случае url это ссылка на кинопоиск виджет. Например widgets.kinopoisk.ru/discovery/trailer/123573?onlyPlayer=1&autoplay=1&cover=1. Если вы хотите вставить этот виджет на вашу страницу, вы можете сделать следующее: <br/><br/><script src="unpkg.com/@ungap/custom-elements-builtin"></script><br/><script type="module" src="unpkg.com/x-frame-bypass"></script><br/><iframe is="x-frame-bypass" src="widgets.kinopoisk.ru/discovery/trailer/167560?onlyPlayer=1&autoplay=1&cover=1" width="500" height="500"></iframe></li></ul>
967 968 969 970 |
# File 'lib/kuapir/api/films_api.rb', line 967 def api_v22_films_id_videos_get(id, opts = {}) data, _status_code, _headers = api_v22_films_id_videos_get_with_http_info(id, opts) data end |
#api_v22_films_id_videos_get_with_http_info(id, opts = {}) ⇒ Array<(VideoResponse, Integer, Hash)>
получить трейлеры,тизеры,видео для фильма по kinopoisk film id Данный эндпоинт возвращает трейлеры,тизеры,видео для фильма по kinopoisk film id. В данный момент доступно два site: <br/> <ul><li>YOUTUBE - в этом случае <b>url</b> это просто ссылка на youtube видео.</li><li>KINOPOISK_WIDGET - в этом случае <b>url</b> это ссылка на кинопоиск виджет. Например widgets.kinopoisk.ru/discovery/trailer/123573?onlyPlayer=1&autoplay=1&cover=1. Если вы хотите вставить этот виджет на вашу страницу, вы можете сделать следующее: <br/><br/>&lt;script src=&quot;unpkg.com/@ungap/custom-elements-builtin&quot;&gt;&lt;/script&gt;<br/>&lt;script type=&quot;module&quot; src=&quot;unpkg.com/x-frame-bypass&quot;&gt;&lt;/script&gt;<br/>&lt;iframe is=&quot;x-frame-bypass&quot; src=&quot;widgets.kinopoisk.ru/discovery/trailer/167560?onlyPlayer=1&amp;autoplay=1&amp;cover=1&quot; width=&quot;500&quot; height=&quot;500&quot;&gt;&lt;/iframe&gt;</li></ul>
977 978 979 980 981 982 983 984 985 986 987 988 989 990 991 992 993 994 995 996 997 998 999 1000 1001 1002 1003 1004 1005 1006 1007 1008 1009 1010 1011 1012 1013 1014 1015 1016 1017 1018 1019 1020 1021 1022 1023 1024 1025 1026 1027 1028 1029 1030 1031 1032 1033 1034 |
# File 'lib/kuapir/api/films_api.rb', line 977 def api_v22_films_id_videos_get_with_http_info(id, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug "Calling API: FilmsApi.api_v22_films_id_videos_get ..." end # verify the required parameter 'id' is set if @api_client.config.client_side_validation && id.nil? raise ArgumentError, "Missing the required parameter 'id' when calling FilmsApi.api_v22_films_id_videos_get" end if @api_client.config.client_side_validation && id > 500_000_000 raise ArgumentError, 'invalid value for "id" when calling FilmsApi.api_v22_films_id_videos_get, must be smaller than or equal to 500_000_000.' end if @api_client.config.client_side_validation && id < 1 raise ArgumentError, 'invalid value for "id" when calling FilmsApi.api_v22_films_id_videos_get, must be greater than or equal to 1.' end # resource path local_var_path = "/api/v2.2/films/{id}/videos".sub("{id}", CGI.escape(id.to_s)) # query parameters query_params = opts[:query_params] || {} # header parameters header_params = opts[:header_params] || {} # HTTP header 'Accept' (if needed) header_params["Accept"] = @api_client.select_header_accept(["application/json"]) # form parameters form_params = opts[:form_params] || {} # http body (model) post_body = opts[:debug_body] # return_type return_type = opts[:debug_return_type] || "VideoResponse" # auth_names auth_names = opts[:debug_auth_names] || ["ApiKeyAuth"] = opts.merge( operation: :"FilmsApi.api_v22_films_id_videos_get", header_params: header_params, query_params: query_params, form_params: form_params, body: post_body, auth_names: auth_names, return_type: return_type ) data, status_code, headers = @api_client.call_api(:GET, local_var_path, ) if @api_client.config.debugging @api_client.config.logger.debug "API called: FilmsApi#api_v22_films_id_videos_get\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end [data, status_code, headers] end |
#api_v22_films_premieres_get(year, month, opts = {}) ⇒ PremiereResponse
получить список кинопремьер Данный эндпоинт возвращает список кинопремьер. Например www.kinopoisk.ru/premiere/
1042 1043 1044 1045 |
# File 'lib/kuapir/api/films_api.rb', line 1042 def api_v22_films_premieres_get(year, month, opts = {}) data, _status_code, _headers = api_v22_films_premieres_get_with_http_info(year, month, opts) data end |
#api_v22_films_premieres_get_with_http_info(year, month, opts = {}) ⇒ Array<(PremiereResponse, Integer, Hash)>
получить список кинопремьер Данный эндпоинт возвращает список кинопремьер. Например www.kinopoisk.ru/premiere/
1053 1054 1055 1056 1057 1058 1059 1060 1061 1062 1063 1064 1065 1066 1067 1068 1069 1070 1071 1072 1073 1074 1075 1076 1077 1078 1079 1080 1081 1082 1083 1084 1085 1086 1087 1088 1089 1090 1091 1092 1093 1094 1095 1096 1097 1098 1099 1100 1101 1102 1103 1104 1105 1106 1107 1108 1109 1110 1111 1112 1113 1114 1115 |
# File 'lib/kuapir/api/films_api.rb', line 1053 def api_v22_films_premieres_get_with_http_info(year, month, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug "Calling API: FilmsApi.api_v22_films_premieres_get ..." end # verify the required parameter 'year' is set if @api_client.config.client_side_validation && year.nil? raise ArgumentError, "Missing the required parameter 'year' when calling FilmsApi.api_v22_films_premieres_get" end # verify the required parameter 'month' is set if @api_client.config.client_side_validation && month.nil? raise ArgumentError, "Missing the required parameter 'month' when calling FilmsApi.api_v22_films_premieres_get" end # verify enum value allowable_values = %w[JANUARY FEBRUARY MARCH APRIL MAY JUNE JULY AUGUST SEPTEMBER OCTOBER NOVEMBER DECEMBER] if @api_client.config.client_side_validation && !allowable_values.include?(month) raise ArgumentError, "invalid value for \"month\", must be one of #{allowable_values}" end # resource path local_var_path = "/api/v2.2/films/premieres" # query parameters query_params = opts[:query_params] || {} query_params[:year] = year query_params[:month] = month # header parameters header_params = opts[:header_params] || {} # HTTP header 'Accept' (if needed) header_params["Accept"] = @api_client.select_header_accept(["application/json"]) # form parameters form_params = opts[:form_params] || {} # http body (model) post_body = opts[:debug_body] # return_type return_type = opts[:debug_return_type] || "PremiereResponse" # auth_names auth_names = opts[:debug_auth_names] || ["ApiKeyAuth"] = opts.merge( operation: :"FilmsApi.api_v22_films_premieres_get", header_params: header_params, query_params: query_params, form_params: form_params, body: post_body, auth_names: auth_names, return_type: return_type ) data, status_code, headers = @api_client.call_api(:GET, local_var_path, ) if @api_client.config.debugging @api_client.config.logger.debug "API called: FilmsApi#api_v22_films_premieres_get\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end [data, status_code, headers] end |
#api_v22_films_top_get(opts = {}) ⇒ FilmTopResponse
получить список фильмов из различных топов или коллекций. Например www.kinopoisk.ru/top/lists/58/ Возвращает список фильмов с пагинацией. Каждая страница содержит не более чем 20 фильмов.
1123 1124 1125 1126 |
# File 'lib/kuapir/api/films_api.rb', line 1123 def api_v22_films_top_get(opts = {}) data, _status_code, _headers = api_v22_films_top_get_with_http_info(opts) data end |
#api_v22_films_top_get_with_http_info(opts = {}) ⇒ Array<(FilmTopResponse, Integer, Hash)>
получить список фильмов из различных топов или коллекций. Например www.kinopoisk.ru/top/lists/58/ Возвращает список фильмов с пагинацией. Каждая страница содержит не более чем 20 фильмов.
1134 1135 1136 1137 1138 1139 1140 1141 1142 1143 1144 1145 1146 1147 1148 1149 1150 1151 1152 1153 1154 1155 1156 1157 1158 1159 1160 1161 1162 1163 1164 1165 1166 1167 1168 1169 1170 1171 1172 1173 1174 1175 1176 1177 1178 1179 1180 1181 1182 1183 1184 1185 1186 1187 1188 1189 1190 1191 |
# File 'lib/kuapir/api/films_api.rb', line 1134 def api_v22_films_top_get_with_http_info(opts = {}) @api_client.config.logger.debug "Calling API: FilmsApi.api_v22_films_top_get ..." if @api_client.config.debugging allowable_values = %w[TOP_250_BEST_FILMS TOP_100_POPULAR_FILMS TOP_AWAIT_FILMS] if @api_client.config.client_side_validation && opts[:type] && !allowable_values.include?(opts[:type]) raise ArgumentError, "invalid value for \"type\", must be one of #{allowable_values}" end if @api_client.config.client_side_validation && !opts[:page].nil? && opts[:page] > 20 raise ArgumentError, 'invalid value for "opts[:"page"]" when calling FilmsApi.api_v22_films_top_get, must be smaller than or equal to 20.' end if @api_client.config.client_side_validation && !opts[:page].nil? && opts[:page] < 1 raise ArgumentError, 'invalid value for "opts[:"page"]" when calling FilmsApi.api_v22_films_top_get, must be greater than or equal to 1.' end # resource path local_var_path = "/api/v2.2/films/top" # query parameters query_params = opts[:query_params] || {} query_params[:type] = opts[:type] unless opts[:type].nil? query_params[:page] = opts[:page] unless opts[:page].nil? # header parameters header_params = opts[:header_params] || {} # HTTP header 'Accept' (if needed) header_params["Accept"] = @api_client.select_header_accept(["application/json"]) # form parameters form_params = opts[:form_params] || {} # http body (model) post_body = opts[:debug_body] # return_type return_type = opts[:debug_return_type] || "FilmTopResponse" # auth_names auth_names = opts[:debug_auth_names] || ["ApiKeyAuth"] = opts.merge( operation: :"FilmsApi.api_v22_films_top_get", header_params: header_params, query_params: query_params, form_params: form_params, body: post_body, auth_names: auth_names, return_type: return_type ) data, status_code, headers = @api_client.call_api(:GET, local_var_path, ) if @api_client.config.debugging @api_client.config.logger.debug "API called: FilmsApi#api_v22_films_top_get\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end [data, status_code, headers] end |