kinopoisk_dev_api 1.4.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (86) hide show
  1. checksums.yaml +7 -0
  2. data/.env.example +1 -0
  3. data/.rspec +3 -0
  4. data/.rubocop.yml +23 -0
  5. data/CHANGELOG.md +5 -0
  6. data/LICENSE.txt +21 -0
  7. data/README.md +118 -0
  8. data/Rakefile +17 -0
  9. data/data/type_attributes.json +1624 -0
  10. data/lib/kinopoisk_dev_api/client.rb +98 -0
  11. data/lib/kinopoisk_dev_api/configuration.rb +13 -0
  12. data/lib/kinopoisk_dev_api/endpoints.rb +75 -0
  13. data/lib/kinopoisk_dev_api/exceptions/base.rb +7 -0
  14. data/lib/kinopoisk_dev_api/exceptions/response_error.rb +35 -0
  15. data/lib/kinopoisk_dev_api/inflector.rb +16 -0
  16. data/lib/kinopoisk_dev_api/types/audience.rb +10 -0
  17. data/lib/kinopoisk_dev_api/types/base.rb +12 -0
  18. data/lib/kinopoisk_dev_api/types/birth_place.rb +9 -0
  19. data/lib/kinopoisk_dev_api/types/compactable.rb +19 -0
  20. data/lib/kinopoisk_dev_api/types/currency_value.rb +10 -0
  21. data/lib/kinopoisk_dev_api/types/death_place.rb +9 -0
  22. data/lib/kinopoisk_dev_api/types/episode_v1_4.rb +22 -0
  23. data/lib/kinopoisk_dev_api/types/external_id.rb +12 -0
  24. data/lib/kinopoisk_dev_api/types/fact_in_movie.rb +11 -0
  25. data/lib/kinopoisk_dev_api/types/fact_in_person.rb +9 -0
  26. data/lib/kinopoisk_dev_api/types/fees.rb +11 -0
  27. data/lib/kinopoisk_dev_api/types/image.rb +21 -0
  28. data/lib/kinopoisk_dev_api/types/image_docs_response_dto_v1_4.rb +16 -0
  29. data/lib/kinopoisk_dev_api/types/item_name.rb +9 -0
  30. data/lib/kinopoisk_dev_api/types/keyword.rb +15 -0
  31. data/lib/kinopoisk_dev_api/types/keyword_docs_response_dto_v1_4.rb +16 -0
  32. data/lib/kinopoisk_dev_api/types/linked_movie_v1_4.rb +21 -0
  33. data/lib/kinopoisk_dev_api/types/list.rb +18 -0
  34. data/lib/kinopoisk_dev_api/types/list_docs_response_dto_v1_4.rb +16 -0
  35. data/lib/kinopoisk_dev_api/types/logo.rb +9 -0
  36. data/lib/kinopoisk_dev_api/types/meili_person_entity_v1_4.rb +26 -0
  37. data/lib/kinopoisk_dev_api/types/movie.rb +11 -0
  38. data/lib/kinopoisk_dev_api/types/movie_award.rb +16 -0
  39. data/lib/kinopoisk_dev_api/types/movie_award_docs_response_dto.rb +13 -0
  40. data/lib/kinopoisk_dev_api/types/movie_docs_response_dto_v1_4.rb +16 -0
  41. data/lib/kinopoisk_dev_api/types/movie_dto_v1_4.rb +76 -0
  42. data/lib/kinopoisk_dev_api/types/movie_from_keyword.rb +9 -0
  43. data/lib/kinopoisk_dev_api/types/movie_from_studio.rb +9 -0
  44. data/lib/kinopoisk_dev_api/types/movie_in_person.rb +17 -0
  45. data/lib/kinopoisk_dev_api/types/name.rb +11 -0
  46. data/lib/kinopoisk_dev_api/types/network_item_v1_4.rb +13 -0
  47. data/lib/kinopoisk_dev_api/types/networks_v1_4.rb +12 -0
  48. data/lib/kinopoisk_dev_api/types/nomination.rb +10 -0
  49. data/lib/kinopoisk_dev_api/types/nomination_award.rb +10 -0
  50. data/lib/kinopoisk_dev_api/types/pattern_matching.rb +11 -0
  51. data/lib/kinopoisk_dev_api/types/person.rb +32 -0
  52. data/lib/kinopoisk_dev_api/types/person_award.rb +17 -0
  53. data/lib/kinopoisk_dev_api/types/person_award_docs_response_dto.rb +13 -0
  54. data/lib/kinopoisk_dev_api/types/person_docs_response_dto_v1_4.rb +16 -0
  55. data/lib/kinopoisk_dev_api/types/person_in_movie.rb +17 -0
  56. data/lib/kinopoisk_dev_api/types/possible_value_dto.rb +10 -0
  57. data/lib/kinopoisk_dev_api/types/premiere.rb +15 -0
  58. data/lib/kinopoisk_dev_api/types/profession.rb +9 -0
  59. data/lib/kinopoisk_dev_api/types/rating.rb +16 -0
  60. data/lib/kinopoisk_dev_api/types/review.rb +28 -0
  61. data/lib/kinopoisk_dev_api/types/review_docs_response_dto_v1_4.rb +16 -0
  62. data/lib/kinopoisk_dev_api/types/review_info.rb +12 -0
  63. data/lib/kinopoisk_dev_api/types/search_movie_dto_v1_4.rb +53 -0
  64. data/lib/kinopoisk_dev_api/types/search_movie_response_dto_v1_4.rb +16 -0
  65. data/lib/kinopoisk_dev_api/types/search_person_response_dto_v1_4.rb +16 -0
  66. data/lib/kinopoisk_dev_api/types/season_docs_response_dto_v1_4.rb +16 -0
  67. data/lib/kinopoisk_dev_api/types/season_info.rb +11 -0
  68. data/lib/kinopoisk_dev_api/types/season_v1_4.rb +31 -0
  69. data/lib/kinopoisk_dev_api/types/short_image.rb +11 -0
  70. data/lib/kinopoisk_dev_api/types/spouses.rb +16 -0
  71. data/lib/kinopoisk_dev_api/types/studio.rb +18 -0
  72. data/lib/kinopoisk_dev_api/types/studio_docs_response_dto_v1_4.rb +16 -0
  73. data/lib/kinopoisk_dev_api/types/video.rb +13 -0
  74. data/lib/kinopoisk_dev_api/types/video_types.rb +9 -0
  75. data/lib/kinopoisk_dev_api/types/votes.rb +16 -0
  76. data/lib/kinopoisk_dev_api/types/watchability.rb +9 -0
  77. data/lib/kinopoisk_dev_api/types/watchability_item.rb +11 -0
  78. data/lib/kinopoisk_dev_api/types/year_range.rb +10 -0
  79. data/lib/kinopoisk_dev_api/types.rb +7 -0
  80. data/lib/kinopoisk_dev_api/version.rb +5 -0
  81. data/lib/kinopoisk_dev_api.rb +25 -0
  82. data/rakelib/parse_schema.rake +90 -0
  83. data/rakelib/rebuild_types.rake +95 -0
  84. data/rakelib/templates/empty_type.erb +9 -0
  85. data/rakelib/templates/type.erb +24 -0
  86. metadata +169 -0
