Module: KinopoiskUnofficialApi

Defined in:
lib/kinopoisk_unofficial_api/endpoints.rb,
lib/kinopoisk_unofficial_api.rb,
lib/kinopoisk_unofficial_api/types.rb,
lib/kinopoisk_unofficial_api/client.rb,
lib/kinopoisk_unofficial_api/version.rb,
lib/kinopoisk_unofficial_api/types/base.rb,
lib/kinopoisk_unofficial_api/types/fact.rb,
lib/kinopoisk_unofficial_api/types/film.rb,
lib/kinopoisk_unofficial_api/types/award.rb,
lib/kinopoisk_unofficial_api/types/genre.rb,
lib/kinopoisk_unofficial_api/types/season.rb,
lib/kinopoisk_unofficial_api/configuration.rb,
lib/kinopoisk_unofficial_api/types/company.rb,
lib/kinopoisk_unofficial_api/types/country.rb,
lib/kinopoisk_unofficial_api/types/episode.rb,
lib/kinopoisk_unofficial_api/exceptions/base.rb,
lib/kinopoisk_unofficial_api/request_schemas.rb,
lib/kinopoisk_unofficial_api/types/box_office.rb,
lib/kinopoisk_unofficial_api/types/compactable.rb,
lib/kinopoisk_unofficial_api/types/award_person.rb,
lib/kinopoisk_unofficial_api/types/distribution.rb,
lib/kinopoisk_unofficial_api/types/fact_response.rb,
lib/kinopoisk_unofficial_api/request_schemas/base.rb,
lib/kinopoisk_unofficial_api/request_schemas/film.rb,
lib/kinopoisk_unofficial_api/types/award_response.rb,
lib/kinopoisk_unofficial_api/types/image_response.rb,
lib/kinopoisk_unofficial_api/types/staff_response.rb,
lib/kinopoisk_unofficial_api/types/video_response.rb,
lib/kinopoisk_unofficial_api/request_schemas/films.rb,
lib/kinopoisk_unofficial_api/request_schemas/staff.rb,
lib/kinopoisk_unofficial_api/types/person_response.rb,
lib/kinopoisk_unofficial_api/types/review_response.rb,
lib/kinopoisk_unofficial_api/types/season_response.rb,
lib/kinopoisk_unofficial_api/types/api_key_response.rb,
lib/kinopoisk_unofficial_api/types/filters_response.rb,
lib/kinopoisk_unofficial_api/types/pattern_matching.rb,
lib/kinopoisk_unofficial_api/request_schemas/api_key.rb,
lib/kinopoisk_unofficial_api/request_schemas/persons.rb,
lib/kinopoisk_unofficial_api/types/premiere_response.rb,
lib/kinopoisk_unofficial_api/exceptions/response_error.rb,
lib/kinopoisk_unofficial_api/types/box_office_response.rb,
lib/kinopoisk_unofficial_api/types/image_response/item.rb,
lib/kinopoisk_unofficial_api/types/video_response/item.rb,
lib/kinopoisk_unofficial_api/request_schemas/film_facts.rb,
lib/kinopoisk_unofficial_api/request_schemas/film_staff.rb,
lib/kinopoisk_unofficial_api/types/digital_release_item.rb,
lib/kinopoisk_unofficial_api/types/film_search_response.rb,
lib/kinopoisk_unofficial_api/types/media_posts_response.rb,
lib/kinopoisk_unofficial_api/types/person_response/film.rb,
lib/kinopoisk_unofficial_api/types/review_response/item.rb,
lib/kinopoisk_unofficial_api/request_schemas/film_awards.rb,
lib/kinopoisk_unofficial_api/request_schemas/film_images.rb,
lib/kinopoisk_unofficial_api/request_schemas/film_videos.rb,
lib/kinopoisk_unofficial_api/request_schemas/media_posts.rb,
lib/kinopoisk_unofficial_api/types/distribution_response.rb,
lib/kinopoisk_unofficial_api/types/related_film_response.rb,
lib/kinopoisk_unofficial_api/request_schemas/film_reviews.rb,
lib/kinopoisk_unofficial_api/request_schemas/film_seasons.rb,
lib/kinopoisk_unofficial_api/types/filters_response/genre.rb,
lib/kinopoisk_unofficial_api/types/person_response/spouse.rb,
lib/kinopoisk_unofficial_api/types/premiere_response_item.rb,
lib/kinopoisk_unofficial_api/request_schemas/film_similars.rb,
lib/kinopoisk_unofficial_api/request_schemas/kp_user_votes.rb,
lib/kinopoisk_unofficial_api/types/person_by_name_response.rb,
lib/kinopoisk_unofficial_api/request_schemas/film_premieres.rb,
lib/kinopoisk_unofficial_api/types/digital_release_response.rb,
lib/kinopoisk_unofficial_api/types/external_source_response.rb,
lib/kinopoisk_unofficial_api/types/film_collection_response.rb,
lib/kinopoisk_unofficial_api/types/filters_response/country.rb,
lib/kinopoisk_unofficial_api/request_schemas/film_box_office.rb,
lib/kinopoisk_unofficial_api/types/film_search_response/film.rb,
lib/kinopoisk_unofficial_api/types/media_posts_response/item.rb,
lib/kinopoisk_unofficial_api/request_schemas/film_collections.rb,
lib/kinopoisk_unofficial_api/types/related_film_response/item.rb,
lib/kinopoisk_unofficial_api/request_schemas/film_distributions.rb,
lib/kinopoisk_unofficial_api/types/api_key_response/daily_quota.rb,
lib/kinopoisk_unofficial_api/types/api_key_response/total_quota.rb,
lib/kinopoisk_unofficial_api/types/kinopoisk_user_vote_response.rb,
lib/kinopoisk_unofficial_api/types/person_by_name_response/item.rb,
lib/kinopoisk_unofficial_api/types/external_source_response/item.rb,
lib/kinopoisk_unofficial_api/types/film_collection_response/item.rb,
lib/kinopoisk_unofficial_api/request_schemas/film_external_sources.rb,
lib/kinopoisk_unofficial_api/types/film_search_by_filters_response.rb,
lib/kinopoisk_unofficial_api/request_schemas/search_film_by_keyword.rb,
lib/kinopoisk_unofficial_api/types/kinopoisk_user_vote_response/item.rb,
lib/kinopoisk_unofficial_api/types/film_sequels_and_prequels_response.rb,
lib/kinopoisk_unofficial_api/request_schemas/film_sequels_and_prequels.rb,
lib/kinopoisk_unofficial_api/types/film_search_by_filters_response/item.rb

