# Kuapir::FilmsApi All URIs are relative to *https://kinopoiskapiunofficial.tech* | Method | HTTP request | Description | | ------ | ------------ | ----------- | | [**api_v21_films_id_sequels_and_prequels_get**](FilmsApi.md#api_v21_films_id_sequels_and_prequels_get) | **GET** /api/v2.1/films/{id}/sequels_and_prequels | получить сиквелы и приквелы для фильма по kinopoisk film id | | [**api_v21_films_releases_get**](FilmsApi.md#api_v21_films_releases_get) | **GET** /api/v2.1/films/releases | получить список цифровых релизов | | [**api_v21_films_search_by_keyword_get**](FilmsApi.md#api_v21_films_search_by_keyword_get) | **GET** /api/v2.1/films/search-by-keyword | получить список фильмов по ключевым словам | | [**api_v22_films_filters_get**](FilmsApi.md#api_v22_films_filters_get) | **GET** /api/v2.2/films/filters | получить id стран и жанров для использования в /api/v2.2/films | | [**api_v22_films_get**](FilmsApi.md#api_v22_films_get) | **GET** /api/v2.2/films | получить список фильмов по различным фильтрам | | [**api_v22_films_id_box_office_get**](FilmsApi.md#api_v22_films_id_box_office_get) | **GET** /api/v2.2/films/{id}/box_office | получить данные о бюджете и сборах фильма по kinopoisk film id | | [**api_v22_films_id_distributions_get**](FilmsApi.md#api_v22_films_id_distributions_get) | **GET** /api/v2.2/films/{id}/distributions | получить данные о прокате фильма по kinopoisk film id | | [**api_v22_films_id_facts_get**](FilmsApi.md#api_v22_films_id_facts_get) | **GET** /api/v2.2/films/{id}/facts | получить данные о фактах и ошибках в фильме по kinopoisk film id | | [**api_v22_films_id_get**](FilmsApi.md#api_v22_films_id_get) | **GET** /api/v2.2/films/{id} | получить данные о фильме по kinopoisk id | | [**api_v22_films_id_images_get**](FilmsApi.md#api_v22_films_id_images_get) | **GET** /api/v2.2/films/{id}/images | получить изображения(кадры, постеры, фан-арты, обои и т.д.) связанные с фильмом по kinopoisk film id | | [**api_v22_films_id_seasons_get**](FilmsApi.md#api_v22_films_id_seasons_get) | **GET** /api/v2.2/films/{id}/seasons | получить данные о сезонах для сериала по kinopoisk film id | | [**api_v22_films_id_similars_get**](FilmsApi.md#api_v22_films_id_similars_get) | **GET** /api/v2.2/films/{id}/similars | получить список похожих фильмов по kinopoisk film id | | [**api_v22_films_id_videos_get**](FilmsApi.md#api_v22_films_id_videos_get) | **GET** /api/v2.2/films/{id}/videos | получить трейлеры,тизеры,видео для фильма по kinopoisk film id | | [**api_v22_films_premieres_get**](FilmsApi.md#api_v22_films_premieres_get) | **GET** /api/v2.2/films/premieres | получить список кинопремьер | | [**api_v22_films_top_get**](FilmsApi.md#api_v22_films_top_get) | **GET** /api/v2.2/films/top | получить список фильмов из различных топов или коллекций. Например https://www.kinopoisk.ru/top/lists/58/ | ## api_v21_films_id_sequels_and_prequels_get > > api_v21_films_id_sequels_and_prequels_get(id) получить сиквелы и приквелы для фильма по kinopoisk film id tbd ### Examples ```ruby require 'time' require 'kuapir' # setup authorization Kuapir.configure do |config| # Configure API key authorization: ApiKeyAuth config.api_key['ApiKeyAuth'] = 'YOUR API KEY' # Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil) # config.api_key_prefix['ApiKeyAuth'] = 'Bearer' end api_instance = Kuapir::FilmsApi.new id = 56 # Integer | kinopoisk film id begin # получить сиквелы и приквелы для фильма по kinopoisk film id result = api_instance.api_v21_films_id_sequels_and_prequels_get(id) p result rescue Kuapir::ApiError => e puts "Error when calling FilmsApi->api_v21_films_id_sequels_and_prequels_get: #{e}" end ``` #### Using the api_v21_films_id_sequels_and_prequels_get_with_http_info variant This returns an Array which contains the response data, status code and headers. > >, Integer, Hash)> api_v21_films_id_sequels_and_prequels_get_with_http_info(id) ```ruby begin # получить сиквелы и приквелы для фильма по kinopoisk film id data, status_code, headers = api_instance.api_v21_films_id_sequels_and_prequels_get_with_http_info(id) p status_code # => 2xx p headers # => { ... } p data # => > rescue Kuapir::ApiError => e puts "Error when calling FilmsApi->api_v21_films_id_sequels_and_prequels_get_with_http_info: #{e}" end ``` ### Parameters | Name | Type | Description | Notes | | ---- | ---- | ----------- | ----- | | **id** | **Integer** | kinopoisk film id | | ### Return type [**Array<FilmSequelsAndPrequelsResponse>**](FilmSequelsAndPrequelsResponse.md) ### Authorization [ApiKeyAuth](../README.md#ApiKeyAuth) ### HTTP request headers - **Content-Type**: Not defined - **Accept**: application/json ## api_v21_films_releases_get > api_v21_films_releases_get(year, month, opts) получить список цифровых релизов Данный эндпоинт возвращает список цифровых релизов. Например https://www.kinopoisk.ru/comingsoon/digital/ ### Examples ```ruby require 'time' require 'kuapir' # setup authorization Kuapir.configure do |config| # Configure API key authorization: ApiKeyAuth config.api_key['ApiKeyAuth'] = 'YOUR API KEY' # Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil) # config.api_key_prefix['ApiKeyAuth'] = 'Bearer' end api_instance = Kuapir::FilmsApi.new year = 56 # Integer | год релиза month = 'JANUARY' # String | месяц релиза opts = { page: 56 # Integer | номер страницы } begin # получить список цифровых релизов result = api_instance.api_v21_films_releases_get(year, month, opts) p result rescue Kuapir::ApiError => e puts "Error when calling FilmsApi->api_v21_films_releases_get: #{e}" end ``` #### Using the api_v21_films_releases_get_with_http_info variant This returns an Array which contains the response data, status code and headers. > , Integer, Hash)> api_v21_films_releases_get_with_http_info(year, month, opts) ```ruby begin # получить список цифровых релизов data, status_code, headers = api_instance.api_v21_films_releases_get_with_http_info(year, month, opts) p status_code # => 2xx p headers # => { ... } p data # => rescue Kuapir::ApiError => e puts "Error when calling FilmsApi->api_v21_films_releases_get_with_http_info: #{e}" end ``` ### Parameters | Name | Type | Description | Notes | | ---- | ---- | ----------- | ----- | | **year** | **Integer** | год релиза | | | **month** | **String** | месяц релиза | | | **page** | **Integer** | номер страницы | [optional][default to 1] | ### Return type [**DigitalReleaseResponse**](DigitalReleaseResponse.md) ### Authorization [ApiKeyAuth](../README.md#ApiKeyAuth) ### HTTP request headers - **Content-Type**: Not defined - **Accept**: application/json ## api_v21_films_search_by_keyword_get > api_v21_films_search_by_keyword_get(keyword, opts) получить список фильмов по ключевым словам Возвращает список фильмов с пагинацией. Каждая страница содержит не более чем 20 фильмов. ### Examples ```ruby require 'time' require 'kuapir' # setup authorization Kuapir.configure do |config| # Configure API key authorization: ApiKeyAuth config.api_key['ApiKeyAuth'] = 'YOUR API KEY' # Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil) # config.api_key_prefix['ApiKeyAuth'] = 'Bearer' end api_instance = Kuapir::FilmsApi.new keyword = 'keyword_example' # String | ключивые слова для поиска opts = { page: 56 # Integer | номер страницы } begin # получить список фильмов по ключевым словам result = api_instance.api_v21_films_search_by_keyword_get(keyword, opts) p result rescue Kuapir::ApiError => e puts "Error when calling FilmsApi->api_v21_films_search_by_keyword_get: #{e}" end ``` #### Using the api_v21_films_search_by_keyword_get_with_http_info variant This returns an Array which contains the response data, status code and headers. > , Integer, Hash)> api_v21_films_search_by_keyword_get_with_http_info(keyword, opts) ```ruby begin # получить список фильмов по ключевым словам data, status_code, headers = api_instance.api_v21_films_search_by_keyword_get_with_http_info(keyword, opts) p status_code # => 2xx p headers # => { ... } p data # => rescue Kuapir::ApiError => e puts "Error when calling FilmsApi->api_v21_films_search_by_keyword_get_with_http_info: #{e}" end ``` ### Parameters | Name | Type | Description | Notes | | ---- | ---- | ----------- | ----- | | **keyword** | **String** | ключивые слова для поиска | | | **page** | **Integer** | номер страницы | [optional][default to 1] | ### Return type [**FilmSearchResponse**](FilmSearchResponse.md) ### Authorization [ApiKeyAuth](../README.md#ApiKeyAuth) ### HTTP request headers - **Content-Type**: Not defined - **Accept**: application/json ## api_v22_films_filters_get > api_v22_films_filters_get получить id стран и жанров для использования в /api/v2.2/films Возвращает список id стран и жанров, которые могут быть использованы в /api/v2.2/films ### Examples ```ruby require 'time' require 'kuapir' # setup authorization Kuapir.configure do |config| # Configure API key authorization: ApiKeyAuth config.api_key['ApiKeyAuth'] = 'YOUR API KEY' # Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil) # config.api_key_prefix['ApiKeyAuth'] = 'Bearer' end api_instance = Kuapir::FilmsApi.new begin # получить id стран и жанров для использования в /api/v2.2/films result = api_instance.api_v22_films_filters_get p result rescue Kuapir::ApiError => e puts "Error when calling FilmsApi->api_v22_films_filters_get: #{e}" end ``` #### Using the api_v22_films_filters_get_with_http_info variant This returns an Array which contains the response data, status code and headers. > , Integer, Hash)> api_v22_films_filters_get_with_http_info ```ruby begin # получить id стран и жанров для использования в /api/v2.2/films data, status_code, headers = api_instance.api_v22_films_filters_get_with_http_info p status_code # => 2xx p headers # => { ... } p data # => rescue Kuapir::ApiError => e puts "Error when calling FilmsApi->api_v22_films_filters_get_with_http_info: #{e}" end ``` ### Parameters This endpoint does not need any parameter. ### Return type [**FiltersResponse**](FiltersResponse.md) ### Authorization [ApiKeyAuth](../README.md#ApiKeyAuth) ### HTTP request headers - **Content-Type**: Not defined - **Accept**: application/json ## api_v22_films_get > api_v22_films_get(opts) получить список фильмов по различным фильтрам Возвращает список фильмов с пагинацией. Каждая страница содержит не более чем 20 фильмов. Данный эндпоинт не возращает более 400 фильмов. Используй /api/v2.2/films/filters чтобы получить id стран и жанров. ### Examples ```ruby require 'time' require 'kuapir' # setup authorization Kuapir.configure do |config| # Configure API key authorization: ApiKeyAuth config.api_key['ApiKeyAuth'] = 'YOUR API KEY' # Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil) # config.api_key_prefix['ApiKeyAuth'] = 'Bearer' end api_instance = Kuapir::FilmsApi.new opts = { countries: [37], # Array | список id стран разделенные запятой. Например countries=1,2,3. На данный момент можно указать не более одной страны. genres: [37], # Array | список id жанров разделенные запятой. Например genres=1,2,3. На данный момент можно указать не более одного жанра. order: 'RATING', # String | сортировка type: 'FILM', # String | тип фильма rating_from: 56, # Integer | минимальный рейтинг rating_to: 56, # Integer | максимальный рейтинг year_from: 56, # Integer | минимальный год year_to: 56, # Integer | максимальный год imdb_id: 'imdb_id_example', # String | imdb id keyword: 'keyword_example', # String | ключевое слово, которое встречается в названии фильма page: 56 # Integer | номер страницы } begin # получить список фильмов по различным фильтрам result = api_instance.api_v22_films_get(opts) p result rescue Kuapir::ApiError => e puts "Error when calling FilmsApi->api_v22_films_get: #{e}" end ``` #### Using the api_v22_films_get_with_http_info variant This returns an Array which contains the response data, status code and headers. > , Integer, Hash)> api_v22_films_get_with_http_info(opts) ```ruby begin # получить список фильмов по различным фильтрам data, status_code, headers = api_instance.api_v22_films_get_with_http_info(opts) p status_code # => 2xx p headers # => { ... } p data # => rescue Kuapir::ApiError => e puts "Error when calling FilmsApi->api_v22_films_get_with_http_info: #{e}" end ``` ### Parameters | Name | Type | Description | Notes | | ---- | ---- | ----------- | ----- | | **countries** | [**Array<Integer>**](Integer.md) | список id стран разделенные запятой. Например <i>countries=1,2,3</i>. На данный момент можно указать не более одной страны. | [optional] | | **genres** | [**Array<Integer>**](Integer.md) | список id жанров разделенные запятой. Например <i>genres=1,2,3</i>. На данный момент можно указать не более одного жанра. | [optional] | | **order** | **String** | сортировка | [optional][default to 'RATING'] | | **type** | **String** | тип фильма | [optional][default to 'ALL'] | | **rating_from** | **Integer** | минимальный рейтинг | [optional][default to 0] | | **rating_to** | **Integer** | максимальный рейтинг | [optional][default to 10] | | **year_from** | **Integer** | минимальный год | [optional][default to 1000] | | **year_to** | **Integer** | максимальный год | [optional][default to 3000] | | **imdb_id** | **String** | imdb id | [optional] | | **keyword** | **String** | ключевое слово, которое встречается в названии фильма | [optional] | | **page** | **Integer** | номер страницы | [optional][default to 1] | ### Return type [**FilmSearchByFiltersResponse**](FilmSearchByFiltersResponse.md) ### Authorization [ApiKeyAuth](../README.md#ApiKeyAuth) ### HTTP request headers - **Content-Type**: Not defined - **Accept**: application/json ## api_v22_films_id_box_office_get > api_v22_films_id_box_office_get(id) получить данные о бюджете и сборах фильма по kinopoisk film id Данный эндпоинт возвращает данные о бюджете и сборах. ### Examples ```ruby require 'time' require 'kuapir' # setup authorization Kuapir.configure do |config| # Configure API key authorization: ApiKeyAuth config.api_key['ApiKeyAuth'] = 'YOUR API KEY' # Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil) # config.api_key_prefix['ApiKeyAuth'] = 'Bearer' end api_instance = Kuapir::FilmsApi.new id = 56 # Integer | kinopoisk film id begin # получить данные о бюджете и сборах фильма по kinopoisk film id result = api_instance.api_v22_films_id_box_office_get(id) p result rescue Kuapir::ApiError => e puts "Error when calling FilmsApi->api_v22_films_id_box_office_get: #{e}" end ``` #### Using the api_v22_films_id_box_office_get_with_http_info variant This returns an Array which contains the response data, status code and headers. > , Integer, Hash)> api_v22_films_id_box_office_get_with_http_info(id) ```ruby begin # получить данные о бюджете и сборах фильма по kinopoisk film id data, status_code, headers = api_instance.api_v22_films_id_box_office_get_with_http_info(id) p status_code # => 2xx p headers # => { ... } p data # => rescue Kuapir::ApiError => e puts "Error when calling FilmsApi->api_v22_films_id_box_office_get_with_http_info: #{e}" end ``` ### Parameters | Name | Type | Description | Notes | | ---- | ---- | ----------- | ----- | | **id** | **Integer** | kinopoisk film id | | ### Return type [**BoxOfficeResponse**](BoxOfficeResponse.md) ### Authorization [ApiKeyAuth](../README.md#ApiKeyAuth) ### HTTP request headers - **Content-Type**: Not defined - **Accept**: application/json ## api_v22_films_id_distributions_get > api_v22_films_id_distributions_get(id) получить данные о прокате фильма по kinopoisk film id Данный эндпоинт возвращает данные о прокате в разных странах. ### Examples ```ruby require 'time' require 'kuapir' # setup authorization Kuapir.configure do |config| # Configure API key authorization: ApiKeyAuth config.api_key['ApiKeyAuth'] = 'YOUR API KEY' # Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil) # config.api_key_prefix['ApiKeyAuth'] = 'Bearer' end api_instance = Kuapir::FilmsApi.new id = 56 # Integer | kinopoisk film id begin # получить данные о прокате фильма по kinopoisk film id result = api_instance.api_v22_films_id_distributions_get(id) p result rescue Kuapir::ApiError => e puts "Error when calling FilmsApi->api_v22_films_id_distributions_get: #{e}" end ``` #### Using the api_v22_films_id_distributions_get_with_http_info variant This returns an Array which contains the response data, status code and headers. > , Integer, Hash)> api_v22_films_id_distributions_get_with_http_info(id) ```ruby begin # получить данные о прокате фильма по kinopoisk film id data, status_code, headers = api_instance.api_v22_films_id_distributions_get_with_http_info(id) p status_code # => 2xx p headers # => { ... } p data # => rescue Kuapir::ApiError => e puts "Error when calling FilmsApi->api_v22_films_id_distributions_get_with_http_info: #{e}" end ``` ### Parameters | Name | Type | Description | Notes | | ---- | ---- | ----------- | ----- | | **id** | **Integer** | kinopoisk film id | | ### Return type [**DistributionResponse**](DistributionResponse.md) ### Authorization [ApiKeyAuth](../README.md#ApiKeyAuth) ### HTTP request headers - **Content-Type**: Not defined - **Accept**: application/json ## api_v22_films_id_facts_get > api_v22_films_id_facts_get(id) получить данные о фактах и ошибках в фильме по kinopoisk film id Данный эндпоинт возвращает список фактов и ошибок в фильме.
type - FACT, обозначает интересный факт о фильме.
type - BLOOPER, обозначает ошибку в фильме. ### Examples ```ruby require 'time' require 'kuapir' # setup authorization Kuapir.configure do |config| # Configure API key authorization: ApiKeyAuth config.api_key['ApiKeyAuth'] = 'YOUR API KEY' # Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil) # config.api_key_prefix['ApiKeyAuth'] = 'Bearer' end api_instance = Kuapir::FilmsApi.new id = 56 # Integer | kinopoisk film id begin # получить данные о фактах и ошибках в фильме по kinopoisk film id result = api_instance.api_v22_films_id_facts_get(id) p result rescue Kuapir::ApiError => e puts "Error when calling FilmsApi->api_v22_films_id_facts_get: #{e}" end ``` #### Using the api_v22_films_id_facts_get_with_http_info variant This returns an Array which contains the response data, status code and headers. > , Integer, Hash)> api_v22_films_id_facts_get_with_http_info(id) ```ruby begin # получить данные о фактах и ошибках в фильме по kinopoisk film id data, status_code, headers = api_instance.api_v22_films_id_facts_get_with_http_info(id) p status_code # => 2xx p headers # => { ... } p data # => rescue Kuapir::ApiError => e puts "Error when calling FilmsApi->api_v22_films_id_facts_get_with_http_info: #{e}" end ``` ### Parameters | Name | Type | Description | Notes | | ---- | ---- | ----------- | ----- | | **id** | **Integer** | kinopoisk film id | | ### Return type [**FactResponse**](FactResponse.md) ### Authorization [ApiKeyAuth](../README.md#ApiKeyAuth) ### HTTP request headers - **Content-Type**: Not defined - **Accept**: application/json ## api_v22_films_id_get > api_v22_films_id_get(id) получить данные о фильме по kinopoisk id Данный эндпоинт возвращает базовые данные о фильме. Поле lastSync показывает дату последнего обновления данных. ### Examples ```ruby require 'time' require 'kuapir' # setup authorization Kuapir.configure do |config| # Configure API key authorization: ApiKeyAuth config.api_key['ApiKeyAuth'] = 'YOUR API KEY' # Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil) # config.api_key_prefix['ApiKeyAuth'] = 'Bearer' end api_instance = Kuapir::FilmsApi.new id = 56 # Integer | kinopoisk film id begin # получить данные о фильме по kinopoisk id result = api_instance.api_v22_films_id_get(id) p result rescue Kuapir::ApiError => e puts "Error when calling FilmsApi->api_v22_films_id_get: #{e}" end ``` #### Using the api_v22_films_id_get_with_http_info variant This returns an Array which contains the response data, status code and headers. > , Integer, Hash)> api_v22_films_id_get_with_http_info(id) ```ruby begin # получить данные о фильме по kinopoisk id data, status_code, headers = api_instance.api_v22_films_id_get_with_http_info(id) p status_code # => 2xx p headers # => { ... } p data # => rescue Kuapir::ApiError => e puts "Error when calling FilmsApi->api_v22_films_id_get_with_http_info: #{e}" end ``` ### Parameters | Name | Type | Description | Notes | | ---- | ---- | ----------- | ----- | | **id** | **Integer** | kinopoisk film id | | ### Return type [**Film**](Film.md) ### Authorization [ApiKeyAuth](../README.md#ApiKeyAuth) ### HTTP request headers - **Content-Type**: Not defined - **Accept**: application/json ## api_v22_films_id_images_get > api_v22_films_id_images_get(id, opts) получить изображения(кадры, постеры, фан-арты, обои и т.д.) связанные с фильмом по kinopoisk film id Данный эндпоинт возвращает изображения связанные с фильмом с пагинацией. Каждая страница содержит не более чем 20 фильмов.
Доступные изображения:
  • STILL - кадры
  • SHOOTING - изображения со съемок
  • POSTER - постеры
  • FAN_ART - фан-арты
  • PROMO - промо
  • CONCEPT - концепт-арты
  • WALLPAPER - обои
  • COVER - обложки
  • SCREENSHOT - скриншоты
