All URIs are relative to https://kinopoiskapiunofficial.tech
Method | HTTP request | Description |
---|---|---|
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 | GET /api/v2.1/films/releases | получить список цифровых релизов |
api_v21_films_search_by_keyword_get | GET /api/v2.1/films/search-by-keyword | получить список фильмов по ключевым словам |
api_v22_films_filters_get | GET /api/v2.2/films/filters | получить id стран и жанров для использования в /api/v2.2/films |
api_v22_films_get | GET /api/v2.2/films | получить список фильмов по различным фильтрам |
api_v22_films_id_box_office_get | GET /api/v2.2/films/{id}/box_office | получить данные о бюджете и сборах фильма по kinopoisk film id |
api_v22_films_id_distributions_get | GET /api/v2.2/films/{id}/distributions | получить данные о прокате фильма по kinopoisk film id |
api_v22_films_id_facts_get | GET /api/v2.2/films/{id}/facts | получить данные о фактах и ошибках в фильме по kinopoisk film id |
api_v22_films_id_get | GET /api/v2.2/films/{id} | получить данные о фильме по kinopoisk id |
api_v22_films_id_images_get | GET /api/v2.2/films/{id}/images | получить изображения(кадры, постеры, фан-арты, обои и т.д.) связанные с фильмом по kinopoisk film id |
api_v22_films_id_seasons_get | GET /api/v2.2/films/{id}/seasons | получить данные о сезонах для сериала по kinopoisk film id |
api_v22_films_id_similars_get | GET /api/v2.2/films/{id}/similars | получить список похожих фильмов по kinopoisk film id |
api_v22_films_id_videos_get | GET /api/v2.2/films/{id}/videos | получить трейлеры,тизеры,видео для фильма по kinopoisk film id |
api_v22_films_premieres_get | GET /api/v2.2/films/premieres | получить список кинопремьер |
api_v22_films_top_get | GET /api/v2.2/films/top | получить список фильмов из различных топов или коллекций. Например https://www.kinopoisk.ru/top/lists/58/ |
<Array> api_v21_films_id_sequels_and_prequels_get(id)
получить сиквелы и приквелы для фильма по kinopoisk film id
tbd
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
This returns an Array which contains the response data, status code and headers.
<Array(<Array>, Integer, Hash)> api_v21_films_id_sequels_and_prequels_get_with_http_info(id)
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 # => <Array<FilmSequelsAndPrequelsResponse>>
rescue Kuapir::ApiError => e
puts "Error when calling FilmsApi->api_v21_films_id_sequels_and_prequels_get_with_http_info: #{e}"
end
Name | Type | Description | Notes |
---|---|---|---|
id | Integer | kinopoisk film id |
Array<FilmSequelsAndPrequelsResponse>
- Content-Type: Not defined
- Accept: application/json
api_v21_films_releases_get(year, month, opts)
получить список цифровых релизов
Данный эндпоинт возвращает список цифровых релизов. Например https://www.kinopoisk.ru/comingsoon/digital/
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
This returns an Array which contains the response data, status code and headers.
<Array(, Integer, Hash)> api_v21_films_releases_get_with_http_info(year, month, opts)
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 # => <DigitalReleaseResponse>
rescue Kuapir::ApiError => e
puts "Error when calling FilmsApi->api_v21_films_releases_get_with_http_info: #{e}"
end
Name | Type | Description | Notes |
---|---|---|---|
year | Integer | год релиза | |
month | String | месяц релиза | |
page | Integer | номер страницы | [optional][default to 1] |
- Content-Type: Not defined
- Accept: application/json
api_v21_films_search_by_keyword_get(keyword, opts)
получить список фильмов по ключевым словам
Возвращает список фильмов с пагинацией. Каждая страница содержит не более чем 20 фильмов.
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
This returns an Array which contains the response data, status code and headers.
<Array(, Integer, Hash)> api_v21_films_search_by_keyword_get_with_http_info(keyword, opts)
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 # => <FilmSearchResponse>
rescue Kuapir::ApiError => e
puts "Error when calling FilmsApi->api_v21_films_search_by_keyword_get_with_http_info: #{e}"
end
Name | Type | Description | Notes |
---|---|---|---|
keyword | String | ключивые слова для поиска | |
page | Integer | номер страницы | [optional][default to 1] |
- Content-Type: Not defined
- Accept: application/json
api_v22_films_filters_get
получить id стран и жанров для использования в /api/v2.2/films
Возвращает список id стран и жанров, которые могут быть использованы в /api/v2.2/films
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
This returns an Array which contains the response data, status code and headers.
<Array(, Integer, Hash)> api_v22_films_filters_get_with_http_info
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 # => <FiltersResponse>
rescue Kuapir::ApiError => e
puts "Error when calling FilmsApi->api_v22_films_filters_get_with_http_info: #{e}"
end
This endpoint does not need any parameter.
- Content-Type: Not defined
- Accept: application/json
api_v22_films_get(opts)
получить список фильмов по различным фильтрам
Возвращает список фильмов с пагинацией. Каждая страница содержит не более чем 20 фильмов. Данный эндпоинт не возращает более 400 фильмов. Используй /api/v2.2/films/filters чтобы получить id стран и жанров.
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<Integer> | список id стран разделенные запятой. Например <i>countries=1,2,3</i>. На данный момент можно указать не более одной страны.
genres: [37], # Array<Integer> | список id жанров разделенные запятой. Например <i>genres=1,2,3</i>. На данный момент можно указать не более одного жанра.
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
This returns an Array which contains the response data, status code and headers.
<Array(, Integer, Hash)> api_v22_films_get_with_http_info(opts)
begin
# получить список фильмов по различным фильтрам
data, status_code, headers = api_instance.api_v22_films_get_with_http_info(opts)
p status_code # => 2xx
p headers # => { ... }
p data # => <FilmSearchByFiltersResponse>
rescue Kuapir::ApiError => e
puts "Error when calling FilmsApi->api_v22_films_get_with_http_info: #{e}"
end
Name | Type | Description | Notes |
---|---|---|---|
countries | Array<Integer> | список id стран разделенные запятой. Например <i>countries=1,2,3</i>. На данный момент можно указать не более одной страны. | [optional] |
genres | Array<Integer> | список 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] |
- Content-Type: Not defined
- Accept: application/json
api_v22_films_id_box_office_get(id)
получить данные о бюджете и сборах фильма по kinopoisk film id
Данный эндпоинт возвращает данные о бюджете и сборах.
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
This returns an Array which contains the response data, status code and headers.
<Array(, Integer, Hash)> api_v22_films_id_box_office_get_with_http_info(id)
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 # => <BoxOfficeResponse>
rescue Kuapir::ApiError => e
puts "Error when calling FilmsApi->api_v22_films_id_box_office_get_with_http_info: #{e}"
end
Name | Type | Description | Notes |
---|---|---|---|
id | Integer | kinopoisk film id |
- Content-Type: Not defined
- Accept: application/json
api_v22_films_id_distributions_get(id)
получить данные о прокате фильма по kinopoisk film id
Данный эндпоинт возвращает данные о прокате в разных странах.
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
This returns an Array which contains the response data, status code and headers.
<Array(, Integer, Hash)> api_v22_films_id_distributions_get_with_http_info(id)
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 # => <DistributionResponse>
rescue Kuapir::ApiError => e
puts "Error when calling FilmsApi->api_v22_films_id_distributions_get_with_http_info: #{e}"
end
Name | Type | Description | Notes |
---|---|---|---|
id | Integer | kinopoisk film id |
- Content-Type: Not defined
- Accept: application/json
api_v22_films_id_facts_get(id)
получить данные о фактах и ошибках в фильме по kinopoisk film id
Данный эндпоинт возвращает список фактов и ошибок в фильме.
type - FACT, обозначает интересный факт о фильме.
type - BLOOPER, обозначает ошибку в фильме.
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
This returns an Array which contains the response data, status code and headers.
<Array(, Integer, Hash)> api_v22_films_id_facts_get_with_http_info(id)
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 # => <FactResponse>
rescue Kuapir::ApiError => e
puts "Error when calling FilmsApi->api_v22_films_id_facts_get_with_http_info: #{e}"
end
Name | Type | Description | Notes |
---|---|---|---|
id | Integer | kinopoisk film id |
- Content-Type: Not defined
- Accept: application/json
api_v22_films_id_get(id)
получить данные о фильме по kinopoisk id
Данный эндпоинт возвращает базовые данные о фильме. Поле lastSync показывает дату последнего обновления данных.
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
This returns an Array which contains the response data, status code and headers.
<Array(, Integer, Hash)> api_v22_films_id_get_with_http_info(id)
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 # => <Film>
rescue Kuapir::ApiError => e
puts "Error when calling FilmsApi->api_v22_films_id_get_with_http_info: #{e}"
end
Name | Type | Description | Notes |
---|---|---|---|
id | Integer | kinopoisk film id |
- Content-Type: Not defined
- Accept: application/json
api_v22_films_id_images_get(id, opts)
получить изображения(кадры, постеры, фан-арты, обои и т.д.) связанные с фильмом по kinopoisk film id
Данный эндпоинт возвращает изображения связанные с фильмом с пагинацией. Каждая страница содержит не более чем 20 фильмов.
Доступные изображения:
- STILL - кадры
- SHOOTING - изображения со съемок
- POSTER - постеры
- FAN_ART - фан-арты
- PROMO - промо
- CONCEPT - концепт-арты
- WALLPAPER - обои
- COVER - обложки
- SCREENSHOT - скриншоты
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
This returns an Array which contains the response data, status code and headers.
<Array(, Integer, Hash)> api_v22_films_id_images_get_with_http_info(id, opts)
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 # => <ImageResponse>
rescue Kuapir::ApiError => e
puts "Error when calling FilmsApi->api_v22_films_id_images_get_with_http_info: #{e}"
end
Name | Type | Description | Notes |
---|---|---|---|
id | Integer | kinopoisk film id | |
type | String | тип изображения | [optional][default to 'STILL'] |
page | Integer | номер страницы | [optional][default to 1] |
- Content-Type: Not defined
- Accept: application/json
api_v22_films_id_seasons_get(id)
получить данные о сезонах для сериала по kinopoisk film id
Данный эндпоинт возвращает данные о сезонах для сериала.
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
This returns an Array which contains the response data, status code and headers.
<Array(, Integer, Hash)> api_v22_films_id_seasons_get_with_http_info(id)
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 # => <SeasonResponse>
rescue Kuapir::ApiError => e
puts "Error when calling FilmsApi->api_v22_films_id_seasons_get_with_http_info: #{e}"
end
Name | Type | Description | Notes |
---|---|---|---|
id | Integer | kinopoisk film id |
- Content-Type: Not defined
- Accept: application/json
api_v22_films_id_similars_get(id)
получить список похожих фильмов по kinopoisk film id
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
This returns an Array which contains the response data, status code and headers.
<Array(, Integer, Hash)> api_v22_films_id_similars_get_with_http_info(id)
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 # => <RelatedFilmResponse>
rescue Kuapir::ApiError => e
puts "Error when calling FilmsApi->api_v22_films_id_similars_get_with_http_info: #{e}"
end
Name | Type | Description | Notes |
---|---|---|---|
id | Integer | kinopoisk film id |
- Content-Type: Not defined
- Accept: application/json
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>
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
This returns an Array which contains the response data, status code and headers.
<Array(, Integer, Hash)> api_v22_films_id_videos_get_with_http_info(id)
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 # => <VideoResponse>
rescue Kuapir::ApiError => e
puts "Error when calling FilmsApi->api_v22_films_id_videos_get_with_http_info: #{e}"
end
Name | Type | Description | Notes |
---|---|---|---|
id | Integer | kinopoisk film id |
- Content-Type: Not defined
- Accept: application/json
api_v22_films_premieres_get(year, month)
получить список кинопремьер
Данный эндпоинт возвращает список кинопремьер. Например https://www.kinopoisk.ru/premiere/
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
This returns an Array which contains the response data, status code and headers.
<Array(, Integer, Hash)> api_v22_films_premieres_get_with_http_info(year, month)
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 # => <PremiereResponse>
rescue Kuapir::ApiError => e
puts "Error when calling FilmsApi->api_v22_films_premieres_get_with_http_info: #{e}"
end
Name | Type | Description | Notes |
---|---|---|---|
year | Integer | год релиза | |
month | String | месяц релиза |
- Content-Type: Not defined
- Accept: application/json
api_v22_films_top_get(opts)
получить список фильмов из различных топов или коллекций. Например https://www.kinopoisk.ru/top/lists/58/
Возвращает список фильмов с пагинацией. Каждая страница содержит не более чем 20 фильмов.
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
This returns an Array which contains the response data, status code and headers.
<Array(, Integer, Hash)> api_v22_films_top_get_with_http_info(opts)
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 # => <FilmTopResponse>
rescue Kuapir::ApiError => e
puts "Error when calling FilmsApi->api_v22_films_top_get_with_http_info: #{e}"
end
Name | Type | Description | Notes |
---|---|---|---|
type | String | тип топа или коллекции | [optional][default to 'TOP_250_BEST_FILMS'] |
page | Integer | номер страницы | [optional][default to 1] |
- Content-Type: Not defined
- Accept: application/json