Overview

rubocop:disable Metrics/ModuleLength

Defined Under Namespace

Modules: Exceptions, RequestSchemas, Types Classes: Client, Configuration

Constant Summary collapse

VERSION =
"1.0.0.1"
ENDPOINTS =
{
  film: {
    path: "/films/{id}",
    path_params: %w[id],
    response_type: Types::Film,
    version: "v2.2"
  }.freeze,
  film_seasons: {
    path: "/films/{id}/seasons",
    path_params: %w[id],
    response_type: Types::SeasonResponse,
    version: "v2.2"
  }.freeze,
  film_facts: {
    path: "/films/{id}/facts",
    path_params: %w[id],
    response_type: Types::FactResponse,
    version: "v2.2"
  }.freeze,
  film_distributions: {
    path: "/films/{id}/distributions",
    path_params: %w[id],
    response_type: Types::DistributionResponse,
    version: "v2.2"
  }.freeze,
  film_box_office: {
    path: "/films/{id}/box_office",
    path_params: %w[id],
    response_type: Types::BoxOfficeResponse,
    version: "v2.2"
  }.freeze,
  film_awards: {
    path: "/films/{id}/awards",
    path_params: %w[id],
    response_type: Types::AwardResponse,
    version: "v2.2"
  }.freeze,
  film_videos: {
    path: "/films/{id}/videos",
    path_params: %w[id],
    response_type: Types::VideoResponse,
    version: "v2.2"
  }.freeze,
  film_similars: {
    path: "/films/{id}/similars",
    path_params: %w[id],
    response_type: Types::RelatedFilmResponse,
    version: "v2.2"
  }.freeze,
  film_images: {
    path: "/films/{id}/images",
    path_params: %w[id],
    response_type: Types::ImageResponse,
    version: "v2.2"
  }.freeze,
  film_reviews: {
    path: "/films/{id}/reviews",
    path_params: %w[id],
    response_type: Types::ReviewResponse,
    version: "v2.2"
  }.freeze,
  film_external_sources: {
    path: "/films/{id}/external_sources",
    path_params: %w[id],
    response_type: Types::ExternalSourceResponse,
    version: "v2.2"
  }.freeze,
  film_collections: {
    path: "/films/collections",
    response_type: Types::FilmCollectionResponse,
    version: "v2.2"
  }.freeze,
  film_premieres: {
    path: "/films/premieres",
    response_type: Types::PremiereResponse,
    version: "v2.2"
  }.freeze,
  film_filters: {
    path: "/films/filters",
    response_type: Types::FiltersResponse,
    no_params: true,
    version: "v2.2"
  }.freeze,
  films: {
    path: "/films",
    response_type: Types::FilmSearchByFiltersResponse,
    version: "v2.2"
  }.freeze,
  film_sequels_and_prequels: {
    path: "/films/{id}/sequels_and_prequels",
    path_params: %w[id],
    response_type: Types::Array.of(Types::FilmSequelsAndPrequelsResponse),
    version: "v2.1"
  }.freeze,
  search_film_by_keyword: {
    path: "/films/search-by-keyword",
    response_type: Types::FilmSearchResponse,
    version: "v2.1"
  }.freeze,
  film_staff: {
    path: "/staff",
    response_type: Types::Array.of(Types::StaffResponse),
    version: "v1"
  }.freeze,
  staff: {
    path: "/staff/{id}",
    path_params: %w[id],
    response_type: Types::PersonResponse,
    version: "v1"
  }.freeze,
  persons: {
    path: "/persons",
    response_type: Types::PersonByNameResponse,
    version: "v1"
  }.freeze,
  kp_user_votes: {
    path: "/kp_users/{id}/votes",
    path_params: %w[id],
    response_type: Types::KinopoiskUserVoteResponse,
    version: "v1"
  }.freeze,
  api_key: {
    path: "/api_keys/{apiKey}",
    path_params: %w[apiKey],
    response_type: Types::ApiKeyResponse,
    version: "v1"
  }.freeze,
  media_posts: {
    path: "/media_posts",
    response_type: Types::MediaPostsResponse,
    version: "v1"
  }.freeze
}.freeze

Class Attribute Summary collapse

Class Method Summary collapse

Class Attribute Details

.configurationObject



18
19
20
# File 'lib/kinopoisk_unofficial_api.rb', line 18

def self.configuration
  @configuration ||= Configuration.new
end

Class Method Details

.configure {|configuration| ... } ⇒ Object

Yields:



22
23
24
# File 'lib/kinopoisk_unofficial_api.rb', line 22

def self.configure
  yield(configuration)
end