kuapir 0.1.2

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 (190) hide show
  1. checksums.yaml +7 -0
  2. data/Gemfile +13 -0
  3. data/Gemfile.lock +77 -0
  4. data/LICENSE +21 -0
  5. data/README.md +170 -0
  6. data/Rakefile +12 -0
  7. data/docs/BoxOffice.md +26 -0
  8. data/docs/BoxOfficeResponse.md +20 -0
  9. data/docs/Company.md +18 -0
  10. data/docs/Country.md +18 -0
  11. data/docs/DigitalReleaseItem.md +44 -0
  12. data/docs/DigitalReleaseResponse.md +22 -0
  13. data/docs/Distribution.md +28 -0
  14. data/docs/DistributionResponse.md +20 -0
  15. data/docs/Episode.md +28 -0
  16. data/docs/Fact.md +22 -0
  17. data/docs/FactResponse.md +20 -0
  18. data/docs/Film.md +100 -0
  19. data/docs/FilmSearchByFiltersResponse.md +22 -0
  20. data/docs/FilmSearchByFiltersResponseItems.md +42 -0
  21. data/docs/FilmSearchResponse.md +24 -0
  22. data/docs/FilmSearchResponseFilms.md +42 -0
  23. data/docs/FilmSequelsAndPrequelsResponse.md +30 -0
  24. data/docs/FilmTopResponse.md +20 -0
  25. data/docs/FilmTopResponseFilms.md +38 -0
  26. data/docs/FilmsApi.md +1126 -0
  27. data/docs/FiltersResponse.md +20 -0
  28. data/docs/FiltersResponseCountries.md +20 -0
  29. data/docs/FiltersResponseGenres.md +20 -0
  30. data/docs/Genre.md +18 -0
  31. data/docs/ImageResponse.md +22 -0
  32. data/docs/ImageResponseItems.md +20 -0
  33. data/docs/PersonByNameResponse.md +20 -0
  34. data/docs/PersonByNameResponseItems.md +28 -0
  35. data/docs/PersonResponse.md +50 -0
  36. data/docs/PersonResponseFilms.md +30 -0
  37. data/docs/PersonResponseSpouses.md +32 -0
  38. data/docs/PersonsApi.md +83 -0
  39. data/docs/PremiereResponse.md +20 -0
  40. data/docs/PremiereResponseItem.md +36 -0
  41. data/docs/RelatedFilmResponse.md +20 -0
  42. data/docs/RelatedFilmResponseItems.md +30 -0
  43. data/docs/ReviewDetailsResponse.md +32 -0
  44. data/docs/ReviewsApi.md +155 -0
  45. data/docs/ReviewsResponse.md +34 -0
  46. data/docs/ReviewsResponseReviews.md +32 -0
  47. data/docs/Season.md +20 -0
  48. data/docs/SeasonResponse.md +20 -0
  49. data/docs/StaffApi.md +147 -0
  50. data/docs/StaffResponse.md +30 -0
  51. data/docs/VideoResponse.md +20 -0
  52. data/docs/VideoResponseItems.md +22 -0
  53. data/kinopoiskapiunofficial-openapi.json +2918 -0
  54. data/kuapir.gemspec +42 -0
  55. data/lib/kuapir/api/films_api.rb +1193 -0
  56. data/lib/kuapir/api/persons_api.rb +89 -0
  57. data/lib/kuapir/api/reviews_api.rb +165 -0
  58. data/lib/kuapir/api/staff_api.rb +145 -0
  59. data/lib/kuapir/api_client.rb +390 -0
  60. data/lib/kuapir/api_error.rb +57 -0
  61. data/lib/kuapir/configuration.rb +287 -0
  62. data/lib/kuapir/models/box_office.rb +246 -0
  63. data/lib/kuapir/models/box_office_response.rb +224 -0
  64. data/lib/kuapir/models/company.rb +214 -0
  65. data/lib/kuapir/models/country.rb +214 -0
  66. data/lib/kuapir/models/digital_release_item.rb +334 -0
  67. data/lib/kuapir/models/digital_release_response.rb +232 -0
  68. data/lib/kuapir/models/distribution.rb +300 -0
  69. data/lib/kuapir/models/distribution_response.rb +224 -0
  70. data/lib/kuapir/models/episode.rb +249 -0
  71. data/lib/kuapir/models/fact.rb +266 -0
  72. data/lib/kuapir/models/fact_response.rb +224 -0
  73. data/lib/kuapir/models/film.rb +551 -0
  74. data/lib/kuapir/models/film_search_by_filters_response.rb +232 -0
  75. data/lib/kuapir/models/film_search_by_filters_response_items.rb +319 -0
  76. data/lib/kuapir/models/film_search_response.rb +244 -0
  77. data/lib/kuapir/models/film_search_response_films.rb +311 -0
  78. data/lib/kuapir/models/film_sequels_and_prequels_response.rb +300 -0
  79. data/lib/kuapir/models/film_top_response.rb +224 -0
  80. data/lib/kuapir/models/film_top_response_films.rb +272 -0
  81. data/lib/kuapir/models/filters_response.rb +226 -0
  82. data/lib/kuapir/models/filters_response_countries.rb +214 -0
  83. data/lib/kuapir/models/filters_response_genres.rb +214 -0
  84. data/lib/kuapir/models/genre.rb +214 -0
  85. data/lib/kuapir/models/image_response.rb +238 -0
  86. data/lib/kuapir/models/image_response_items.rb +214 -0
  87. data/lib/kuapir/models/person_by_name_response.rb +224 -0
  88. data/lib/kuapir/models/person_by_name_response_items.rb +274 -0
  89. data/lib/kuapir/models/person_response.rb +363 -0
  90. data/lib/kuapir/models/person_response_films.rb +284 -0
  91. data/lib/kuapir/models/person_response_spouses.rb +283 -0
  92. data/lib/kuapir/models/premiere_response.rb +224 -0
  93. data/lib/kuapir/models/premiere_response_item.rb +289 -0
  94. data/lib/kuapir/models/related_film_response.rb +224 -0
  95. data/lib/kuapir/models/related_film_response_items.rb +279 -0
  96. data/lib/kuapir/models/review_details_response.rb +314 -0
  97. data/lib/kuapir/models/reviews_response.rb +294 -0
  98. data/lib/kuapir/models/reviews_response_reviews.rb +282 -0
  99. data/lib/kuapir/models/season.rb +224 -0
  100. data/lib/kuapir/models/season_response.rb +224 -0
  101. data/lib/kuapir/models/staff_response.rb +301 -0
  102. data/lib/kuapir/models/video_response.rb +224 -0
  103. data/lib/kuapir/models/video_response_items.rb +255 -0
  104. data/lib/kuapir/version.rb +5 -0
  105. data/lib/kuapir.rb +83 -0
  106. data/openapi-generator-templates/Gemfile.mustache +9 -0
  107. data/openapi-generator-templates/README.mustache +148 -0
  108. data/openapi-generator-templates/Rakefile.mustache +10 -0
  109. data/openapi-generator-templates/api.mustache +205 -0
  110. data/openapi-generator-templates/api_client.mustache +260 -0
  111. data/openapi-generator-templates/api_client_faraday_partial.mustache +136 -0
  112. data/openapi-generator-templates/api_client_spec.mustache +216 -0
  113. data/openapi-generator-templates/api_client_typhoeus_partial.mustache +153 -0
  114. data/openapi-generator-templates/api_doc.mustache +118 -0
  115. data/openapi-generator-templates/api_error.mustache +45 -0
  116. data/openapi-generator-templates/api_info.mustache +12 -0
  117. data/openapi-generator-templates/api_test.mustache +43 -0
  118. data/openapi-generator-templates/base_object.mustache +120 -0
  119. data/openapi-generator-templates/configuration.mustache +381 -0
  120. data/openapi-generator-templates/configuration_spec.mustache +30 -0
  121. data/openapi-generator-templates/configuration_tls_faraday_partial.mustache +29 -0
  122. data/openapi-generator-templates/configuration_tls_typhoeus_partial.mustache +34 -0
  123. data/openapi-generator-templates/gem.mustache +50 -0
  124. data/openapi-generator-templates/gemspec.mustache +31 -0
  125. data/openapi-generator-templates/git_push.sh.mustache +57 -0
  126. data/openapi-generator-templates/gitignore.mustache +39 -0
  127. data/openapi-generator-templates/model.mustache +22 -0
  128. data/openapi-generator-templates/model_doc.mustache +12 -0
  129. data/openapi-generator-templates/model_test.mustache +73 -0
  130. data/openapi-generator-templates/partial_model_enum_class.mustache +20 -0
  131. data/openapi-generator-templates/partial_model_generic.mustache +371 -0
  132. data/openapi-generator-templates/partial_model_generic_doc.mustache +28 -0
  133. data/openapi-generator-templates/partial_oneof_module.mustache +137 -0
  134. data/openapi-generator-templates/partial_oneof_module_doc.mustache +92 -0
  135. data/openapi-generator-templates/rspec.mustache +2 -0
  136. data/openapi-generator-templates/rubocop.mustache +148 -0
  137. data/openapi-generator-templates/spec_helper.mustache +99 -0
  138. data/openapi-generator-templates/travis.mustache +14 -0
  139. data/openapi-generator-templates/version.mustache +3 -0
  140. data/openapitools.json +21 -0
  141. data/spec/api/films_api_spec.rb +227 -0
  142. data/spec/api/persons_api_spec.rb +45 -0
  143. data/spec/api/reviews_api_spec.rb +57 -0
  144. data/spec/api/staff_api_spec.rb +54 -0
  145. data/spec/api_client_spec.rb +229 -0
  146. data/spec/configuration_spec.rb +28 -0
  147. data/spec/models/box_office_response_spec.rb +37 -0
  148. data/spec/models/box_office_spec.rb +55 -0
  149. data/spec/models/company_spec.rb +31 -0
  150. data/spec/models/country_spec.rb +31 -0
  151. data/spec/models/digital_release_item_spec.rb +109 -0
  152. data/spec/models/digital_release_response_spec.rb +43 -0
  153. data/spec/models/distribution_response_spec.rb +37 -0
  154. data/spec/models/distribution_spec.rb +69 -0
  155. data/spec/models/episode_spec.rb +61 -0
  156. data/spec/models/fact_response_spec.rb +37 -0
  157. data/spec/models/fact_spec.rb +47 -0
  158. data/spec/models/film_search_by_filters_response_items_spec.rb +107 -0
  159. data/spec/models/film_search_by_filters_response_spec.rb +43 -0
  160. data/spec/models/film_search_response_films_spec.rb +107 -0
  161. data/spec/models/film_search_response_spec.rb +49 -0
  162. data/spec/models/film_sequels_and_prequels_response_spec.rb +71 -0
  163. data/spec/models/film_spec.rb +285 -0
  164. data/spec/models/film_top_response_films_spec.rb +91 -0
  165. data/spec/models/film_top_response_spec.rb +37 -0
  166. data/spec/models/filters_response_countries_spec.rb +37 -0
  167. data/spec/models/filters_response_genres_spec.rb +37 -0
  168. data/spec/models/filters_response_spec.rb +37 -0
  169. data/spec/models/genre_spec.rb +31 -0
  170. data/spec/models/image_response_items_spec.rb +37 -0
  171. data/spec/models/image_response_spec.rb +43 -0
  172. data/spec/models/person_by_name_response_items_spec.rb +65 -0
  173. data/spec/models/person_by_name_response_spec.rb +37 -0
  174. data/spec/models/person_response_films_spec.rb +71 -0
  175. data/spec/models/person_response_spec.rb +131 -0
  176. data/spec/models/person_response_spouses_spec.rb +77 -0
  177. data/spec/models/premiere_response_item_spec.rb +85 -0
  178. data/spec/models/premiere_response_spec.rb +37 -0
  179. data/spec/models/related_film_response_items_spec.rb +71 -0
  180. data/spec/models/related_film_response_spec.rb +37 -0
  181. data/spec/models/review_details_response_spec.rb +77 -0
  182. data/spec/models/reviews_response_reviews_spec.rb +77 -0
  183. data/spec/models/reviews_response_spec.rb +79 -0
  184. data/spec/models/season_response_spec.rb +37 -0
  185. data/spec/models/season_spec.rb +37 -0
  186. data/spec/models/staff_response_spec.rb +71 -0
  187. data/spec/models/video_response_items_spec.rb +47 -0
  188. data/spec/models/video_response_spec.rb +37 -0
  189. data/spec/spec_helper.rb +107 -0
  190. metadata +326 -0