### Examples ```ruby require 'time' require 'kuapir' # setup authorization Kuapir.configure do |config| # Configure API key authorization: ApiKeyAuth config.api_key['ApiKeyAuth'] = 'YOUR API KEY' # Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil) # config.api_key_prefix['ApiKeyAuth'] = 'Bearer' end api_instance = Kuapir::FilmsApi.new id = 56 # Integer | kinopoisk film id opts = { type: 'STILL', # String | тип изображения page: 56 # Integer | номер страницы } begin # получить изображения(кадры, постеры, фан-арты, обои и т.д.) связанные с фильмом по kinopoisk film id result = api_instance.api_v22_films_id_images_get(id, opts) p result rescue Kuapir::ApiError => e puts "Error when calling FilmsApi->api_v22_films_id_images_get: #{e}" end ``` #### Using the api_v22_films_id_images_get_with_http_info variant This returns an Array which contains the response data, status code and headers. > , Integer, Hash)> api_v22_films_id_images_get_with_http_info(id, opts) ```ruby begin # получить изображения(кадры, постеры, фан-арты, обои и т.д.) связанные с фильмом по kinopoisk film id data, status_code, headers = api_instance.api_v22_films_id_images_get_with_http_info(id, opts) p status_code # => 2xx p headers # => { ... } p data # => rescue Kuapir::ApiError => e puts "Error when calling FilmsApi->api_v22_films_id_images_get_with_http_info: #{e}" end ``` ### Parameters | Name | Type | Description | Notes | | ---- | ---- | ----------- | ----- | | **id** | **Integer** | kinopoisk film id | | | **type** | **String** | тип изображения | [optional][default to 'STILL'] | | **page** | **Integer** | номер страницы | [optional][default to 1] | ### Return type [**ImageResponse**](ImageResponse.md) ### Authorization [ApiKeyAuth](../README.md#ApiKeyAuth) ### HTTP request headers - **Content-Type**: Not defined - **Accept**: application/json ## api_v22_films_id_seasons_get > api_v22_films_id_seasons_get(id) получить данные о сезонах для сериала по kinopoisk film id Данный эндпоинт возвращает данные о сезонах для сериала. ### Examples ```ruby require 'time' require 'kuapir' # setup authorization Kuapir.configure do |config| # Configure API key authorization: ApiKeyAuth config.api_key['ApiKeyAuth'] = 'YOUR API KEY' # Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil) # config.api_key_prefix['ApiKeyAuth'] = 'Bearer' end api_instance = Kuapir::FilmsApi.new id = 56 # Integer | kinopoisk film id begin # получить данные о сезонах для сериала по kinopoisk film id result = api_instance.api_v22_films_id_seasons_get(id) p result rescue Kuapir::ApiError => e puts "Error when calling FilmsApi->api_v22_films_id_seasons_get: #{e}" end ``` #### Using the api_v22_films_id_seasons_get_with_http_info variant This returns an Array which contains the response data, status code and headers. > , Integer, Hash)> api_v22_films_id_seasons_get_with_http_info(id) ```ruby begin # получить данные о сезонах для сериала по kinopoisk film id data, status_code, headers = api_instance.api_v22_films_id_seasons_get_with_http_info(id) p status_code # => 2xx p headers # => { ... } p data # => rescue Kuapir::ApiError => e puts "Error when calling FilmsApi->api_v22_films_id_seasons_get_with_http_info: #{e}" end ``` ### Parameters | Name | Type | Description | Notes | | ---- | ---- | ----------- | ----- | | **id** | **Integer** | kinopoisk film id | | ### Return type [**SeasonResponse**](SeasonResponse.md) ### Authorization [ApiKeyAuth](../README.md#ApiKeyAuth) ### HTTP request headers - **Content-Type**: Not defined - **Accept**: application/json ## api_v22_films_id_similars_get > api_v22_films_id_similars_get(id) получить список похожих фильмов по kinopoisk film id ### Examples ```ruby require 'time' require 'kuapir' # setup authorization Kuapir.configure do |config| # Configure API key authorization: ApiKeyAuth config.api_key['ApiKeyAuth'] = 'YOUR API KEY' # Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil) # config.api_key_prefix['ApiKeyAuth'] = 'Bearer' end api_instance = Kuapir::FilmsApi.new id = 56 # Integer | kinopoisk film id begin # получить список похожих фильмов по kinopoisk film id result = api_instance.api_v22_films_id_similars_get(id) p result rescue Kuapir::ApiError => e puts "Error when calling FilmsApi->api_v22_films_id_similars_get: #{e}" end ``` #### Using the api_v22_films_id_similars_get_with_http_info variant This returns an Array which contains the response data, status code and headers. > , Integer, Hash)> api_v22_films_id_similars_get_with_http_info(id) ```ruby begin # получить список похожих фильмов по kinopoisk film id data, status_code, headers = api_instance.api_v22_films_id_similars_get_with_http_info(id) p status_code # => 2xx p headers # => { ... } p data # => rescue Kuapir::ApiError => e puts "Error when calling FilmsApi->api_v22_films_id_similars_get_with_http_info: #{e}" end ``` ### Parameters | Name | Type | Description | Notes | | ---- | ---- | ----------- | ----- | | **id** | **Integer** | kinopoisk film id | | ### Return type [**RelatedFilmResponse**](RelatedFilmResponse.md) ### Authorization [ApiKeyAuth](../README.md#ApiKeyAuth) ### HTTP request headers - **Content-Type**: Not defined - **Accept**: application/json ## api_v22_films_id_videos_get > api_v22_films_id_videos_get(id) получить трейлеры,тизеры,видео для фильма по kinopoisk film id Данный эндпоинт возвращает трейлеры,тизеры,видео для фильма по kinopoisk film id. В данный момент доступно два site:
  • YOUTUBE - в этом случае url это просто ссылка на youtube видео.
  • KINOPOISK_WIDGET - в этом случае url это ссылка на кинопоиск виджет. Например https://widgets.kinopoisk.ru/discovery/trailer/123573?onlyPlayer=1&autoplay=1&cover=1. Если вы хотите вставить этот виджет на вашу страницу, вы можете сделать следующее:

    <script src="https://unpkg.com/@ungap/custom-elements-builtin"></script>
    <script type="module" src="https://unpkg.com/x-frame-bypass"></script>
    <iframe is="x-frame-bypass" src="https://widgets.kinopoisk.ru/discovery/trailer/167560?onlyPlayer=1&autoplay=1&cover=1" width="500" height="500"></iframe>