@@ -0,0 +1,76 @@
1
+ # frozen_string_literal: true
2
+
3
+ module KinopoiskDevApi
4
+ module Types
5
+ ## Just for classes consistency
6
+ # rubocop:disable Naming/ClassAndModuleCamelCase
7
+ class MovieDtoV1_4 < Base
8
+ attribute? :id, Types::Float | Types::Integer.optional
9
+ attribute? :externalId, ExternalId.optional
10
+ attribute? :name, Types::Coercible::String.optional
11
+ attribute? :alternativeName, Types::Coercible::String.optional
12
+ attribute? :enName, Types::Coercible::String.optional
13
+ attribute? :names, Types::Array.of(Name).optional
14
+ attribute? :type, Types::Coercible::String.optional
15
+ attribute? :typeNumber, Types::Float | Types::Integer.optional
16
+ attribute? :year, Types::Float | Types::Integer.optional
17
+ attribute? :description, Types::Coercible::String.optional
18
+ attribute? :shortDescription, Types::Coercible::String.optional
19
+ attribute? :slogan, Types::Coercible::String.optional
20
+ attribute? :status, Types::Coercible::String.optional
21
+ attribute? :facts, Types::Array.of(FactInMovie).optional
22
+ attribute? :rating, Rating
23
+ attribute? :votes, Votes
24
+ attribute? :movieLength, Types::Float | Types::Integer.optional
25
+ attribute? :ratingMpaa, Types::Coercible::String.optional
26
+ attribute? :ageRating, Types::Float | Types::Integer.optional
27
+ attribute? :logo, Logo
28
+ attribute? :poster, ShortImage
29
+ attribute? :backdrop, ShortImage
30
+ attribute? :videos, VideoTypes
31
+ attribute? :genres, Types::Array.of(ItemName)
32
+ attribute? :countries, Types::Array.of(ItemName)
33
+ attribute? :persons, Types::Array.of(PersonInMovie)
34
+ attribute? :reviewInfo, ReviewInfo
35
+ attribute? :seasonsInfo, Types::Array.of(SeasonInfo)
36
+ attribute? :budget, CurrencyValue
37
+ attribute? :fees, Fees
38
+ attribute? :premiere, Premiere
39
+ attribute? :similarMovies, Types::Array.of(LinkedMovieV1_4).optional
40
+ attribute? :sequelsAndPrequels, Types::Array.of(LinkedMovieV1_4).optional
41
+ attribute? :watchability, Watchability
42
+ attribute? :releaseYears, Types::Array.of(YearRange)
43
+ attribute? :top10, Types::Float | Types::Integer.optional
44
+ attribute? :top250, Types::Float | Types::Integer.optional
45
+ attribute? :ticketsOnSale, Types::Bool.optional
46
+ attribute? :totalSeriesLength, Types::Float | Types::Integer.optional
47
+ attribute? :seriesLength, Types::Float | Types::Integer.optional
48
+ attribute? :isSeries, Types::Bool.optional
49
+ attribute? :audience, Types::Array.of(Audience).optional
50
+ attribute? :lists, Types::Array.of(Types::Coercible::String).optional
51
+ attribute? :networks, NetworksV1_4.optional
52
+ attribute? :updatedAt, Types::Coercible::String.optional
53
+ attribute? :createdAt, Types::Coercible::String.optional
54
+ alias external_id externalId
55
+ alias alternative_name alternativeName
56
+ alias en_name enName
57
+ alias type_number typeNumber
58
+ alias short_description shortDescription
59
+ alias movie_length movieLength
60
+ alias rating_mpaa ratingMpaa
61
+ alias age_rating ageRating
62
+ alias review_info reviewInfo
63
+ alias seasons_info seasonsInfo
64
+ alias similar_movies similarMovies
65
+ alias sequels_and_prequels sequelsAndPrequels
66
+ alias release_years releaseYears
67
+ alias tickets_on_sale ticketsOnSale
68
+ alias total_series_length totalSeriesLength
69
+ alias series_length seriesLength
70
+ alias is_series isSeries
71
+ alias updated_at updatedAt
72
+ alias created_at createdAt
73
+ end
74
+ # rubocop:enable Naming/ClassAndModuleCamelCase
75
+ end
76
+ end
@@ -0,0 +1,9 @@
1
+ # frozen_string_literal: true
2
+
3
+ module KinopoiskDevApi
4
+ module Types
5
+ class MovieFromKeyword < Base
6
+ attribute? :id, Types::Float | Types::Integer
7
+ end
8
+ end
9
+ end
@@ -0,0 +1,9 @@
1
+ # frozen_string_literal: true
2
+
3
+ module KinopoiskDevApi
4
+ module Types
5
+ class MovieFromStudio < Base
6
+ attribute? :id, Types::Float | Types::Integer
7
+ end
8
+ end
9
+ end
@@ -0,0 +1,17 @@
1
+ # frozen_string_literal: true
2
+
3
+ module KinopoiskDevApi
4
+ module Types
5
+ class MovieInPerson < Base
6
+ attribute? :id, Types::Float | Types::Integer
7
+ attribute? :name, Types::Coercible::String.optional
8
+ attribute? :alternativeName, Types::Coercible::String.optional
9
+ attribute? :rating, Types::Float | Types::Integer.optional
10
+ attribute? :general, Types::Bool.optional
11
+ attribute? :description, Types::Coercible::String.optional
12
+ attribute? :enProfession, Types::Coercible::String.optional
13
+ alias alternative_name alternativeName
14
+ alias en_profession enProfession
15
+ end
16
+ end
17
+ end
@@ -0,0 +1,11 @@
1
+ # frozen_string_literal: true
2
+
3
+ module KinopoiskDevApi
4
+ module Types
5
+ class Name < Base
6
+ attribute? :name, Types::Coercible::String
7
+ attribute? :language, Types::Coercible::String.optional
8
+ attribute? :type, Types::Coercible::String.optional
9
+ end
10
+ end
11
+ end
@@ -0,0 +1,13 @@
1
+ # frozen_string_literal: true
2
+
3
+ module KinopoiskDevApi
4
+ module Types
5
+ ## Just for classes consistency
6
+ # rubocop:disable Naming/ClassAndModuleCamelCase
7
+ class NetworkItemV1_4 < Base
8
+ attribute? :name, Types::Coercible::String.optional
9
+ attribute? :logo, Logo.optional
10
+ end
11
+ # rubocop:enable Naming/ClassAndModuleCamelCase
12
+ end
13
+ end
@@ -0,0 +1,12 @@
1
+ # frozen_string_literal: true
2
+
3
+ module KinopoiskDevApi
4
+ module Types
5
+ ## Just for classes consistency
6
+ # rubocop:disable Naming/ClassAndModuleCamelCase
7
+ class NetworksV1_4 < Base
8
+ attribute? :items, Types::Array.of(NetworkItemV1_4).optional
9
+ end
10
+ # rubocop:enable Naming/ClassAndModuleCamelCase
11
+ end
12
+ end
@@ -0,0 +1,10 @@
1
+ # frozen_string_literal: true
2
+
3
+ module KinopoiskDevApi
4
+ module Types
5
+ class Nomination < Base
6
+ attribute? :award, NominationAward.optional
7
+ attribute? :title, Types::Coercible::String.optional
8
+ end
9
+ end
10
+ end
@@ -0,0 +1,10 @@
1
+ # frozen_string_literal: true
2
+
3
+ module KinopoiskDevApi
4
+ module Types
5
+ class NominationAward < Base
6
+ attribute? :title, Types::Coercible::String.optional
7
+ attribute? :year, Types::Float | Types::Integer.optional
8
+ end
9
+ end
10
+ end
@@ -0,0 +1,11 @@
1
+ # frozen_string_literal: true
2
+
3
+ module KinopoiskDevApi
4
+ module Types
5
+ module PatternMatching
6
+ def deconstruct_keys(_keys)
7
+ attributes
8
+ end
9
+ end
10
+ end
11
+ end
@@ -0,0 +1,32 @@
1
+ # frozen_string_literal: true
2
+
3
+ module KinopoiskDevApi
4
+ module Types
5
+ class Person < Base
6
+ attribute? :id, Types::Float | Types::Integer
7
+ attribute? :name, Types::Coercible::String.optional
8
+ attribute? :enName, Types::Coercible::String.optional
9
+ attribute? :photo, Types::Coercible::String.optional
10
+ attribute? :sex, Types::Coercible::String.optional
11
+ attribute? :growth, Types::Float | Types::Integer.optional
12
+ attribute? :birthday, Types::Coercible::String.optional
13
+ attribute? :death, Types::Coercible::String.optional
14
+ attribute? :age, Types::Float | Types::Integer.optional
15
+ attribute? :birthPlace, Types::Array.of(BirthPlace)
16
+ attribute? :deathPlace, Types::Array.of(DeathPlace)
17
+ attribute? :spouses, Types::Array.of(Spouses)
18
+ attribute? :countAwards, Types::Float | Types::Integer.optional
19
+ attribute? :profession, Types::Array.of(Profession)
20
+ attribute? :facts, Types::Array.of(FactInPerson)
21
+ attribute? :movies, Types::Array.of(MovieInPerson)
22
+ attribute? :updatedAt, Types::Coercible::String
23
+ attribute? :createdAt, Types::Coercible::String
24
+ alias en_name enName
25
+ alias birth_place birthPlace
26
+ alias death_place deathPlace
27
+ alias count_awards countAwards
28
+ alias updated_at updatedAt
29
+ alias created_at createdAt
30
+ end
31
+ end
32
+ end
@@ -0,0 +1,17 @@
1
+ # frozen_string_literal: true
2
+
3
+ module KinopoiskDevApi
4
+ module Types
5
+ class PersonAward < Base
6
+ attribute? :nomination, Nomination.optional
7
+ attribute? :winning, Types::Bool.optional
8
+ attribute? :updatedAt, Types::Coercible::String.optional
9
+ attribute? :createdAt, Types::Coercible::String.optional
10
+ attribute? :personId, Types::Float | Types::Integer
11
+ attribute? :movie, Movie.optional
12
+ alias updated_at updatedAt
13
+ alias created_at createdAt
14
+ alias person_id personId
15
+ end
16
+ end
17
+ end
@@ -0,0 +1,13 @@
1
+ # frozen_string_literal: true
2
+
3
+ module KinopoiskDevApi
4
+ module Types
5
+ class PersonAwardDocsResponseDto < Base
6
+ attribute? :docs, Types::Array.of(PersonAward)
7
+ attribute? :total, Types::Float | Types::Integer
8
+ attribute? :limit, Types::Float | Types::Integer
9
+ attribute? :page, Types::Float | Types::Integer
10
+ attribute? :pages, Types::Float | Types::Integer
11
+ end
12
+ end
13
+ end
@@ -0,0 +1,16 @@
1
+ # frozen_string_literal: true
2
+
3
+ module KinopoiskDevApi
4
+ module Types
5
+ ## Just for classes consistency
6
+ # rubocop:disable Naming/ClassAndModuleCamelCase
7
+ class PersonDocsResponseDtoV1_4 < Base
8
+ attribute? :docs, Types::Array.of(Person)
9
+ attribute? :total, Types::Float | Types::Integer
10
+ attribute? :limit, Types::Float | Types::Integer
11
+ attribute? :page, Types::Float | Types::Integer
12
+ attribute? :pages, Types::Float | Types::Integer
13
+ end
14
+ # rubocop:enable Naming/ClassAndModuleCamelCase
15
+ end
16
+ end
@@ -0,0 +1,17 @@
1
+ # frozen_string_literal: true
2
+
3
+ module KinopoiskDevApi
4
+ module Types
5
+ class PersonInMovie < Base
6
+ attribute? :id, Types::Float | Types::Integer
7
+ attribute? :photo, Types::Coercible::String.optional
8
+ attribute? :name, Types::Coercible::String.optional
9
+ attribute? :enName, Types::Coercible::String.optional
10
+ attribute? :description, Types::Coercible::String.optional
11
+ attribute? :profession, Types::Coercible::String.optional
12
+ attribute? :enProfession, Types::Coercible::String.optional
13
+ alias en_name enName
14
+ alias en_profession enProfession
15
+ end
16
+ end
17
+ end
@@ -0,0 +1,10 @@
1
+ # frozen_string_literal: true
2
+
3
+ module KinopoiskDevApi
4
+ module Types
5
+ class PossibleValueDto < Base
6
+ attribute? :name, Types::Coercible::String.optional
7
+ attribute? :slug, Types::Coercible::String.optional
8
+ end
9
+ end
10
+ end
@@ -0,0 +1,15 @@
1
+ # frozen_string_literal: true
2
+
3
+ module KinopoiskDevApi
4
+ module Types
5
+ class Premiere < Base
6
+ attribute? :country, Types::Coercible::String.optional
7
+ attribute? :world, Types::Coercible::String.optional
8
+ attribute? :russia, Types::Coercible::String.optional
9
+ attribute? :digital, Types::Coercible::String.optional
10
+ attribute? :cinema, Types::Coercible::String.optional
11
+ attribute? :bluray, Types::Coercible::String.optional
12
+ attribute? :dvd, Types::Coercible::String.optional
13
+ end
14
+ end
15
+ end
@@ -0,0 +1,9 @@
1
+ # frozen_string_literal: true
2
+
3
+ module KinopoiskDevApi
4
+ module Types
5
+ class Profession < Base
6
+ attribute? :value, Types::Coercible::String
7
+ end
8
+ end
9
+ end
@@ -0,0 +1,16 @@
1
+ # frozen_string_literal: true
2
+
3
+ module KinopoiskDevApi
4
+ module Types
5
+ class Rating < Base
6
+ attribute? :kp, Types::Float | Types::Integer.optional
7
+ attribute? :imdb, Types::Float | Types::Integer.optional
8
+ attribute? :tmdb, Types::Float | Types::Integer.optional
9
+ attribute? :filmCritics, Types::Float | Types::Integer.optional
10
+ attribute? :russianFilmCritics, Types::Float | Types::Integer.optional
11
+ attribute? :await, Types::Float | Types::Integer.optional
12
+ alias film_critics filmCritics
13
+ alias russian_film_critics russianFilmCritics
14
+ end
15
+ end
16
+ end
@@ -0,0 +1,28 @@
1
+ # frozen_string_literal: true
2
+
3
+ module KinopoiskDevApi
4
+ module Types
5
+ class Review < Base
6
+ attribute? :id, Types::Float | Types::Integer
7
+ attribute? :movieId, Types::Float | Types::Integer
8
+ attribute? :title, Types::Coercible::String
9
+ attribute? :type, Types::Coercible::String
10
+ attribute? :review, Types::Coercible::String
11
+ attribute? :date, Types::Coercible::String
12
+ attribute? :author, Types::Coercible::String
13
+ attribute? :userRating, Types::Float | Types::Integer
14
+ attribute? :authorId, Types::Float | Types::Integer
15
+ attribute? :reviewLikes, Types::Float | Types::Integer
16
+ attribute? :reviewDislikes, Types::Float | Types::Integer
17
+ attribute? :updatedAt, Types::Coercible::String
18
+ attribute? :createdAt, Types::Coercible::String
19
+ alias movie_id movieId
20
+ alias user_rating userRating
21
+ alias author_id authorId
22
+ alias review_likes reviewLikes
23
+ alias review_dislikes reviewDislikes
24
+ alias updated_at updatedAt
25
+ alias created_at createdAt
26
+ end
27
+ end
28
+ end
@@ -0,0 +1,16 @@
1
+ # frozen_string_literal: true
2
+
3
+ module KinopoiskDevApi
4
+ module Types
5
+ ## Just for classes consistency
6
+ # rubocop:disable Naming/ClassAndModuleCamelCase
7
+ class ReviewDocsResponseDtoV1_4 < Base
8
+ attribute? :docs, Types::Array.of(Review)
9
+ attribute? :total, Types::Float | Types::Integer
10
+ attribute? :limit, Types::Float | Types::Integer
11
+ attribute? :page, Types::Float | Types::Integer
12
+ attribute? :pages, Types::Float | Types::Integer
13
+ end
14
+ # rubocop:enable Naming/ClassAndModuleCamelCase
15
+ end
16
+ end
@@ -0,0 +1,12 @@
1
+ # frozen_string_literal: true
2
+
3
+ module KinopoiskDevApi
4
+ module Types
5
+ class ReviewInfo < Base
6
+ attribute? :count, Types::Float | Types::Integer.optional
7
+ attribute? :positiveCount, Types::Float | Types::Integer.optional
8
+ attribute? :percentage, Types::Coercible::String.optional
9
+ alias positive_count positiveCount
10
+ end
11
+ end
12
+ end
@@ -0,0 +1,53 @@
1
+ # frozen_string_literal: true
2
+
3
+ module KinopoiskDevApi
4
+ module Types
5
+ ## Just for classes consistency
6
+ # rubocop:disable Naming/ClassAndModuleCamelCase
7
+ class SearchMovieDtoV1_4 < Base
8
+ attribute? :id, Types::Float | Types::Integer
9
+ attribute? :name, Types::Coercible::String.optional
10
+ attribute? :alternativeName, Types::Coercible::String.optional
11
+ attribute? :enName, Types::Coercible::String.optional
12
+ attribute? :type, Types::Coercible::String.optional
13
+ attribute? :year, Types::Float | Types::Integer.optional
14
+ attribute? :description, Types::Coercible::String.optional
15
+ attribute? :shortDescription, Types::Coercible::String.optional
16
+ attribute? :movieLength, Types::Float | Types::Integer.optional
17
+ attribute? :names, Types::Array.of(Name).optional
18
+ attribute? :externalId, ExternalId.optional
19
+ attribute? :logo, Logo.optional
20
+ attribute? :poster, ShortImage.optional
21
+ attribute? :backdrop, ShortImage.optional
22
+ attribute? :rating, Rating.optional
23
+ attribute? :votes, Votes.optional
24
+ attribute? :genres, Types::Array.of(ItemName).optional
25
+ attribute? :countries, Types::Array.of(ItemName).optional
26
+ attribute? :releaseYears, Types::Array.of(YearRange).optional
27
+ attribute? :isSeries, Types::Bool.optional
28
+ attribute? :ticketsOnSale, Types::Bool.optional
29
+ attribute? :totalSeriesLength, Types::Float | Types::Integer.optional
30
+ attribute? :seriesLength, Types::Float | Types::Integer.optional
31
+ attribute? :ratingMpaa, Types::Coercible::String.optional
32
+ attribute? :ageRating, Types::Float | Types::Integer.optional
33
+ attribute? :top10, Types::Float | Types::Integer.optional
34
+ attribute? :top250, Types::Float | Types::Integer.optional
35
+ attribute? :typeNumber, Types::Float | Types::Integer.optional
36
+ attribute? :status, Types::Coercible::String.optional
37
+ alias alternative_name alternativeName
38
+ alias en_name enName
39
+ alias short_description shortDescription
40
+ alias movie_length movieLength
41
+ alias external_id externalId
42
+ alias release_years releaseYears
43
+ alias is_series isSeries
44
+ alias tickets_on_sale ticketsOnSale
45
+ alias total_series_length totalSeriesLength
46
+ alias series_length seriesLength
47
+ alias rating_mpaa ratingMpaa
48
+ alias age_rating ageRating
49
+ alias type_number typeNumber
50
+ end
51
+ # rubocop:enable Naming/ClassAndModuleCamelCase
52
+ end
53
+ end
@@ -0,0 +1,16 @@
1
+ # frozen_string_literal: true
2
+
3
+ module KinopoiskDevApi
4
+ module Types
5
+ ## Just for classes consistency
6
+ # rubocop:disable Naming/ClassAndModuleCamelCase
7
+ class SearchMovieResponseDtoV1_4 < Base
8
+ attribute? :docs, Types::Array.of(SearchMovieDtoV1_4)
9
+ attribute? :total, Types::Float | Types::Integer
10
+ attribute? :limit, Types::Float | Types::Integer
11
+ attribute? :page, Types::Float | Types::Integer
12
+ attribute? :pages, Types::Float | Types::Integer
13
+ end
14
+ # rubocop:enable Naming/ClassAndModuleCamelCase
15
+ end
16
+ end
@@ -0,0 +1,16 @@
1
+ # frozen_string_literal: true
2
+
3
+ module KinopoiskDevApi
4
+ module Types
5
+ ## Just for classes consistency
6
+ # rubocop:disable Naming/ClassAndModuleCamelCase
7
+ class SearchPersonResponseDtoV1_4 < Base
8
+ attribute? :docs, Types::Array.of(MeiliPersonEntityV1_4)
9
+ attribute? :total, Types::Float | Types::Integer
10
+ attribute? :limit, Types::Float | Types::Integer
11
+ attribute? :page, Types::Float | Types::Integer
12
+ attribute? :pages, Types::Float | Types::Integer
13
+ end
14
+ # rubocop:enable Naming/ClassAndModuleCamelCase
15
+ end
16
+ end
@@ -0,0 +1,16 @@
1
+ # frozen_string_literal: true
2
+
3
+ module KinopoiskDevApi
4
+ module Types
5
+ ## Just for classes consistency
6
+ # rubocop:disable Naming/ClassAndModuleCamelCase
7
+ class SeasonDocsResponseDtoV1_4 < Base
8
+ attribute? :docs, Types::Array.of(SeasonV1_4)
9
+ attribute? :total, Types::Float | Types::Integer
10
+ attribute? :limit, Types::Float | Types::Integer
11
+ attribute? :page, Types::Float | Types::Integer
12
+ attribute? :pages, Types::Float | Types::Integer
13
+ end
14
+ # rubocop:enable Naming/ClassAndModuleCamelCase
15
+ end
16
+ end
@@ -0,0 +1,11 @@
1
+ # frozen_string_literal: true
2
+
3
+ module KinopoiskDevApi
4
+ module Types
5
+ class SeasonInfo < Base
6
+ attribute? :number, Types::Float | Types::Integer.optional
7
+ attribute? :episodesCount, Types::Float | Types::Integer.optional
8
+ alias episodes_count episodesCount
9
+ end
10
+ end
11
+ end
@@ -0,0 +1,31 @@
1
+ # frozen_string_literal: true
2
+
3
+ module KinopoiskDevApi
4
+ module Types
5
+ ## Just for classes consistency
6
+ # rubocop:disable Naming/ClassAndModuleCamelCase
7
+ class SeasonV1_4 < Base
8
+ attribute? :movieId, Types::Float | Types::Integer
9
+ attribute? :number, Types::Float | Types::Integer
10
+ attribute? :episodesCount, Types::Float | Types::Integer
11
+ attribute? :episodes, Types::Array.of(EpisodeV1_4)
12
+ attribute? :poster, ShortImage
13
+ attribute? :name, Types::Coercible::String
14
+ attribute? :enName, Types::Coercible::String
15
+ attribute? :duration, Types::Float | Types::Integer
16
+ attribute? :description, Types::Coercible::String
17
+ attribute? :enDescription, Types::Coercible::String
18
+ attribute? :airDate, Types::Coercible::String
19
+ attribute? :updatedAt, Types::Coercible::String.optional
20
+ attribute? :createdAt, Types::Coercible::String.optional
21
+ alias movie_id movieId
22
+ alias episodes_count episodesCount
23
+ alias en_name enName
24
+ alias en_description enDescription
25
+ alias air_date airDate
26
+ alias updated_at updatedAt
27
+ alias created_at createdAt
28
+ end
29
+ # rubocop:enable Naming/ClassAndModuleCamelCase
30
+ end
31
+ end
@@ -0,0 +1,11 @@
1
+ # frozen_string_literal: true
2
+
3
+ module KinopoiskDevApi
4
+ module Types
5
+ class ShortImage < Base
6
+ attribute? :url, Types::Coercible::String.optional
7
+ attribute? :previewUrl, Types::Coercible::String.optional
8
+ alias preview_url previewUrl
9
+ end
10
+ end
11
+ end
@@ -0,0 +1,16 @@
1
+ # frozen_string_literal: true
2
+
3
+ module KinopoiskDevApi
4
+ module Types
5
+ class Spouses < Base
6
+ attribute? :id, Types::Float | Types::Integer
7
+ attribute? :name, Types::Coercible::String
8
+ attribute? :divorced, Types::Bool
9
+ attribute? :divorcedReason, Types::Coercible::String
10
+ attribute? :sex, Types::Coercible::String
11
+ attribute? :children, Types::Float | Types::Integer
12
+ attribute? :relation, Types::Coercible::String
13
+ alias divorced_reason divorcedReason
14
+ end
15
+ end
16
+ end
@@ -0,0 +1,18 @@
1
+ # frozen_string_literal: true
2
+
3
+ module KinopoiskDevApi
4
+ module Types
5
+ class Studio < Base
6
+ attribute? :id, Types::Coercible::String
7
+ attribute? :subType, Types::Coercible::String.optional
8
+ attribute? :title, Types::Coercible::String.optional
9
+ attribute? :type, Types::Coercible::String
10
+ attribute? :movies, Types::Array.of(MovieFromStudio)
11
+ attribute? :updatedAt, Types::Coercible::String
12
+ attribute? :createdAt, Types::Coercible::String
13
+ alias sub_type subType
14
+ alias updated_at updatedAt
15
+ alias created_at createdAt
16
+ end
17
+ end
18
+ end
@@ -0,0 +1,16 @@
1
+ # frozen_string_literal: true
2
+
3
+ module KinopoiskDevApi
4
+ module Types
5
+ ## Just for classes consistency
6
+ # rubocop:disable Naming/ClassAndModuleCamelCase
7
+ class StudioDocsResponseDtoV1_4 < Base
8
+ attribute? :docs, Types::Array.of(Studio)
9
+ attribute? :total, Types::Float | Types::Integer
10
+ attribute? :limit, Types::Float | Types::Integer
11
+ attribute? :page, Types::Float | Types::Integer
12
+ attribute? :pages, Types::Float | Types::Integer
13
+ end
14
+ # rubocop:enable Naming/ClassAndModuleCamelCase
15
+ end
16
+ end
@@ -0,0 +1,13 @@
1
+ # frozen_string_literal: true
2
+
3
+ module KinopoiskDevApi
4
+ module Types
5
+ class Video < Base
6
+ attribute? :url, Types::Coercible::String.optional
7
+ attribute? :name, Types::Coercible::String.optional
8
+ attribute? :site, Types::Coercible::String.optional
9
+ attribute? :size, Types::Float | Types::Integer.optional
10
+ attribute? :type, Types::Coercible::String.optional
11
+ end
12
+ end
13
+ end
@@ -0,0 +1,9 @@
1
+ # frozen_string_literal: true
2
+
3
+ module KinopoiskDevApi
4
+ module Types
5
+ class VideoTypes < Base
6
+ attribute? :trailers, Types::Array.of(Video).optional
7
+ end
8
+ end
9
+ end