@@ -0,0 +1,1193 @@
1
+ # frozen_string_literal: true
2
+
3
+ require "cgi"
4
+
5
+ module Kuapir
6
+ class FilmsApi
7
+ attr_accessor :api_client
8
+
9
+ def initialize(api_client = ApiClient.default)
10
+ @api_client = api_client
11
+ end
12
+
13
+ # получить сиквелы и приквелы для фильма по kinopoisk film id
14
+ # tbd
15
+ # @param id [Integer] kinopoisk film id
16
+ # @param [Hash] opts the optional parameters
17
+ # @return [Array<FilmSequelsAndPrequelsResponse>]
18
+ def api_v21_films_id_sequels_and_prequels_get(id, opts = {})
19
+ data, _status_code, _headers = api_v21_films_id_sequels_and_prequels_get_with_http_info(id, opts)
20
+ data
21
+ end
22
+
23
+ # получить сиквелы и приквелы для фильма по kinopoisk film id
24
+ # tbd
25
+ # @param id [Integer] kinopoisk film id
26
+ # @param [Hash] opts the optional parameters
27
+ # @return [Array<(Array<FilmSequelsAndPrequelsResponse>, Integer, Hash)>] Array<FilmSequelsAndPrequelsResponse> data, response status code and response headers
28
+ def api_v21_films_id_sequels_and_prequels_get_with_http_info(id, opts = {})
29
+ if @api_client.config.debugging
30
+ @api_client.config.logger.debug "Calling API: FilmsApi.api_v21_films_id_sequels_and_prequels_get ..."
31
+ end
32
+ # verify the required parameter 'id' is set
33
+ if @api_client.config.client_side_validation && id.nil?
34
+ raise ArgumentError,
35
+ "Missing the required parameter 'id' when calling FilmsApi.api_v21_films_id_sequels_and_prequels_get"
36
+ end
37
+ if @api_client.config.client_side_validation && id > 5000000
38
+ raise ArgumentError,
39
+ 'invalid value for "id" when calling FilmsApi.api_v21_films_id_sequels_and_prequels_get, must be smaller than or equal to 5000000.'
40
+ end
41
+
42
+ if @api_client.config.client_side_validation && id < 1
43
+ raise ArgumentError,
44
+ 'invalid value for "id" when calling FilmsApi.api_v21_films_id_sequels_and_prequels_get, must be greater than or equal to 1.'
45
+ end
46
+
47
+ # resource path
48
+ local_var_path = "/api/v2.1/films/{id}/sequels_and_prequels".sub("{id}", CGI.escape(id.to_s))
49
+
50
+ # query parameters
51
+ query_params = opts[:query_params] || {}
52
+
53
+ # header parameters
54
+ header_params = opts[:header_params] || {}
55
+ # HTTP header 'Accept' (if needed)
56
+ header_params["Accept"] = @api_client.select_header_accept(["application/json"])
57
+
58
+ # form parameters
59
+ form_params = opts[:form_params] || {}
60
+
61
+ # http body (model)
62
+ post_body = opts[:debug_body]
63
+
64
+ # return_type
65
+ return_type = opts[:debug_return_type] || "Array<FilmSequelsAndPrequelsResponse>"
66
+
67
+ # auth_names
68
+ auth_names = opts[:debug_auth_names] || ["ApiKeyAuth"]
69
+
70
+ new_options = opts.merge(
71
+ operation: :"FilmsApi.api_v21_films_id_sequels_and_prequels_get",
72
+ header_params: header_params,
73
+ query_params: query_params,
74
+ form_params: form_params,
75
+ body: post_body,
76
+ auth_names: auth_names,
77
+ return_type: return_type
78
+ )
79
+
80
+ data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
81
+ if @api_client.config.debugging
82
+ @api_client.config.logger.debug "API called: FilmsApi#api_v21_films_id_sequels_and_prequels_get\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
83
+ end
84
+ [data, status_code, headers]
85
+ end
86
+
87
+ # получить список цифровых релизов
88
+ # Данный эндпоинт возвращает список цифровых релизов. Например https://www.kinopoisk.ru/comingsoon/digital/
89
+ # @param year [Integer] год релиза
90
+ # @param month [String] месяц релиза
91
+ # @param [Hash] opts the optional parameters
92
+ # @option opts [Integer] :page номер страницы (default to 1)
93
+ # @return [DigitalReleaseResponse]
94
+ def api_v21_films_releases_get(year, month, opts = {})
95
+ data, _status_code, _headers = api_v21_films_releases_get_with_http_info(year, month, opts)
96
+ data
97
+ end
98
+
99
+ # получить список цифровых релизов
100
+ # Данный эндпоинт возвращает список цифровых релизов. Например https://www.kinopoisk.ru/comingsoon/digital/
101
+ # @param year [Integer] год релиза
102
+ # @param month [String] месяц релиза
103
+ # @param [Hash] opts the optional parameters
104
+ # @option opts [Integer] :page номер страницы
105
+ # @return [Array<(DigitalReleaseResponse, Integer, Hash)>] DigitalReleaseResponse data, response status code and response headers
106
+ def api_v21_films_releases_get_with_http_info(year, month, opts = {})
107
+ if @api_client.config.debugging
108
+ @api_client.config.logger.debug "Calling API: FilmsApi.api_v21_films_releases_get ..."
109
+ end
110
+ # verify the required parameter 'year' is set
111
+ if @api_client.config.client_side_validation && year.nil?
112
+ raise ArgumentError,
113
+ "Missing the required parameter 'year' when calling FilmsApi.api_v21_films_releases_get"
114
+ end
115
+ # verify the required parameter 'month' is set
116
+ if @api_client.config.client_side_validation && month.nil?
117
+ raise ArgumentError,
118
+ "Missing the required parameter 'month' when calling FilmsApi.api_v21_films_releases_get"
119
+ end
120
+
121
+ # verify enum value
122
+ allowable_values = %w[JANUARY FEBRUARY MARCH APRIL MAY JUNE JULY AUGUST SEPTEMBER OCTOBER NOVEMBER DECEMBER]
123
+ if @api_client.config.client_side_validation && !allowable_values.include?(month)
124
+ raise ArgumentError,
125
+ "invalid value for \"month\", must be one of #{allowable_values}"
126
+ end
127
+ if @api_client.config.client_side_validation && !opts[:page].nil? && opts[:page] > 20
128
+ raise ArgumentError,
129
+ 'invalid value for "opts[:"page"]" when calling FilmsApi.api_v21_films_releases_get, must be smaller than or equal to 20.'
130
+ end
131
+
132
+ if @api_client.config.client_side_validation && !opts[:page].nil? && opts[:page] < 1
133
+ raise ArgumentError,
134
+ 'invalid value for "opts[:"page"]" when calling FilmsApi.api_v21_films_releases_get, must be greater than or equal to 1.'
135
+ end
136
+
137
+ # resource path
138
+ local_var_path = "/api/v2.1/films/releases"
139
+
140
+ # query parameters
141
+ query_params = opts[:query_params] || {}
142
+ query_params[:year] = year
143
+ query_params[:month] = month
144
+ query_params[:page] = opts[:page] unless opts[:page].nil?
145
+
146
+ # header parameters
147
+ header_params = opts[:header_params] || {}
148
+ # HTTP header 'Accept' (if needed)
149
+ header_params["Accept"] = @api_client.select_header_accept(["application/json"])
150
+
151
+ # form parameters
152
+ form_params = opts[:form_params] || {}
153
+
154
+ # http body (model)
155
+ post_body = opts[:debug_body]
156
+
157
+ # return_type
158
+ return_type = opts[:debug_return_type] || "DigitalReleaseResponse"
159
+
160
+ # auth_names
161
+ auth_names = opts[:debug_auth_names] || ["ApiKeyAuth"]
162
+
163
+ new_options = opts.merge(
164
+ operation: :"FilmsApi.api_v21_films_releases_get",
165
+ header_params: header_params,
166
+ query_params: query_params,
167
+ form_params: form_params,
168
+ body: post_body,
169
+ auth_names: auth_names,
170
+ return_type: return_type
171
+ )
172
+
173
+ data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
174
+ if @api_client.config.debugging
175
+ @api_client.config.logger.debug "API called: FilmsApi#api_v21_films_releases_get\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
176
+ end
177
+ [data, status_code, headers]
178
+ end
179
+
180
+ # получить список фильмов по ключевым словам
181
+ # Возвращает список фильмов с пагинацией. Каждая страница содержит не более чем 20 фильмов.
182
+ # @param keyword [String] ключивые слова для поиска
183
+ # @param [Hash] opts the optional parameters
184
+ # @option opts [Integer] :page номер страницы (default to 1)
185
+ # @return [FilmSearchResponse]
186
+ def api_v21_films_search_by_keyword_get(keyword, opts = {})
187
+ data, _status_code, _headers = api_v21_films_search_by_keyword_get_with_http_info(keyword, opts)
188
+ data
189
+ end
190
+
191
+ # получить список фильмов по ключевым словам
192
+ # Возвращает список фильмов с пагинацией. Каждая страница содержит не более чем 20 фильмов.
193
+ # @param keyword [String] ключивые слова для поиска
194
+ # @param [Hash] opts the optional parameters
195
+ # @option opts [Integer] :page номер страницы
196
+ # @return [Array<(FilmSearchResponse, Integer, Hash)>] FilmSearchResponse data, response status code and response headers
197
+ def api_v21_films_search_by_keyword_get_with_http_info(keyword, opts = {})
198
+ if @api_client.config.debugging
199
+ @api_client.config.logger.debug "Calling API: FilmsApi.api_v21_films_search_by_keyword_get ..."
200
+ end
201
+ # verify the required parameter 'keyword' is set
202
+ if @api_client.config.client_side_validation && keyword.nil?
203
+ raise ArgumentError,
204
+ "Missing the required parameter 'keyword' when calling FilmsApi.api_v21_films_search_by_keyword_get"
205
+ end
206
+ if @api_client.config.client_side_validation && !opts[:page].nil? && opts[:page] > 20
207
+ raise ArgumentError,
208
+ 'invalid value for "opts[:"page"]" when calling FilmsApi.api_v21_films_search_by_keyword_get, must be smaller than or equal to 20.'
209
+ end
210
+
211
+ if @api_client.config.client_side_validation && !opts[:page].nil? && opts[:page] < 1
212
+ raise ArgumentError,
213
+ 'invalid value for "opts[:"page"]" when calling FilmsApi.api_v21_films_search_by_keyword_get, must be greater than or equal to 1.'
214
+ end
215
+
216
+ # resource path
217
+ local_var_path = "/api/v2.1/films/search-by-keyword"
218
+
219
+ # query parameters
220
+ query_params = opts[:query_params] || {}
221
+ query_params[:keyword] = keyword
222
+ query_params[:page] = opts[:page] unless opts[:page].nil?
223
+
224
+ # header parameters
225
+ header_params = opts[:header_params] || {}
226
+ # HTTP header 'Accept' (if needed)
227
+ header_params["Accept"] = @api_client.select_header_accept(["application/json"])
228
+
229
+ # form parameters
230
+ form_params = opts[:form_params] || {}
231
+
232
+ # http body (model)
233
+ post_body = opts[:debug_body]
234
+
235
+ # return_type
236
+ return_type = opts[:debug_return_type] || "FilmSearchResponse"
237
+
238
+ # auth_names
239
+ auth_names = opts[:debug_auth_names] || ["ApiKeyAuth"]
240
+
241
+ new_options = opts.merge(
242
+ operation: :"FilmsApi.api_v21_films_search_by_keyword_get",
243
+ header_params: header_params,
244
+ query_params: query_params,
245
+ form_params: form_params,
246
+ body: post_body,
247
+ auth_names: auth_names,
248
+ return_type: return_type
249
+ )
250
+
251
+ data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
252
+ if @api_client.config.debugging
253
+ @api_client.config.logger.debug "API called: FilmsApi#api_v21_films_search_by_keyword_get\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
254
+ end
255
+ [data, status_code, headers]
256
+ end
257
+
258
+ # получить id стран и жанров для использования в /api/v2.2/films
259
+ # Возвращает список id стран и жанров, которые могут быть использованы в /api/v2.2/films
260
+ # @param [Hash] opts the optional parameters
261
+ # @return [FiltersResponse]
262
+ def api_v22_films_filters_get(opts = {})
263
+ data, _status_code, _headers = api_v22_films_filters_get_with_http_info(opts)
264
+ data
265
+ end
266
+
267
+ # получить id стран и жанров для использования в /api/v2.2/films
268
+ # Возвращает список id стран и жанров, которые могут быть использованы в /api/v2.2/films
269
+ # @param [Hash] opts the optional parameters
270
+ # @return [Array<(FiltersResponse, Integer, Hash)>] FiltersResponse data, response status code and response headers
271
+ def api_v22_films_filters_get_with_http_info(opts = {})
272
+ if @api_client.config.debugging
273
+ @api_client.config.logger.debug "Calling API: FilmsApi.api_v22_films_filters_get ..."
274
+ end
275
+ # resource path
276
+ local_var_path = "/api/v2.2/films/filters"
277
+
278
+ # query parameters
279
+ query_params = opts[:query_params] || {}
280
+
281
+ # header parameters
282
+ header_params = opts[:header_params] || {}
283
+ # HTTP header 'Accept' (if needed)
284
+ header_params["Accept"] = @api_client.select_header_accept(["application/json"])
285
+
286
+ # form parameters
287
+ form_params = opts[:form_params] || {}
288
+
289
+ # http body (model)
290
+ post_body = opts[:debug_body]
291
+
292
+ # return_type
293
+ return_type = opts[:debug_return_type] || "FiltersResponse"
294
+
295
+ # auth_names
296
+ auth_names = opts[:debug_auth_names] || ["ApiKeyAuth"]
297
+
298
+ new_options = opts.merge(
299
+ operation: :"FilmsApi.api_v22_films_filters_get",
300
+ header_params: header_params,
301
+ query_params: query_params,
302
+ form_params: form_params,
303
+ body: post_body,
304
+ auth_names: auth_names,
305
+ return_type: return_type
306
+ )
307
+
308
+ data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
309
+ if @api_client.config.debugging
310
+ @api_client.config.logger.debug "API called: FilmsApi#api_v22_films_filters_get\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
311
+ end
312
+ [data, status_code, headers]
313
+ end
314
+
315
+ # получить список фильмов по различным фильтрам
316
+ # Возвращает список фильмов с пагинацией. Каждая страница содержит не более чем 20 фильмов. Данный эндпоинт не возращает более 400 фильмов. <i>Используй /api/v2.2/films/filters чтобы получить id стран и жанров.</i>
317
+ # @param [Hash] opts the optional parameters
318
+ # @option opts [Array<Integer>] :countries список id стран разделенные запятой. Например &lt;i&gt;countries&#x3D;1,2,3&lt;/i&gt;. На данный момент можно указать не более одной страны.
319
+ # @option opts [Array<Integer>] :genres список id жанров разделенные запятой. Например &lt;i&gt;genres&#x3D;1,2,3&lt;/i&gt;. На данный момент можно указать не более одного жанра.
320
+ # @option opts [String] :order сортировка (default to 'RATING')
321
+ # @option opts [String] :type тип фильма (default to 'ALL')
322
+ # @option opts [Integer] :rating_from минимальный рейтинг (default to 0)
323
+ # @option opts [Integer] :rating_to максимальный рейтинг (default to 10)
324
+ # @option opts [Integer] :year_from минимальный год (default to 1000)
325
+ # @option opts [Integer] :year_to максимальный год (default to 3000)
326
+ # @option opts [String] :imdb_id imdb id
327
+ # @option opts [String] :keyword ключевое слово, которое встречается в названии фильма
328
+ # @option opts [Integer] :page номер страницы (default to 1)
329
+ # @return [FilmSearchByFiltersResponse]
330
+ def api_v22_films_get(opts = {})
331
+ data, _status_code, _headers = api_v22_films_get_with_http_info(opts)
332
+ data
333
+ end
334
+
335
+ # получить список фильмов по различным фильтрам
336
+ # Возвращает список фильмов с пагинацией. Каждая страница содержит не более чем 20 фильмов. Данный эндпоинт не возращает более 400 фильмов. &lt;i&gt;Используй /api/v2.2/films/filters чтобы получить id стран и жанров.&lt;/i&gt;
337
+ # @param [Hash] opts the optional parameters
338
+ # @option opts [Array<Integer>] :countries список id стран разделенные запятой. Например &lt;i&gt;countries&#x3D;1,2,3&lt;/i&gt;. На данный момент можно указать не более одной страны.
339
+ # @option opts [Array<Integer>] :genres список id жанров разделенные запятой. Например &lt;i&gt;genres&#x3D;1,2,3&lt;/i&gt;. На данный момент можно указать не более одного жанра.
340
+ # @option opts [String] :order сортировка
341
+ # @option opts [String] :type тип фильма
342
+ # @option opts [Integer] :rating_from минимальный рейтинг
343
+ # @option opts [Integer] :rating_to максимальный рейтинг
344
+ # @option opts [Integer] :year_from минимальный год
345
+ # @option opts [Integer] :year_to максимальный год
346
+ # @option opts [String] :imdb_id imdb id
347
+ # @option opts [String] :keyword ключевое слово, которое встречается в названии фильма
348
+ # @option opts [Integer] :page номер страницы
349
+ # @return [Array<(FilmSearchByFiltersResponse, Integer, Hash)>] FilmSearchByFiltersResponse data, response status code and response headers
350
+ def api_v22_films_get_with_http_info(opts = {})
351
+ @api_client.config.logger.debug "Calling API: FilmsApi.api_v22_films_get ..." if @api_client.config.debugging
352
+ allowable_values = %w[RATING NUM_VOTE YEAR]
353
+ if @api_client.config.client_side_validation && opts[:order] && !allowable_values.include?(opts[:order])
354
+ raise ArgumentError,
355
+ "invalid value for \"order\", must be one of #{allowable_values}"
356
+ end
357
+
358
+ allowable_values = %w[FILM VIDEO TV_SERIES MINI_SERIES TV_SHOW ALL]
359
+ if @api_client.config.client_side_validation && opts[:type] && !allowable_values.include?(opts[:type])
360
+ raise ArgumentError,
361
+ "invalid value for \"type\", must be one of #{allowable_values}"
362
+ end
363
+ if @api_client.config.client_side_validation && !opts[:page].nil? && opts[:page] > 20
364
+ raise ArgumentError,
365
+ 'invalid value for "opts[:"page"]" when calling FilmsApi.api_v22_films_get, must be smaller than or equal to 20.'
366
+ end
367
+
368
+ if @api_client.config.client_side_validation && !opts[:page].nil? && opts[:page] < 1
369
+ raise ArgumentError,
370
+ 'invalid value for "opts[:"page"]" when calling FilmsApi.api_v22_films_get, must be greater than or equal to 1.'
371
+ end
372
+
373
+ # resource path
374
+ local_var_path = "/api/v2.2/films"
375
+
376
+ # query parameters
377
+ query_params = opts[:query_params] || {}
378
+ unless opts[:countries].nil?
379
+ query_params[:countries] =
380
+ @api_client.build_collection_param(opts[:countries], :multi)
381
+ end
382
+ query_params[:genres] = @api_client.build_collection_param(opts[:genres], :multi) unless opts[:genres].nil?
383
+ query_params[:order] = opts[:order] unless opts[:order].nil?
384
+ query_params[:type] = opts[:type] unless opts[:type].nil?
385
+ query_params[:ratingFrom] = opts[:rating_from] unless opts[:rating_from].nil?
386
+ query_params[:ratingTo] = opts[:rating_to] unless opts[:rating_to].nil?
387
+ query_params[:yearFrom] = opts[:year_from] unless opts[:year_from].nil?
388
+ query_params[:yearTo] = opts[:year_to] unless opts[:year_to].nil?
389
+ query_params[:imdbId] = opts[:imdb_id] unless opts[:imdb_id].nil?
390
+ query_params[:keyword] = opts[:keyword] unless opts[:keyword].nil?
391
+ query_params[:page] = opts[:page] unless opts[:page].nil?
392
+
393
+ # header parameters
394
+ header_params = opts[:header_params] || {}
395
+ # HTTP header 'Accept' (if needed)
396
+ header_params["Accept"] = @api_client.select_header_accept(["application/json"])
397
+
398
+ # form parameters
399
+ form_params = opts[:form_params] || {}
400
+
401
+ # http body (model)
402
+ post_body = opts[:debug_body]
403
+
404
+ # return_type
405
+ return_type = opts[:debug_return_type] || "FilmSearchByFiltersResponse"
406
+
407
+ # auth_names
408
+ auth_names = opts[:debug_auth_names] || ["ApiKeyAuth"]
409
+
410
+ new_options = opts.merge(
411
+ operation: :"FilmsApi.api_v22_films_get",
412
+ header_params: header_params,
413
+ query_params: query_params,
414
+ form_params: form_params,
415
+ body: post_body,
416
+ auth_names: auth_names,
417
+ return_type: return_type
418
+ )
419
+
420
+ data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
421
+ if @api_client.config.debugging
422
+ @api_client.config.logger.debug "API called: FilmsApi#api_v22_films_get\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
423
+ end
424
+ [data, status_code, headers]
425
+ end
426
+
427
+ # получить данные о бюджете и сборах фильма по kinopoisk film id
428
+ # Данный эндпоинт возвращает данные о бюджете и сборах.
429
+ # @param id [Integer] kinopoisk film id
430
+ # @param [Hash] opts the optional parameters
431
+ # @return [BoxOfficeResponse]
432
+ def api_v22_films_id_box_office_get(id, opts = {})
433
+ data, _status_code, _headers = api_v22_films_id_box_office_get_with_http_info(id, opts)
434
+ data
435
+ end
436
+
437
+ # получить данные о бюджете и сборах фильма по kinopoisk film id
438
+ # Данный эндпоинт возвращает данные о бюджете и сборах.
439
+ # @param id [Integer] kinopoisk film id
440
+ # @param [Hash] opts the optional parameters
441
+ # @return [Array<(BoxOfficeResponse, Integer, Hash)>] BoxOfficeResponse data, response status code and response headers
442
+ def api_v22_films_id_box_office_get_with_http_info(id, opts = {})
443
+ if @api_client.config.debugging
444
+ @api_client.config.logger.debug "Calling API: FilmsApi.api_v22_films_id_box_office_get ..."
445
+ end
446
+ # verify the required parameter 'id' is set
447
+ if @api_client.config.client_side_validation && id.nil?
448
+ raise ArgumentError,
449
+ "Missing the required parameter 'id' when calling FilmsApi.api_v22_films_id_box_office_get"
450
+ end
451
+ if @api_client.config.client_side_validation && id > 5000000
452
+ raise ArgumentError,
453
+ 'invalid value for "id" when calling FilmsApi.api_v22_films_id_box_office_get, must be smaller than or equal to 5000000.'
454
+ end
455
+
456
+ if @api_client.config.client_side_validation && id < 1
457
+ raise ArgumentError,
458
+ 'invalid value for "id" when calling FilmsApi.api_v22_films_id_box_office_get, must be greater than or equal to 1.'
459
+ end
460
+
461
+ # resource path
462
+ local_var_path = "/api/v2.2/films/{id}/box_office".sub("{id}", CGI.escape(id.to_s))
463
+
464
+ # query parameters
465
+ query_params = opts[:query_params] || {}
466
+
467
+ # header parameters
468
+ header_params = opts[:header_params] || {}
469
+ # HTTP header 'Accept' (if needed)
470
+ header_params["Accept"] = @api_client.select_header_accept(["application/json"])
471
+
472
+ # form parameters
473
+ form_params = opts[:form_params] || {}
474
+
475
+ # http body (model)
476
+ post_body = opts[:debug_body]
477
+
478
+ # return_type
479
+ return_type = opts[:debug_return_type] || "BoxOfficeResponse"
480
+
481
+ # auth_names
482
+ auth_names = opts[:debug_auth_names] || ["ApiKeyAuth"]
483
+
484
+ new_options = opts.merge(
485
+ operation: :"FilmsApi.api_v22_films_id_box_office_get",
486
+ header_params: header_params,
487
+ query_params: query_params,
488
+ form_params: form_params,
489
+ body: post_body,
490
+ auth_names: auth_names,
491
+ return_type: return_type
492
+ )
493
+
494
+ data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
495
+ if @api_client.config.debugging
496
+ @api_client.config.logger.debug "API called: FilmsApi#api_v22_films_id_box_office_get\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
497
+ end
498
+ [data, status_code, headers]
499
+ end
500
+
501
+ # получить данные о прокате фильма по kinopoisk film id
502
+ # Данный эндпоинт возвращает данные о прокате в разных странах.
503
+ # @param id [Integer] kinopoisk film id
504
+ # @param [Hash] opts the optional parameters
505
+ # @return [DistributionResponse]
506
+ def api_v22_films_id_distributions_get(id, opts = {})
507
+ data, _status_code, _headers = api_v22_films_id_distributions_get_with_http_info(id, opts)
508
+ data
509
+ end
510
+
511
+ # получить данные о прокате фильма по kinopoisk film id
512
+ # Данный эндпоинт возвращает данные о прокате в разных странах.
513
+ # @param id [Integer] kinopoisk film id
514
+ # @param [Hash] opts the optional parameters
515
+ # @return [Array<(DistributionResponse, Integer, Hash)>] DistributionResponse data, response status code and response headers
516
+ def api_v22_films_id_distributions_get_with_http_info(id, opts = {})
517
+ if @api_client.config.debugging
518
+ @api_client.config.logger.debug "Calling API: FilmsApi.api_v22_films_id_distributions_get ..."
519
+ end
520
+ # verify the required parameter 'id' is set
521
+ if @api_client.config.client_side_validation && id.nil?
522
+ raise ArgumentError,
523
+ "Missing the required parameter 'id' when calling FilmsApi.api_v22_films_id_distributions_get"
524
+ end
525
+ if @api_client.config.client_side_validation && id > 5000000
526
+ raise ArgumentError,
527
+ 'invalid value for "id" when calling FilmsApi.api_v22_films_id_distributions_get, must be smaller than or equal to 5000000.'
528
+ end
529
+
530
+ if @api_client.config.client_side_validation && id < 1
531
+ raise ArgumentError,
532
+ 'invalid value for "id" when calling FilmsApi.api_v22_films_id_distributions_get, must be greater than or equal to 1.'
533
+ end
534
+
535
+ # resource path
536
+ local_var_path = "/api/v2.2/films/{id}/distributions".sub("{id}", CGI.escape(id.to_s))
537
+
538
+ # query parameters
539
+ query_params = opts[:query_params] || {}
540
+
541
+ # header parameters
542
+ header_params = opts[:header_params] || {}
543
+ # HTTP header 'Accept' (if needed)
544
+ header_params["Accept"] = @api_client.select_header_accept(["application/json"])
545
+
546
+ # form parameters
547
+ form_params = opts[:form_params] || {}
548
+
549
+ # http body (model)
550
+ post_body = opts[:debug_body]
551
+
552
+ # return_type
553
+ return_type = opts[:debug_return_type] || "DistributionResponse"
554
+
555
+ # auth_names
556
+ auth_names = opts[:debug_auth_names] || ["ApiKeyAuth"]
557
+
558
+ new_options = opts.merge(
559
+ operation: :"FilmsApi.api_v22_films_id_distributions_get",
560
+ header_params: header_params,
561
+ query_params: query_params,
562
+ form_params: form_params,
563
+ body: post_body,
564
+ auth_names: auth_names,
565
+ return_type: return_type
566
+ )
567
+
568
+ data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
569
+ if @api_client.config.debugging
570
+ @api_client.config.logger.debug "API called: FilmsApi#api_v22_films_id_distributions_get\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
571
+ end
572
+ [data, status_code, headers]
573
+ end
574
+
575
+ # получить данные о фактах и ошибках в фильме по kinopoisk film id
576
+ # Данный эндпоинт возвращает список фактов и ошибок в фильме. <br> type - <b>FACT</b>, обозначает интересный факт о фильме. <br> type - <b>BLOOPER</b>, обозначает ошибку в фильме.
577
+ # @param id [Integer] kinopoisk film id
578
+ # @param [Hash] opts the optional parameters
579
+ # @return [FactResponse]
580
+ def api_v22_films_id_facts_get(id, opts = {})
581
+ data, _status_code, _headers = api_v22_films_id_facts_get_with_http_info(id, opts)
582
+ data
583
+ end
584
+
585
+ # получить данные о фактах и ошибках в фильме по kinopoisk film id
586
+ # Данный эндпоинт возвращает список фактов и ошибок в фильме. &lt;br&gt; type - &lt;b&gt;FACT&lt;/b&gt;, обозначает интересный факт о фильме. &lt;br&gt; type - &lt;b&gt;BLOOPER&lt;/b&gt;, обозначает ошибку в фильме.
587
+ # @param id [Integer] kinopoisk film id
588
+ # @param [Hash] opts the optional parameters
589
+ # @return [Array<(FactResponse, Integer, Hash)>] FactResponse data, response status code and response headers
590
+ def api_v22_films_id_facts_get_with_http_info(id, opts = {})
591
+ if @api_client.config.debugging
592
+ @api_client.config.logger.debug "Calling API: FilmsApi.api_v22_films_id_facts_get ..."
593
+ end
594
+ # verify the required parameter 'id' is set
595
+ if @api_client.config.client_side_validation && id.nil?
596
+ raise ArgumentError,
597
+ "Missing the required parameter 'id' when calling FilmsApi.api_v22_films_id_facts_get"
598
+ end
599
+ if @api_client.config.client_side_validation && id > 5000000
600
+ raise ArgumentError,
601
+ 'invalid value for "id" when calling FilmsApi.api_v22_films_id_facts_get, must be smaller than or equal to 5000000.'
602
+ end
603
+
604
+ if @api_client.config.client_side_validation && id < 1
605
+ raise ArgumentError,
606
+ 'invalid value for "id" when calling FilmsApi.api_v22_films_id_facts_get, must be greater than or equal to 1.'
607
+ end
608
+
609
+ # resource path
610
+ local_var_path = "/api/v2.2/films/{id}/facts".sub("{id}", CGI.escape(id.to_s))
611
+
612
+ # query parameters
613
+ query_params = opts[:query_params] || {}
614
+
615
+ # header parameters
616
+ header_params = opts[:header_params] || {}
617
+ # HTTP header 'Accept' (if needed)
618
+ header_params["Accept"] = @api_client.select_header_accept(["application/json"])
619
+
620
+ # form parameters
621
+ form_params = opts[:form_params] || {}
622
+
623
+ # http body (model)
624
+ post_body = opts[:debug_body]
625
+
626
+ # return_type
627
+ return_type = opts[:debug_return_type] || "FactResponse"
628
+
629
+ # auth_names
630
+ auth_names = opts[:debug_auth_names] || ["ApiKeyAuth"]
631
+
632
+ new_options = opts.merge(
633
+ operation: :"FilmsApi.api_v22_films_id_facts_get",
634
+ header_params: header_params,
635
+ query_params: query_params,
636
+ form_params: form_params,
637
+ body: post_body,
638
+ auth_names: auth_names,
639
+ return_type: return_type
640
+ )
641
+
642
+ data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
643
+ if @api_client.config.debugging
644
+ @api_client.config.logger.debug "API called: FilmsApi#api_v22_films_id_facts_get\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
645
+ end
646
+ [data, status_code, headers]
647
+ end
648
+
649
+ # получить данные о фильме по kinopoisk id
650
+ # Данный эндпоинт возвращает базовые данные о фильме. Поле <b>lastSync</b> показывает дату последнего обновления данных.
651
+ # @param id [Integer] kinopoisk film id
652
+ # @param [Hash] opts the optional parameters
653
+ # @return [Film]
654
+ def api_v22_films_id_get(id, opts = {})
655
+ data, _status_code, _headers = api_v22_films_id_get_with_http_info(id, opts)
656
+ data
657
+ end
658
+
659
+ # получить данные о фильме по kinopoisk id
660
+ # Данный эндпоинт возвращает базовые данные о фильме. Поле &lt;b&gt;lastSync&lt;/b&gt; показывает дату последнего обновления данных.
661
+ # @param id [Integer] kinopoisk film id
662
+ # @param [Hash] opts the optional parameters
663
+ # @return [Array<(Film, Integer, Hash)>] Film data, response status code and response headers
664
+ def api_v22_films_id_get_with_http_info(id, opts = {})
665
+ @api_client.config.logger.debug "Calling API: FilmsApi.api_v22_films_id_get ..." if @api_client.config.debugging
666
+ # verify the required parameter 'id' is set
667
+ if @api_client.config.client_side_validation && id.nil?
668
+ raise ArgumentError,
669
+ "Missing the required parameter 'id' when calling FilmsApi.api_v22_films_id_get"
670
+ end
671
+ if @api_client.config.client_side_validation && id > 5000000
672
+ raise ArgumentError,
673
+ 'invalid value for "id" when calling FilmsApi.api_v22_films_id_get, must be smaller than or equal to 5000000.'
674
+ end
675
+
676
+ if @api_client.config.client_side_validation && id < 1
677
+ raise ArgumentError,
678
+ 'invalid value for "id" when calling FilmsApi.api_v22_films_id_get, must be greater than or equal to 1.'
679
+ end
680
+
681
+ # resource path
682
+ local_var_path = "/api/v2.2/films/{id}".sub("{id}", CGI.escape(id.to_s))
683
+
684
+ # query parameters
685
+ query_params = opts[:query_params] || {}
686
+
687
+ # header parameters
688
+ header_params = opts[:header_params] || {}
689
+ # HTTP header 'Accept' (if needed)
690
+ header_params["Accept"] = @api_client.select_header_accept(["application/json"])
691
+
692
+ # form parameters
693
+ form_params = opts[:form_params] || {}
694
+
695
+ # http body (model)
696
+ post_body = opts[:debug_body]
697
+
698
+ # return_type
699
+ return_type = opts[:debug_return_type] || "Film"
700
+
701
+ # auth_names
702
+ auth_names = opts[:debug_auth_names] || ["ApiKeyAuth"]
703
+
704
+ new_options = opts.merge(
705
+ operation: :"FilmsApi.api_v22_films_id_get",
706
+ header_params: header_params,
707
+ query_params: query_params,
708
+ form_params: form_params,
709
+ body: post_body,
710
+ auth_names: auth_names,
711
+ return_type: return_type
712
+ )
713
+
714
+ data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
715
+ if @api_client.config.debugging
716
+ @api_client.config.logger.debug "API called: FilmsApi#api_v22_films_id_get\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
717
+ end
718
+ [data, status_code, headers]
719
+ end
720
+
721
+ # получить изображения(кадры, постеры, фан-арты, обои и т.д.) связанные с фильмом по kinopoisk film id
722
+ # Данный эндпоинт возвращает изображения связанные с фильмом с пагинацией. Каждая страница содержит <b>не более чем 20 фильмов</b>.</br> Доступные изображения:</br> <ul> <li>STILL - кадры</li> <li>SHOOTING - изображения со съемок</li> <li>POSTER - постеры</li> <li>FAN_ART - фан-арты</li> <li>PROMO - промо</li> <li>CONCEPT - концепт-арты</li> <li>WALLPAPER - обои</li> <li>COVER - обложки</li> <li>SCREENSHOT - скриншоты</li> </ul>
723
+ # @param id [Integer] kinopoisk film id
724
+ # @param [Hash] opts the optional parameters
725
+ # @option opts [String] :type тип изображения (default to 'STILL')
726
+ # @option opts [Integer] :page номер страницы (default to 1)
727
+ # @return [ImageResponse]
728
+ def api_v22_films_id_images_get(id, opts = {})
729
+ data, _status_code, _headers = api_v22_films_id_images_get_with_http_info(id, opts)
730
+ data
731
+ end
732
+
733
+ # получить изображения(кадры, постеры, фан-арты, обои и т.д.) связанные с фильмом по kinopoisk film id
734
+ # Данный эндпоинт возвращает изображения связанные с фильмом с пагинацией. Каждая страница содержит &lt;b&gt;не более чем 20 фильмов&lt;/b&gt;.&lt;/br&gt; Доступные изображения:&lt;/br&gt; &lt;ul&gt; &lt;li&gt;STILL - кадры&lt;/li&gt; &lt;li&gt;SHOOTING - изображения со съемок&lt;/li&gt; &lt;li&gt;POSTER - постеры&lt;/li&gt; &lt;li&gt;FAN_ART - фан-арты&lt;/li&gt; &lt;li&gt;PROMO - промо&lt;/li&gt; &lt;li&gt;CONCEPT - концепт-арты&lt;/li&gt; &lt;li&gt;WALLPAPER - обои&lt;/li&gt; &lt;li&gt;COVER - обложки&lt;/li&gt; &lt;li&gt;SCREENSHOT - скриншоты&lt;/li&gt; &lt;/ul&gt;
735
+ # @param id [Integer] kinopoisk film id
736
+ # @param [Hash] opts the optional parameters
737
+ # @option opts [String] :type тип изображения
738
+ # @option opts [Integer] :page номер страницы
739
+ # @return [Array<(ImageResponse, Integer, Hash)>] ImageResponse data, response status code and response headers
740
+ def api_v22_films_id_images_get_with_http_info(id, opts = {})
741
+ if @api_client.config.debugging
742
+ @api_client.config.logger.debug "Calling API: FilmsApi.api_v22_films_id_images_get ..."
743
+ end
744
+ # verify the required parameter 'id' is set
745
+ if @api_client.config.client_side_validation && id.nil?
746
+ raise ArgumentError,
747
+ "Missing the required parameter 'id' when calling FilmsApi.api_v22_films_id_images_get"
748
+ end
749
+ if @api_client.config.client_side_validation && id > 5000000
750
+ raise ArgumentError,
751
+ 'invalid value for "id" when calling FilmsApi.api_v22_films_id_images_get, must be smaller than or equal to 5000000.'
752
+ end
753
+
754
+ if @api_client.config.client_side_validation && id < 1
755
+ raise ArgumentError,
756
+ 'invalid value for "id" when calling FilmsApi.api_v22_films_id_images_get, must be greater than or equal to 1.'
757
+ end
758
+
759
+ allowable_values = %w[STILL SHOOTING POSTER FAN_ART PROMO CONCEPT WALLPAPER COVER SCREENSHOT]
760
+ if @api_client.config.client_side_validation && opts[:type] && !allowable_values.include?(opts[:type])
761
+ raise ArgumentError,
762
+ "invalid value for \"type\", must be one of #{allowable_values}"
763
+ end
764
+ if @api_client.config.client_side_validation && !opts[:page].nil? && opts[:page] > 20
765
+ raise ArgumentError,
766
+ 'invalid value for "opts[:"page"]" when calling FilmsApi.api_v22_films_id_images_get, must be smaller than or equal to 20.'
767
+ end
768
+
769
+ if @api_client.config.client_side_validation && !opts[:page].nil? && opts[:page] < 1
770
+ raise ArgumentError,
771
+ 'invalid value for "opts[:"page"]" when calling FilmsApi.api_v22_films_id_images_get, must be greater than or equal to 1.'
772
+ end
773
+
774
+ # resource path
775
+ local_var_path = "/api/v2.2/films/{id}/images".sub("{id}", CGI.escape(id.to_s))
776
+
777
+ # query parameters
778
+ query_params = opts[:query_params] || {}
779
+ query_params[:type] = opts[:type] unless opts[:type].nil?
780
+ query_params[:page] = opts[:page] unless opts[:page].nil?
781
+
782
+ # header parameters
783
+ header_params = opts[:header_params] || {}
784
+ # HTTP header 'Accept' (if needed)
785
+ header_params["Accept"] = @api_client.select_header_accept(["application/json"])
786
+
787
+ # form parameters
788
+ form_params = opts[:form_params] || {}
789
+
790
+ # http body (model)
791
+ post_body = opts[:debug_body]
792
+
793
+ # return_type
794
+ return_type = opts[:debug_return_type] || "ImageResponse"
795
+
796
+ # auth_names
797
+ auth_names = opts[:debug_auth_names] || ["ApiKeyAuth"]
798
+
799
+ new_options = opts.merge(
800
+ operation: :"FilmsApi.api_v22_films_id_images_get",
801
+ header_params: header_params,
802
+ query_params: query_params,
803
+ form_params: form_params,
804
+ body: post_body,
805
+ auth_names: auth_names,
806
+ return_type: return_type
807
+ )
808
+
809
+ data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
810
+ if @api_client.config.debugging
811
+ @api_client.config.logger.debug "API called: FilmsApi#api_v22_films_id_images_get\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
812
+ end
813
+ [data, status_code, headers]
814
+ end
815
+
816
+ # получить данные о сезонах для сериала по kinopoisk film id
817
+ # Данный эндпоинт возвращает данные о сезонах для сериала.
818
+ # @param id [Integer] kinopoisk film id
819
+ # @param [Hash] opts the optional parameters
820
+ # @return [SeasonResponse]
821
+ def api_v22_films_id_seasons_get(id, opts = {})
822
+ data, _status_code, _headers = api_v22_films_id_seasons_get_with_http_info(id, opts)
823
+ data
824
+ end
825
+
826
+ # получить данные о сезонах для сериала по kinopoisk film id
827
+ # Данный эндпоинт возвращает данные о сезонах для сериала.
828
+ # @param id [Integer] kinopoisk film id
829
+ # @param [Hash] opts the optional parameters
830
+ # @return [Array<(SeasonResponse, Integer, Hash)>] SeasonResponse data, response status code and response headers
831
+ def api_v22_films_id_seasons_get_with_http_info(id, opts = {})
832
+ if @api_client.config.debugging
833
+ @api_client.config.logger.debug "Calling API: FilmsApi.api_v22_films_id_seasons_get ..."
834
+ end
835
+ # verify the required parameter 'id' is set
836
+ if @api_client.config.client_side_validation && id.nil?
837
+ raise ArgumentError,
838
+ "Missing the required parameter 'id' when calling FilmsApi.api_v22_films_id_seasons_get"
839
+ end
840
+ if @api_client.config.client_side_validation && id > 5000000
841
+ raise ArgumentError,
842
+ 'invalid value for "id" when calling FilmsApi.api_v22_films_id_seasons_get, must be smaller than or equal to 5000000.'
843
+ end
844
+
845
+ if @api_client.config.client_side_validation && id < 1
846
+ raise ArgumentError,
847
+ 'invalid value for "id" when calling FilmsApi.api_v22_films_id_seasons_get, must be greater than or equal to 1.'
848
+ end
849
+
850
+ # resource path
851
+ local_var_path = "/api/v2.2/films/{id}/seasons".sub("{id}", CGI.escape(id.to_s))
852
+
853
+ # query parameters
854
+ query_params = opts[:query_params] || {}
855
+
856
+ # header parameters
857
+ header_params = opts[:header_params] || {}
858
+ # HTTP header 'Accept' (if needed)
859
+ header_params["Accept"] = @api_client.select_header_accept(["application/json"])
860
+
861
+ # form parameters
862
+ form_params = opts[:form_params] || {}
863
+
864
+ # http body (model)
865
+ post_body = opts[:debug_body]
866
+
867
+ # return_type
868
+ return_type = opts[:debug_return_type] || "SeasonResponse"
869
+
870
+ # auth_names
871
+ auth_names = opts[:debug_auth_names] || ["ApiKeyAuth"]
872
+
873
+ new_options = opts.merge(
874
+ operation: :"FilmsApi.api_v22_films_id_seasons_get",
875
+ header_params: header_params,
876
+ query_params: query_params,
877
+ form_params: form_params,
878
+ body: post_body,
879
+ auth_names: auth_names,
880
+ return_type: return_type
881
+ )
882
+
883
+ data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
884
+ if @api_client.config.debugging
885
+ @api_client.config.logger.debug "API called: FilmsApi#api_v22_films_id_seasons_get\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
886
+ end
887
+ [data, status_code, headers]
888
+ end
889
+
890
+ # получить список похожих фильмов по kinopoisk film id
891
+ # @param id [Integer] kinopoisk film id
892
+ # @param [Hash] opts the optional parameters
893
+ # @return [RelatedFilmResponse]
894
+ def api_v22_films_id_similars_get(id, opts = {})
895
+ data, _status_code, _headers = api_v22_films_id_similars_get_with_http_info(id, opts)
896
+ data
897
+ end
898
+
899
+ # получить список похожих фильмов по kinopoisk film id
900
+ # @param id [Integer] kinopoisk film id
901
+ # @param [Hash] opts the optional parameters
902
+ # @return [Array<(RelatedFilmResponse, Integer, Hash)>] RelatedFilmResponse data, response status code and response headers
903
+ def api_v22_films_id_similars_get_with_http_info(id, opts = {})
904
+ if @api_client.config.debugging
905
+ @api_client.config.logger.debug "Calling API: FilmsApi.api_v22_films_id_similars_get ..."
906
+ end
907
+ # verify the required parameter 'id' is set
908
+ if @api_client.config.client_side_validation && id.nil?
909
+ raise ArgumentError,
910
+ "Missing the required parameter 'id' when calling FilmsApi.api_v22_films_id_similars_get"
911
+ end
912
+ if @api_client.config.client_side_validation && id > 5000000
913
+ raise ArgumentError,
914
+ 'invalid value for "id" when calling FilmsApi.api_v22_films_id_similars_get, must be smaller than or equal to 5000000.'
915
+ end
916
+
917
+ if @api_client.config.client_side_validation && id < 1
918
+ raise ArgumentError,
919
+ 'invalid value for "id" when calling FilmsApi.api_v22_films_id_similars_get, must be greater than or equal to 1.'
920
+ end
921
+
922
+ # resource path
923
+ local_var_path = "/api/v2.2/films/{id}/similars".sub("{id}", CGI.escape(id.to_s))
924
+
925
+ # query parameters
926
+ query_params = opts[:query_params] || {}
927
+
928
+ # header parameters
929
+ header_params = opts[:header_params] || {}
930
+ # HTTP header 'Accept' (if needed)
931
+ header_params["Accept"] = @api_client.select_header_accept(["application/json"])
932
+
933
+ # form parameters
934
+ form_params = opts[:form_params] || {}
935
+
936
+ # http body (model)
937
+ post_body = opts[:debug_body]
938
+
939
+ # return_type
940
+ return_type = opts[:debug_return_type] || "RelatedFilmResponse"
941
+
942
+ # auth_names
943
+ auth_names = opts[:debug_auth_names] || ["ApiKeyAuth"]
944
+
945
+ new_options = opts.merge(
946
+ operation: :"FilmsApi.api_v22_films_id_similars_get",
947
+ header_params: header_params,
948
+ query_params: query_params,
949
+ form_params: form_params,
950
+ body: post_body,
951
+ auth_names: auth_names,
952
+ return_type: return_type
953
+ )
954
+
955
+ data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
956
+ if @api_client.config.debugging
957
+ @api_client.config.logger.debug "API called: FilmsApi#api_v22_films_id_similars_get\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
958
+ end
959
+ [data, status_code, headers]
960
+ end
961
+
962
+ # получить трейлеры,тизеры,видео для фильма по kinopoisk film id
963
+ # Данный эндпоинт возвращает трейлеры,тизеры,видео для фильма по kinopoisk film id. В данный момент доступно два site: <br/> <ul><li>YOUTUBE - в этом случае <b>url</b> это просто ссылка на youtube видео.</li><li>KINOPOISK_WIDGET - в этом случае <b>url</b> это ссылка на кинопоиск виджет. Например https://widgets.kinopoisk.ru/discovery/trailer/123573?onlyPlayer=1&autoplay=1&cover=1. Если вы хотите вставить этот виджет на вашу страницу, вы можете сделать следующее: <br/><br/>&lt;script src=&quot;https://unpkg.com/@ungap/custom-elements-builtin&quot;&gt;&lt;/script&gt;<br/>&lt;script type=&quot;module&quot; src=&quot;https://unpkg.com/x-frame-bypass&quot;&gt;&lt;/script&gt;<br/>&lt;iframe is=&quot;x-frame-bypass&quot; src=&quot;https://widgets.kinopoisk.ru/discovery/trailer/167560?onlyPlayer=1&amp;autoplay=1&amp;cover=1&quot; width=&quot;500&quot; height=&quot;500&quot;&gt;&lt;/iframe&gt;</li></ul>
964
+ # @param id [Integer] kinopoisk film id
965
+ # @param [Hash] opts the optional parameters
966
+ # @return [VideoResponse]
967
+ def api_v22_films_id_videos_get(id, opts = {})
968
+ data, _status_code, _headers = api_v22_films_id_videos_get_with_http_info(id, opts)
969
+ data
970
+ end
971
+
972
+ # получить трейлеры,тизеры,видео для фильма по kinopoisk film id
973
+ # Данный эндпоинт возвращает трейлеры,тизеры,видео для фильма по kinopoisk film id. В данный момент доступно два site: &lt;br/&gt; &lt;ul&gt;&lt;li&gt;YOUTUBE - в этом случае &lt;b&gt;url&lt;/b&gt; это просто ссылка на youtube видео.&lt;/li&gt;&lt;li&gt;KINOPOISK_WIDGET - в этом случае &lt;b&gt;url&lt;/b&gt; это ссылка на кинопоиск виджет. Например https://widgets.kinopoisk.ru/discovery/trailer/123573?onlyPlayer&#x3D;1&amp;autoplay&#x3D;1&amp;cover&#x3D;1. Если вы хотите вставить этот виджет на вашу страницу, вы можете сделать следующее: &lt;br/&gt;&lt;br/&gt;&amp;lt;script src&#x3D;&amp;quot;https://unpkg.com/@ungap/custom-elements-builtin&amp;quot;&amp;gt;&amp;lt;/script&amp;gt;&lt;br/&gt;&amp;lt;script type&#x3D;&amp;quot;module&amp;quot; src&#x3D;&amp;quot;https://unpkg.com/x-frame-bypass&amp;quot;&amp;gt;&amp;lt;/script&amp;gt;&lt;br/&gt;&amp;lt;iframe is&#x3D;&amp;quot;x-frame-bypass&amp;quot; src&#x3D;&amp;quot;https://widgets.kinopoisk.ru/discovery/trailer/167560?onlyPlayer&#x3D;1&amp;amp;autoplay&#x3D;1&amp;amp;cover&#x3D;1&amp;quot; width&#x3D;&amp;quot;500&amp;quot; height&#x3D;&amp;quot;500&amp;quot;&amp;gt;&amp;lt;/iframe&amp;gt;&lt;/li&gt;&lt;/ul&gt;
974
+ # @param id [Integer] kinopoisk film id
975
+ # @param [Hash] opts the optional parameters
976
+ # @return [Array<(VideoResponse, Integer, Hash)>] VideoResponse data, response status code and response headers
977
+ def api_v22_films_id_videos_get_with_http_info(id, opts = {})
978
+ if @api_client.config.debugging
979
+ @api_client.config.logger.debug "Calling API: FilmsApi.api_v22_films_id_videos_get ..."
980
+ end
981
+ # verify the required parameter 'id' is set
982
+ if @api_client.config.client_side_validation && id.nil?
983
+ raise ArgumentError,
984
+ "Missing the required parameter 'id' when calling FilmsApi.api_v22_films_id_videos_get"
985
+ end
986
+ if @api_client.config.client_side_validation && id > 5000000
987
+ raise ArgumentError,
988
+ 'invalid value for "id" when calling FilmsApi.api_v22_films_id_videos_get, must be smaller than or equal to 5000000.'
989
+ end
990
+
991
+ if @api_client.config.client_side_validation && id < 1
992
+ raise ArgumentError,
993
+ 'invalid value for "id" when calling FilmsApi.api_v22_films_id_videos_get, must be greater than or equal to 1.'
994
+ end
995
+
996
+ # resource path
997
+ local_var_path = "/api/v2.2/films/{id}/videos".sub("{id}", CGI.escape(id.to_s))
998
+
999
+ # query parameters
1000
+ query_params = opts[:query_params] || {}
1001
+
1002
+ # header parameters
1003
+ header_params = opts[:header_params] || {}
1004
+ # HTTP header 'Accept' (if needed)
1005
+ header_params["Accept"] = @api_client.select_header_accept(["application/json"])
1006
+
1007
+ # form parameters
1008
+ form_params = opts[:form_params] || {}
1009
+
1010
+ # http body (model)
1011
+ post_body = opts[:debug_body]
1012
+
1013
+ # return_type
1014
+ return_type = opts[:debug_return_type] || "VideoResponse"
1015
+
1016
+ # auth_names
1017
+ auth_names = opts[:debug_auth_names] || ["ApiKeyAuth"]
1018
+
1019
+ new_options = opts.merge(
1020
+ operation: :"FilmsApi.api_v22_films_id_videos_get",
1021
+ header_params: header_params,
1022
+ query_params: query_params,
1023
+ form_params: form_params,
1024
+ body: post_body,
1025
+ auth_names: auth_names,
1026
+ return_type: return_type
1027
+ )
1028
+
1029
+ data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
1030
+ if @api_client.config.debugging
1031
+ @api_client.config.logger.debug "API called: FilmsApi#api_v22_films_id_videos_get\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
1032
+ end
1033
+ [data, status_code, headers]
1034
+ end
1035
+
1036
+ # получить список кинопремьер
1037
+ # Данный эндпоинт возвращает список кинопремьер. Например https://www.kinopoisk.ru/premiere/
1038
+ # @param year [Integer] год релиза
1039
+ # @param month [String] месяц релиза
1040
+ # @param [Hash] opts the optional parameters
1041
+ # @return [PremiereResponse]
1042
+ def api_v22_films_premieres_get(year, month, opts = {})
1043
+ data, _status_code, _headers = api_v22_films_premieres_get_with_http_info(year, month, opts)
1044
+ data
1045
+ end
1046
+
1047
+ # получить список кинопремьер
1048
+ # Данный эндпоинт возвращает список кинопремьер. Например https://www.kinopoisk.ru/premiere/
1049
+ # @param year [Integer] год релиза
1050
+ # @param month [String] месяц релиза
1051
+ # @param [Hash] opts the optional parameters
1052
+ # @return [Array<(PremiereResponse, Integer, Hash)>] PremiereResponse data, response status code and response headers
1053
+ def api_v22_films_premieres_get_with_http_info(year, month, opts = {})
1054
+ if @api_client.config.debugging
1055
+ @api_client.config.logger.debug "Calling API: FilmsApi.api_v22_films_premieres_get ..."
1056
+ end
1057
+ # verify the required parameter 'year' is set
1058
+ if @api_client.config.client_side_validation && year.nil?
1059
+ raise ArgumentError,
1060
+ "Missing the required parameter 'year' when calling FilmsApi.api_v22_films_premieres_get"
1061
+ end
1062
+ # verify the required parameter 'month' is set
1063
+ if @api_client.config.client_side_validation && month.nil?
1064
+ raise ArgumentError,
1065
+ "Missing the required parameter 'month' when calling FilmsApi.api_v22_films_premieres_get"
1066
+ end
1067
+
1068
+ # verify enum value
1069
+ allowable_values = %w[JANUARY FEBRUARY MARCH APRIL MAY JUNE JULY AUGUST SEPTEMBER OCTOBER NOVEMBER DECEMBER]
1070
+ if @api_client.config.client_side_validation && !allowable_values.include?(month)
1071
+ raise ArgumentError,
1072
+ "invalid value for \"month\", must be one of #{allowable_values}"
1073
+ end
1074
+
1075
+ # resource path
1076
+ local_var_path = "/api/v2.2/films/premieres"
1077
+
1078
+ # query parameters
1079
+ query_params = opts[:query_params] || {}
1080
+ query_params[:year] = year
1081
+ query_params[:month] = month
1082
+
1083
+ # header parameters
1084
+ header_params = opts[:header_params] || {}
1085
+ # HTTP header 'Accept' (if needed)
1086
+ header_params["Accept"] = @api_client.select_header_accept(["application/json"])
1087
+
1088
+ # form parameters
1089
+ form_params = opts[:form_params] || {}
1090
+
1091
+ # http body (model)
1092
+ post_body = opts[:debug_body]
1093
+
1094
+ # return_type
1095
+ return_type = opts[:debug_return_type] || "PremiereResponse"
1096
+
1097
+ # auth_names
1098
+ auth_names = opts[:debug_auth_names] || ["ApiKeyAuth"]
1099
+
1100
+ new_options = opts.merge(
1101
+ operation: :"FilmsApi.api_v22_films_premieres_get",
1102
+ header_params: header_params,
1103
+ query_params: query_params,
1104
+ form_params: form_params,
1105
+ body: post_body,
1106
+ auth_names: auth_names,
1107
+ return_type: return_type
1108
+ )
1109
+
1110
+ data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
1111
+ if @api_client.config.debugging
1112
+ @api_client.config.logger.debug "API called: FilmsApi#api_v22_films_premieres_get\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
1113
+ end
1114
+ [data, status_code, headers]
1115
+ end
1116
+
1117
+ # получить список фильмов из различных топов или коллекций. Например https://www.kinopoisk.ru/top/lists/58/
1118
+ # Возвращает список фильмов с пагинацией. Каждая страница содержит не более чем 20 фильмов.
1119
+ # @param [Hash] opts the optional parameters
1120
+ # @option opts [String] :type тип топа или коллекции (default to 'TOP_250_BEST_FILMS')
1121
+ # @option opts [Integer] :page номер страницы (default to 1)
1122
+ # @return [FilmTopResponse]
1123
+ def api_v22_films_top_get(opts = {})
1124
+ data, _status_code, _headers = api_v22_films_top_get_with_http_info(opts)
1125
+ data
1126
+ end
1127
+
1128
+ # получить список фильмов из различных топов или коллекций. Например https://www.kinopoisk.ru/top/lists/58/
1129
+ # Возвращает список фильмов с пагинацией. Каждая страница содержит не более чем 20 фильмов.
1130
+ # @param [Hash] opts the optional parameters
1131
+ # @option opts [String] :type тип топа или коллекции
1132
+ # @option opts [Integer] :page номер страницы
1133
+ # @return [Array<(FilmTopResponse, Integer, Hash)>] FilmTopResponse data, response status code and response headers
1134
+ def api_v22_films_top_get_with_http_info(opts = {})
1135
+ @api_client.config.logger.debug "Calling API: FilmsApi.api_v22_films_top_get ..." if @api_client.config.debugging
1136
+ allowable_values = %w[TOP_250_BEST_FILMS TOP_100_POPULAR_FILMS TOP_AWAIT_FILMS]
1137
+ if @api_client.config.client_side_validation && opts[:type] && !allowable_values.include?(opts[:type])
1138
+ raise ArgumentError,
1139
+ "invalid value for \"type\", must be one of #{allowable_values}"
1140
+ end
1141
+ if @api_client.config.client_side_validation && !opts[:page].nil? && opts[:page] > 20
1142
+ raise ArgumentError,
1143
+ 'invalid value for "opts[:"page"]" when calling FilmsApi.api_v22_films_top_get, must be smaller than or equal to 20.'
1144
+ end
1145
+
1146
+ if @api_client.config.client_side_validation && !opts[:page].nil? && opts[:page] < 1
1147
+ raise ArgumentError,
1148
+ 'invalid value for "opts[:"page"]" when calling FilmsApi.api_v22_films_top_get, must be greater than or equal to 1.'
1149
+ end
1150
+
1151
+ # resource path
1152
+ local_var_path = "/api/v2.2/films/top"
1153
+
1154
+ # query parameters
1155
+ query_params = opts[:query_params] || {}
1156
+ query_params[:type] = opts[:type] unless opts[:type].nil?
1157
+ query_params[:page] = opts[:page] unless opts[:page].nil?
1158
+
1159
+ # header parameters
1160
+ header_params = opts[:header_params] || {}
1161
+ # HTTP header 'Accept' (if needed)
1162
+ header_params["Accept"] = @api_client.select_header_accept(["application/json"])
1163
+
1164
+ # form parameters
1165
+ form_params = opts[:form_params] || {}
1166
+
1167
+ # http body (model)
1168
+ post_body = opts[:debug_body]
1169
+
1170
+ # return_type
1171
+ return_type = opts[:debug_return_type] || "FilmTopResponse"
1172
+
1173
+ # auth_names
1174
+ auth_names = opts[:debug_auth_names] || ["ApiKeyAuth"]
1175
+
1176
+ new_options = opts.merge(
1177
+ operation: :"FilmsApi.api_v22_films_top_get",
1178
+ header_params: header_params,
1179
+ query_params: query_params,
1180
+ form_params: form_params,
1181
+ body: post_body,
1182
+ auth_names: auth_names,
1183
+ return_type: return_type
1184
+ )
1185
+
1186
+ data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
1187
+ if @api_client.config.debugging
1188
+ @api_client.config.logger.debug "API called: FilmsApi#api_v22_films_top_get\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
1189
+ end
1190
+ [data, status_code, headers]
1191
+ end
1192
+ end
1193
+ end