### Examples ```ruby require 'time' require 'kuapir' # setup authorization Kuapir.configure do |config| # Configure API key authorization: ApiKeyAuth config.api_key['ApiKeyAuth'] = 'YOUR API KEY' # Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil) # config.api_key_prefix['ApiKeyAuth'] = 'Bearer' end api_instance = Kuapir::FilmsApi.new id = 56 # Integer | kinopoisk film id begin # получить трейлеры,тизеры,видео для фильма по kinopoisk film id result = api_instance.api_v22_films_id_videos_get(id) p result rescue Kuapir::ApiError => e puts "Error when calling FilmsApi->api_v22_films_id_videos_get: #{e}" end ``` #### Using the api_v22_films_id_videos_get_with_http_info variant This returns an Array which contains the response data, status code and headers. > , Integer, Hash)> api_v22_films_id_videos_get_with_http_info(id) ```ruby begin # получить трейлеры,тизеры,видео для фильма по kinopoisk film id data, status_code, headers = api_instance.api_v22_films_id_videos_get_with_http_info(id) p status_code # => 2xx p headers # => { ... } p data # => rescue Kuapir::ApiError => e puts "Error when calling FilmsApi->api_v22_films_id_videos_get_with_http_info: #{e}" end ``` ### Parameters | Name | Type | Description | Notes | | ---- | ---- | ----------- | ----- | | **id** | **Integer** | kinopoisk film id | | ### Return type [**VideoResponse**](VideoResponse.md) ### Authorization [ApiKeyAuth](../README.md#ApiKeyAuth) ### HTTP request headers - **Content-Type**: Not defined - **Accept**: application/json ## api_v22_films_premieres_get > api_v22_films_premieres_get(year, month) получить список кинопремьер Данный эндпоинт возвращает список кинопремьер. Например https://www.kinopoisk.ru/premiere/ ### Examples ```ruby require 'time' require 'kuapir' # setup authorization Kuapir.configure do |config| # Configure API key authorization: ApiKeyAuth config.api_key['ApiKeyAuth'] = 'YOUR API KEY' # Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil) # config.api_key_prefix['ApiKeyAuth'] = 'Bearer' end api_instance = Kuapir::FilmsApi.new year = 56 # Integer | год релиза month = 'JANUARY' # String | месяц релиза begin # получить список кинопремьер result = api_instance.api_v22_films_premieres_get(year, month) p result rescue Kuapir::ApiError => e puts "Error when calling FilmsApi->api_v22_films_premieres_get: #{e}" end ``` #### Using the api_v22_films_premieres_get_with_http_info variant This returns an Array which contains the response data, status code and headers. > , Integer, Hash)> api_v22_films_premieres_get_with_http_info(year, month) ```ruby begin # получить список кинопремьер data, status_code, headers = api_instance.api_v22_films_premieres_get_with_http_info(year, month) p status_code # => 2xx p headers # => { ... } p data # => rescue Kuapir::ApiError => e puts "Error when calling FilmsApi->api_v22_films_premieres_get_with_http_info: #{e}" end ``` ### Parameters | Name | Type | Description | Notes | | ---- | ---- | ----------- | ----- | | **year** | **Integer** | год релиза | | | **month** | **String** | месяц релиза | | ### Return type [**PremiereResponse**](PremiereResponse.md) ### Authorization [ApiKeyAuth](../README.md#ApiKeyAuth) ### HTTP request headers - **Content-Type**: Not defined - **Accept**: application/json ## api_v22_films_top_get > api_v22_films_top_get(opts) получить список фильмов из различных топов или коллекций. Например https://www.kinopoisk.ru/top/lists/58/ Возвращает список фильмов с пагинацией. Каждая страница содержит не более чем 20 фильмов. ### Examples ```ruby require 'time' require 'kuapir' # setup authorization Kuapir.configure do |config| # Configure API key authorization: ApiKeyAuth config.api_key['ApiKeyAuth'] = 'YOUR API KEY' # Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil) # config.api_key_prefix['ApiKeyAuth'] = 'Bearer' end api_instance = Kuapir::FilmsApi.new opts = { type: 'TOP_250_BEST_FILMS', # String | тип топа или коллекции page: 56 # Integer | номер страницы } begin # получить список фильмов из различных топов или коллекций. Например https://www.kinopoisk.ru/top/lists/58/ result = api_instance.api_v22_films_top_get(opts) p result rescue Kuapir::ApiError => e puts "Error when calling FilmsApi->api_v22_films_top_get: #{e}" end ``` #### Using the api_v22_films_top_get_with_http_info variant This returns an Array which contains the response data, status code and headers. > , Integer, Hash)> api_v22_films_top_get_with_http_info(opts) ```ruby begin # получить список фильмов из различных топов или коллекций. Например https://www.kinopoisk.ru/top/lists/58/ data, status_code, headers = api_instance.api_v22_films_top_get_with_http_info(opts) p status_code # => 2xx p headers # => { ... } p data # => rescue Kuapir::ApiError => e puts "Error when calling FilmsApi->api_v22_films_top_get_with_http_info: #{e}" end ``` ### Parameters | Name | Type | Description | Notes | | ---- | ---- | ----------- | ----- | | **type** | **String** | тип топа или коллекции | [optional][default to 'TOP_250_BEST_FILMS'] | | **page** | **Integer** | номер страницы | [optional][default to 1] | ### Return type [**FilmTopResponse**](FilmTopResponse.md) ### Authorization [ApiKeyAuth](../README.md#ApiKeyAuth) ### HTTP request headers - **Content-Type**: Not defined - **Accept**: application/json