//---------------------- // // Generated using the NSwag toolchain v13.11.1.0 (NJsonSchema v10.4.3.0 (Newtonsoft.Json v12.0.0.0)) (http://NSwag.org) // //---------------------- #pragma warning disable 108 // Disable "CS0108 '{derivedDto}.ToJson()' hides inherited member '{dtoBase}.ToJson()'. Use the new keyword if hiding was intended." #pragma warning disable 114 // Disable "CS0114 '{derivedDto}.RaisePropertyChanged(String)' hides inherited member 'dtoBase.RaisePropertyChanged(String)'. To make the current member override that implementation, add the override keyword. Otherwise add the new keyword." #pragma warning disable 472 // Disable "CS0472 The result of the expression is always 'false' since a value of type 'Int32' is never equal to 'null' of type 'Int32?' #pragma warning disable 1573 // Disable "CS1573 Parameter '...' has no matching param tag in the XML comment for ... #pragma warning disable 1591 // Disable "CS1591 Missing XML comment for publicly visible type or member ..." #pragma warning disable 8073 // Disable "CS8073 The result of the expression is always 'false' since a value of type 'T' is never equal to 'null' of type 'T?'" namespace KinopoiskUnofficialInfo.ApiClient { using System = global::System; [System.CodeDom.Compiler.GeneratedCode("NSwag", "13.11.1.0 (NJsonSchema v10.4.3.0 (Newtonsoft.Json v12.0.0.0))")] public partial class Client { private string _baseUrl = "https://kinopoiskapiunofficial.tech"; private System.Net.Http.HttpClient _httpClient; private System.Lazy _settings; public Client(System.Net.Http.HttpClient httpClient) { _httpClient = httpClient; _settings = new System.Lazy(CreateSerializerSettings); } private Newtonsoft.Json.JsonSerializerSettings CreateSerializerSettings() { var settings = KinopoiskUnofficialInfo.ApiClient.JsonTransformator.TransformSettings(new Newtonsoft.Json.JsonSerializerSettings { }); UpdateJsonSerializerSettings(settings); return settings; } public string BaseUrl { get { return _baseUrl; } set { _baseUrl = value; } } protected Newtonsoft.Json.JsonSerializerSettings JsonSerializerSettings { get { return _settings.Value; } } partial void UpdateJsonSerializerSettings(Newtonsoft.Json.JsonSerializerSettings settings); partial void PrepareRequest(System.Net.Http.HttpClient client, System.Net.Http.HttpRequestMessage request, string url); partial void PrepareRequest(System.Net.Http.HttpClient client, System.Net.Http.HttpRequestMessage request, System.Text.StringBuilder urlBuilder); partial void ProcessResponse(System.Net.Http.HttpClient client, System.Net.Http.HttpResponseMessage response); /// получить данные о фильме по kinopoisk id /// kinopoisk film id /// Запрос выполнен успешно /// A server side error occurred. public System.Threading.Tasks.Task FilmsAsync(int id) { return FilmsAsync(id, System.Threading.CancellationToken.None); } /// A cancellation token that can be used by other objects or threads to receive notice of cancellation. /// получить данные о фильме по kinopoisk id /// kinopoisk film id /// Запрос выполнен успешно /// A server side error occurred. public async System.Threading.Tasks.Task FilmsAsync(int id, System.Threading.CancellationToken cancellationToken) { if (id == null) throw new System.ArgumentNullException("id"); var urlBuilder_ = new System.Text.StringBuilder(); urlBuilder_.Append(BaseUrl != null ? BaseUrl.TrimEnd('/') : "").Append("/api/v2.2/films/{id}"); urlBuilder_.Replace("{id}", System.Uri.EscapeDataString(ConvertToString(id, System.Globalization.CultureInfo.InvariantCulture))); var client_ = _httpClient; var disposeClient_ = false; try { using (var request_ = new System.Net.Http.HttpRequestMessage()) { request_.Method = new System.Net.Http.HttpMethod("GET"); request_.Headers.Accept.Add(System.Net.Http.Headers.MediaTypeWithQualityHeaderValue.Parse("application/json")); PrepareRequest(client_, request_, urlBuilder_); var url_ = urlBuilder_.ToString(); request_.RequestUri = new System.Uri(url_, System.UriKind.RelativeOrAbsolute); PrepareRequest(client_, request_, url_); var response_ = await client_.SendAsync(request_, System.Net.Http.HttpCompletionOption.ResponseHeadersRead, cancellationToken).ConfigureAwait(false); var disposeResponse_ = true; try { var headers_ = System.Linq.Enumerable.ToDictionary(response_.Headers, h_ => h_.Key, h_ => h_.Value); if (response_.Content != null && response_.Content.Headers != null) { foreach (var item_ in response_.Content.Headers) headers_[item_.Key] = item_.Value; } ProcessResponse(client_, response_); var status_ = (int)response_.StatusCode; if (status_ == 200) { var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); if (objectResponse_.Object == null) { throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); } return objectResponse_.Object; } else if (status_ == 401) { string responseText_ = ( response_.Content == null ) ? string.Empty : await response_.Content.ReadAsStringAsync().ConfigureAwait(false); throw new ApiException("\u041f\u0443\u0441\u0442\u043e\u0439 \u0438\u043b\u0438 \u043d\u0435\u043f\u0440\u0430\u0432\u0438\u043b\u044c\u043d\u044b\u0439 \u0442\u043e\u043a\u0435\u043d", status_, responseText_, headers_, null); } else if (status_ == 404) { string responseText_ = ( response_.Content == null ) ? string.Empty : await response_.Content.ReadAsStringAsync().ConfigureAwait(false); throw new ApiException("\u0424\u0438\u043b\u044c\u043c \u043d\u0435 \u043d\u0430\u0439\u0434\u0435\u043d", status_, responseText_, headers_, null); } else if (status_ == 429) { string responseText_ = ( response_.Content == null ) ? string.Empty : await response_.Content.ReadAsStringAsync().ConfigureAwait(false); throw new ApiException("\u0421\u043b\u0438\u0448\u043a\u043e\u043c \u043c\u043d\u043e\u0433\u043e \u0437\u0430\u043f\u0440\u043e\u0441\u043e\u0432. \u041b\u0438\u043c\u0438\u0442 10 \u0437\u0430\u043f\u0440\u043e\u0441\u043e\u0432 \u0432 \u0441\u0435\u043a\u0443\u043d\u0434\u0443", status_, responseText_, headers_, null); } else { var responseData_ = response_.Content == null ? null : await response_.Content.ReadAsStringAsync().ConfigureAwait(false); throw new ApiException("The HTTP status code of the response was not expected (" + status_ + ").", status_, responseData_, headers_, null); } } finally { if (disposeResponse_) response_.Dispose(); } } } finally { if (disposeClient_) client_.Dispose(); } } /// получить данные о сезонах для сериала по kinopoisk film id /// kinopoisk film id /// Запрос выполнен успешно /// A server side error occurred. public System.Threading.Tasks.Task SeasonsAsync(int id) { return SeasonsAsync(id, System.Threading.CancellationToken.None); } /// A cancellation token that can be used by other objects or threads to receive notice of cancellation. /// получить данные о сезонах для сериала по kinopoisk film id /// kinopoisk film id /// Запрос выполнен успешно /// A server side error occurred. public async System.Threading.Tasks.Task SeasonsAsync(int id, System.Threading.CancellationToken cancellationToken) { if (id == null) throw new System.ArgumentNullException("id"); var urlBuilder_ = new System.Text.StringBuilder(); urlBuilder_.Append(BaseUrl != null ? BaseUrl.TrimEnd('/') : "").Append("/api/v2.2/films/{id}/seasons"); urlBuilder_.Replace("{id}", System.Uri.EscapeDataString(ConvertToString(id, System.Globalization.CultureInfo.InvariantCulture))); var client_ = _httpClient; var disposeClient_ = false; try { using (var request_ = new System.Net.Http.HttpRequestMessage()) { request_.Method = new System.Net.Http.HttpMethod("GET"); request_.Headers.Accept.Add(System.Net.Http.Headers.MediaTypeWithQualityHeaderValue.Parse("application/json")); PrepareRequest(client_, request_, urlBuilder_); var url_ = urlBuilder_.ToString(); request_.RequestUri = new System.Uri(url_, System.UriKind.RelativeOrAbsolute); PrepareRequest(client_, request_, url_); var response_ = await client_.SendAsync(request_, System.Net.Http.HttpCompletionOption.ResponseHeadersRead, cancellationToken).ConfigureAwait(false); var disposeResponse_ = true; try { var headers_ = System.Linq.Enumerable.ToDictionary(response_.Headers, h_ => h_.Key, h_ => h_.Value); if (response_.Content != null && response_.Content.Headers != null) { foreach (var item_ in response_.Content.Headers) headers_[item_.Key] = item_.Value; } ProcessResponse(client_, response_); var status_ = (int)response_.StatusCode; if (status_ == 200) { var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); if (objectResponse_.Object == null) { throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); } return objectResponse_.Object; } else if (status_ == 401) { string responseText_ = ( response_.Content == null ) ? string.Empty : await response_.Content.ReadAsStringAsync().ConfigureAwait(false); throw new ApiException("\u041f\u0443\u0441\u0442\u043e\u0439 \u0438\u043b\u0438 \u043d\u0435\u043f\u0440\u0430\u0432\u0438\u043b\u044c\u043d\u044b\u0439 \u0442\u043e\u043a\u0435\u043d", status_, responseText_, headers_, null); } else if (status_ == 429) { string responseText_ = ( response_.Content == null ) ? string.Empty : await response_.Content.ReadAsStringAsync().ConfigureAwait(false); throw new ApiException("\u0421\u043b\u0438\u0448\u043a\u043e\u043c \u043c\u043d\u043e\u0433\u043e \u0437\u0430\u043f\u0440\u043e\u0441\u043e\u0432. \u041b\u0438\u043c\u0438\u0442 10 \u0437\u0430\u043f\u0440\u043e\u0441\u043e\u0432 \u0432 \u0441\u0435\u043a\u0443\u043d\u0434\u0443", status_, responseText_, headers_, null); } else { var responseData_ = response_.Content == null ? null : await response_.Content.ReadAsStringAsync().ConfigureAwait(false); throw new ApiException("The HTTP status code of the response was not expected (" + status_ + ").", status_, responseData_, headers_, null); } } finally { if (disposeResponse_) response_.Dispose(); } } } finally { if (disposeClient_) client_.Dispose(); } } /// получить данные о фактах и ошибках в фильме по kinopoisk film id /// kinopoisk film id /// Запрос выполнен успешно /// A server side error occurred. public System.Threading.Tasks.Task FactsAsync(int id) { return FactsAsync(id, System.Threading.CancellationToken.None); } /// A cancellation token that can be used by other objects or threads to receive notice of cancellation. /// получить данные о фактах и ошибках в фильме по kinopoisk film id /// kinopoisk film id /// Запрос выполнен успешно /// A server side error occurred. public async System.Threading.Tasks.Task FactsAsync(int id, System.Threading.CancellationToken cancellationToken) { if (id == null) throw new System.ArgumentNullException("id"); var urlBuilder_ = new System.Text.StringBuilder(); urlBuilder_.Append(BaseUrl != null ? BaseUrl.TrimEnd('/') : "").Append("/api/v2.2/films/{id}/facts"); urlBuilder_.Replace("{id}", System.Uri.EscapeDataString(ConvertToString(id, System.Globalization.CultureInfo.InvariantCulture))); var client_ = _httpClient; var disposeClient_ = false; try { using (var request_ = new System.Net.Http.HttpRequestMessage()) { request_.Method = new System.Net.Http.HttpMethod("GET"); request_.Headers.Accept.Add(System.Net.Http.Headers.MediaTypeWithQualityHeaderValue.Parse("application/json")); PrepareRequest(client_, request_, urlBuilder_); var url_ = urlBuilder_.ToString(); request_.RequestUri = new System.Uri(url_, System.UriKind.RelativeOrAbsolute); PrepareRequest(client_, request_, url_); var response_ = await client_.SendAsync(request_, System.Net.Http.HttpCompletionOption.ResponseHeadersRead, cancellationToken).ConfigureAwait(false); var disposeResponse_ = true; try { var headers_ = System.Linq.Enumerable.ToDictionary(response_.Headers, h_ => h_.Key, h_ => h_.Value); if (response_.Content != null && response_.Content.Headers != null) { foreach (var item_ in response_.Content.Headers) headers_[item_.Key] = item_.Value; } ProcessResponse(client_, response_); var status_ = (int)response_.StatusCode; if (status_ == 200) { var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); if (objectResponse_.Object == null) { throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); } return objectResponse_.Object; } else if (status_ == 401) { string responseText_ = ( response_.Content == null ) ? string.Empty : await response_.Content.ReadAsStringAsync().ConfigureAwait(false); throw new ApiException("\u041f\u0443\u0441\u0442\u043e\u0439 \u0438\u043b\u0438 \u043d\u0435\u043f\u0440\u0430\u0432\u0438\u043b\u044c\u043d\u044b\u0439 \u0442\u043e\u043a\u0435\u043d", status_, responseText_, headers_, null); } else if (status_ == 429) { string responseText_ = ( response_.Content == null ) ? string.Empty : await response_.Content.ReadAsStringAsync().ConfigureAwait(false); throw new ApiException("\u0421\u043b\u0438\u0448\u043a\u043e\u043c \u043c\u043d\u043e\u0433\u043e \u0437\u0430\u043f\u0440\u043e\u0441\u043e\u0432. \u041b\u0438\u043c\u0438\u0442 10 \u0437\u0430\u043f\u0440\u043e\u0441\u043e\u0432 \u0432 \u0441\u0435\u043a\u0443\u043d\u0434\u0443", status_, responseText_, headers_, null); } else { var responseData_ = response_.Content == null ? null : await response_.Content.ReadAsStringAsync().ConfigureAwait(false); throw new ApiException("The HTTP status code of the response was not expected (" + status_ + ").", status_, responseData_, headers_, null); } } finally { if (disposeResponse_) response_.Dispose(); } } } finally { if (disposeClient_) client_.Dispose(); } } /// получить данные о прокате фильма по kinopoisk film id /// kinopoisk film id /// Запрос выполнен успешно /// A server side error occurred. public System.Threading.Tasks.Task DistributionsAsync(int id) { return DistributionsAsync(id, System.Threading.CancellationToken.None); } /// A cancellation token that can be used by other objects or threads to receive notice of cancellation. /// получить данные о прокате фильма по kinopoisk film id /// kinopoisk film id /// Запрос выполнен успешно /// A server side error occurred. public async System.Threading.Tasks.Task DistributionsAsync(int id, System.Threading.CancellationToken cancellationToken) { if (id == null) throw new System.ArgumentNullException("id"); var urlBuilder_ = new System.Text.StringBuilder(); urlBuilder_.Append(BaseUrl != null ? BaseUrl.TrimEnd('/') : "").Append("/api/v2.2/films/{id}/distributions"); urlBuilder_.Replace("{id}", System.Uri.EscapeDataString(ConvertToString(id, System.Globalization.CultureInfo.InvariantCulture))); var client_ = _httpClient; var disposeClient_ = false; try { using (var request_ = new System.Net.Http.HttpRequestMessage()) { request_.Method = new System.Net.Http.HttpMethod("GET"); request_.Headers.Accept.Add(System.Net.Http.Headers.MediaTypeWithQualityHeaderValue.Parse("application/json")); PrepareRequest(client_, request_, urlBuilder_); var url_ = urlBuilder_.ToString(); request_.RequestUri = new System.Uri(url_, System.UriKind.RelativeOrAbsolute); PrepareRequest(client_, request_, url_); var response_ = await client_.SendAsync(request_, System.Net.Http.HttpCompletionOption.ResponseHeadersRead, cancellationToken).ConfigureAwait(false); var disposeResponse_ = true; try { var headers_ = System.Linq.Enumerable.ToDictionary(response_.Headers, h_ => h_.Key, h_ => h_.Value); if (response_.Content != null && response_.Content.Headers != null) { foreach (var item_ in response_.Content.Headers) headers_[item_.Key] = item_.Value; } ProcessResponse(client_, response_); var status_ = (int)response_.StatusCode; if (status_ == 200) { var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); if (objectResponse_.Object == null) { throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); } return objectResponse_.Object; } else if (status_ == 401) { string responseText_ = ( response_.Content == null ) ? string.Empty : await response_.Content.ReadAsStringAsync().ConfigureAwait(false); throw new ApiException("\u041f\u0443\u0441\u0442\u043e\u0439 \u0438\u043b\u0438 \u043d\u0435\u043f\u0440\u0430\u0432\u0438\u043b\u044c\u043d\u044b\u0439 \u0442\u043e\u043a\u0435\u043d", status_, responseText_, headers_, null); } else if (status_ == 429) { string responseText_ = ( response_.Content == null ) ? string.Empty : await response_.Content.ReadAsStringAsync().ConfigureAwait(false); throw new ApiException("\u0421\u043b\u0438\u0448\u043a\u043e\u043c \u043c\u043d\u043e\u0433\u043e \u0437\u0430\u043f\u0440\u043e\u0441\u043e\u0432. \u041b\u0438\u043c\u0438\u0442 10 \u0437\u0430\u043f\u0440\u043e\u0441\u043e\u0432 \u0432 \u0441\u0435\u043a\u0443\u043d\u0434\u0443", status_, responseText_, headers_, null); } else { var responseData_ = response_.Content == null ? null : await response_.Content.ReadAsStringAsync().ConfigureAwait(false); throw new ApiException("The HTTP status code of the response was not expected (" + status_ + ").", status_, responseData_, headers_, null); } } finally { if (disposeResponse_) response_.Dispose(); } } } finally { if (disposeClient_) client_.Dispose(); } } /// получить кадры из фильма по kinopoisk film id /// kinopoisk film id /// Запрос выполнен успешно /// A server side error occurred. public System.Threading.Tasks.Task FramesAsync(int id) { return FramesAsync(id, System.Threading.CancellationToken.None); } /// A cancellation token that can be used by other objects or threads to receive notice of cancellation. /// получить кадры из фильма по kinopoisk film id /// kinopoisk film id /// Запрос выполнен успешно /// A server side error occurred. public async System.Threading.Tasks.Task FramesAsync(int id, System.Threading.CancellationToken cancellationToken) { if (id == null) throw new System.ArgumentNullException("id"); var urlBuilder_ = new System.Text.StringBuilder(); urlBuilder_.Append(BaseUrl != null ? BaseUrl.TrimEnd('/') : "").Append("/api/v2.1/films/{id}/frames"); urlBuilder_.Replace("{id}", System.Uri.EscapeDataString(ConvertToString(id, System.Globalization.CultureInfo.InvariantCulture))); var client_ = _httpClient; var disposeClient_ = false; try { using (var request_ = new System.Net.Http.HttpRequestMessage()) { request_.Method = new System.Net.Http.HttpMethod("GET"); request_.Headers.Accept.Add(System.Net.Http.Headers.MediaTypeWithQualityHeaderValue.Parse("application/json")); PrepareRequest(client_, request_, urlBuilder_); var url_ = urlBuilder_.ToString(); request_.RequestUri = new System.Uri(url_, System.UriKind.RelativeOrAbsolute); PrepareRequest(client_, request_, url_); var response_ = await client_.SendAsync(request_, System.Net.Http.HttpCompletionOption.ResponseHeadersRead, cancellationToken).ConfigureAwait(false); var disposeResponse_ = true; try { var headers_ = System.Linq.Enumerable.ToDictionary(response_.Headers, h_ => h_.Key, h_ => h_.Value); if (response_.Content != null && response_.Content.Headers != null) { foreach (var item_ in response_.Content.Headers) headers_[item_.Key] = item_.Value; } ProcessResponse(client_, response_); var status_ = (int)response_.StatusCode; if (status_ == 200) { var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); if (objectResponse_.Object == null) { throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); } return objectResponse_.Object; } else if (status_ == 401) { string responseText_ = ( response_.Content == null ) ? string.Empty : await response_.Content.ReadAsStringAsync().ConfigureAwait(false); throw new ApiException("\u041f\u0443\u0441\u0442\u043e\u0439 \u0438\u043b\u0438 \u043d\u0435\u043f\u0440\u0430\u0432\u0438\u043b\u044c\u043d\u044b\u0439 \u0442\u043e\u043a\u0435\u043d", status_, responseText_, headers_, null); } else if (status_ == 404) { string responseText_ = ( response_.Content == null ) ? string.Empty : await response_.Content.ReadAsStringAsync().ConfigureAwait(false); throw new ApiException("\u041a\u0430\u0434\u0440\u044b \u043d\u0435 \u043d\u0430\u0439\u0434\u0435\u043d\u044b", status_, responseText_, headers_, null); } else if (status_ == 429) { string responseText_ = ( response_.Content == null ) ? string.Empty : await response_.Content.ReadAsStringAsync().ConfigureAwait(false); throw new ApiException("\u0421\u043b\u0438\u0448\u043a\u043e\u043c \u043c\u043d\u043e\u0433\u043e \u0437\u0430\u043f\u0440\u043e\u0441\u043e\u0432. \u041b\u0438\u043c\u0438\u0442 3 \u0437\u0430\u043f\u0440\u043e\u0441\u0430 \u0432 \u0441\u0435\u043a\u0443\u043d\u0434\u0443", status_, responseText_, headers_, null); } else { var responseData_ = response_.Content == null ? null : await response_.Content.ReadAsStringAsync().ConfigureAwait(false); throw new ApiException("The HTTP status code of the response was not expected (" + status_ + ").", status_, responseData_, headers_, null); } } finally { if (disposeResponse_) response_.Dispose(); } } } finally { if (disposeClient_) client_.Dispose(); } } /// получить трейлеры,тизеры,видео для фильма по kinopoisk film id /// kinopoisk film id /// Запрос выполнен успешно /// A server side error occurred. public System.Threading.Tasks.Task VideosAsync(int id) { return VideosAsync(id, System.Threading.CancellationToken.None); } /// A cancellation token that can be used by other objects or threads to receive notice of cancellation. /// получить трейлеры,тизеры,видео для фильма по kinopoisk film id /// kinopoisk film id /// Запрос выполнен успешно /// A server side error occurred. public async System.Threading.Tasks.Task VideosAsync(int id, System.Threading.CancellationToken cancellationToken) { if (id == null) throw new System.ArgumentNullException("id"); var urlBuilder_ = new System.Text.StringBuilder(); urlBuilder_.Append(BaseUrl != null ? BaseUrl.TrimEnd('/') : "").Append("/api/v2.2/films/{id}/videos"); urlBuilder_.Replace("{id}", System.Uri.EscapeDataString(ConvertToString(id, System.Globalization.CultureInfo.InvariantCulture))); var client_ = _httpClient; var disposeClient_ = false; try { using (var request_ = new System.Net.Http.HttpRequestMessage()) { request_.Method = new System.Net.Http.HttpMethod("GET"); request_.Headers.Accept.Add(System.Net.Http.Headers.MediaTypeWithQualityHeaderValue.Parse("application/json")); PrepareRequest(client_, request_, urlBuilder_); var url_ = urlBuilder_.ToString(); request_.RequestUri = new System.Uri(url_, System.UriKind.RelativeOrAbsolute); PrepareRequest(client_, request_, url_); var response_ = await client_.SendAsync(request_, System.Net.Http.HttpCompletionOption.ResponseHeadersRead, cancellationToken).ConfigureAwait(false); var disposeResponse_ = true; try { var headers_ = System.Linq.Enumerable.ToDictionary(response_.Headers, h_ => h_.Key, h_ => h_.Value); if (response_.Content != null && response_.Content.Headers != null) { foreach (var item_ in response_.Content.Headers) headers_[item_.Key] = item_.Value; } ProcessResponse(client_, response_); var status_ = (int)response_.StatusCode; if (status_ == 200) { var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); if (objectResponse_.Object == null) { throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); } return objectResponse_.Object; } else if (status_ == 401) { string responseText_ = ( response_.Content == null ) ? string.Empty : await response_.Content.ReadAsStringAsync().ConfigureAwait(false); throw new ApiException("\u041f\u0443\u0441\u0442\u043e\u0439 \u0438\u043b\u0438 \u043d\u0435\u043f\u0440\u0430\u0432\u0438\u043b\u044c\u043d\u044b\u0439 \u0442\u043e\u043a\u0435\u043d", status_, responseText_, headers_, null); } else if (status_ == 429) { string responseText_ = ( response_.Content == null ) ? string.Empty : await response_.Content.ReadAsStringAsync().ConfigureAwait(false); throw new ApiException("\u0421\u043b\u0438\u0448\u043a\u043e\u043c \u043c\u043d\u043e\u0433\u043e \u0437\u0430\u043f\u0440\u043e\u0441\u043e\u0432. \u041b\u0438\u043c\u0438\u0442 3 \u0437\u0430\u043f\u0440\u043e\u0441\u0430 \u0432 \u0441\u0435\u043a\u0443\u043d\u0434\u0443", status_, responseText_, headers_, null); } else { var responseData_ = response_.Content == null ? null : await response_.Content.ReadAsStringAsync().ConfigureAwait(false); throw new ApiException("The HTTP status code of the response was not expected (" + status_ + ").", status_, responseData_, headers_, null); } } finally { if (disposeResponse_) response_.Dispose(); } } } finally { if (disposeClient_) client_.Dispose(); } } /// получить список фильмов по ключевым словам /// ключивые слова для поиска /// номер страницы /// Запрос выполнен успешно /// A server side error occurred. public System.Threading.Tasks.Task SearchByKeywordAsync(string keyword, int? page) { return SearchByKeywordAsync(keyword, page, System.Threading.CancellationToken.None); } /// A cancellation token that can be used by other objects or threads to receive notice of cancellation. /// получить список фильмов по ключевым словам /// ключивые слова для поиска /// номер страницы /// Запрос выполнен успешно /// A server side error occurred. public async System.Threading.Tasks.Task SearchByKeywordAsync(string keyword, int? page, System.Threading.CancellationToken cancellationToken) { if (keyword == null) throw new System.ArgumentNullException("keyword"); var urlBuilder_ = new System.Text.StringBuilder(); urlBuilder_.Append(BaseUrl != null ? BaseUrl.TrimEnd('/') : "").Append("/api/v2.1/films/search-by-keyword?"); urlBuilder_.Append(System.Uri.EscapeDataString("keyword") + "=").Append(System.Uri.EscapeDataString(ConvertToString(keyword, System.Globalization.CultureInfo.InvariantCulture))).Append("&"); if (page != null) { urlBuilder_.Append(System.Uri.EscapeDataString("page") + "=").Append(System.Uri.EscapeDataString(ConvertToString(page, System.Globalization.CultureInfo.InvariantCulture))).Append("&"); } urlBuilder_.Length--; var client_ = _httpClient; var disposeClient_ = false; try { using (var request_ = new System.Net.Http.HttpRequestMessage()) { request_.Method = new System.Net.Http.HttpMethod("GET"); request_.Headers.Accept.Add(System.Net.Http.Headers.MediaTypeWithQualityHeaderValue.Parse("application/json")); PrepareRequest(client_, request_, urlBuilder_); var url_ = urlBuilder_.ToString(); request_.RequestUri = new System.Uri(url_, System.UriKind.RelativeOrAbsolute); PrepareRequest(client_, request_, url_); var response_ = await client_.SendAsync(request_, System.Net.Http.HttpCompletionOption.ResponseHeadersRead, cancellationToken).ConfigureAwait(false); var disposeResponse_ = true; try { var headers_ = System.Linq.Enumerable.ToDictionary(response_.Headers, h_ => h_.Key, h_ => h_.Value); if (response_.Content != null && response_.Content.Headers != null) { foreach (var item_ in response_.Content.Headers) headers_[item_.Key] = item_.Value; } ProcessResponse(client_, response_); var status_ = (int)response_.StatusCode; if (status_ == 200) { var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); if (objectResponse_.Object == null) { throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); } return objectResponse_.Object; } else if (status_ == 401) { string responseText_ = ( response_.Content == null ) ? string.Empty : await response_.Content.ReadAsStringAsync().ConfigureAwait(false); throw new ApiException("\u041f\u0443\u0441\u0442\u043e\u0439 \u0438\u043b\u0438 \u043d\u0435\u043f\u0440\u0430\u0432\u0438\u043b\u044c\u043d\u044b\u0439 \u0442\u043e\u043a\u0435\u043d", status_, responseText_, headers_, null); } else if (status_ == 404) { string responseText_ = ( response_.Content == null ) ? string.Empty : await response_.Content.ReadAsStringAsync().ConfigureAwait(false); throw new ApiException("\u0424\u0438\u043b\u044c\u043c\u044b \u043d\u0435 \u043d\u0430\u0439\u0434\u0435\u043d\u044b", status_, responseText_, headers_, null); } else if (status_ == 429) { string responseText_ = ( response_.Content == null ) ? string.Empty : await response_.Content.ReadAsStringAsync().ConfigureAwait(false); throw new ApiException("\u0421\u043b\u0438\u0448\u043a\u043e\u043c \u043c\u043d\u043e\u0433\u043e \u0437\u0430\u043f\u0440\u043e\u0441\u043e\u0432. \u041b\u0438\u043c\u0438\u0442 10 \u0437\u0430\u043f\u0440\u043e\u0441\u043e\u0432 \u0432 \u0441\u0435\u043a\u0443\u043d\u0434\u0443", status_, responseText_, headers_, null); } else { var responseData_ = response_.Content == null ? null : await response_.Content.ReadAsStringAsync().ConfigureAwait(false); throw new ApiException("The HTTP status code of the response was not expected (" + status_ + ").", status_, responseData_, headers_, null); } } finally { if (disposeResponse_) response_.Dispose(); } } } finally { if (disposeClient_) client_.Dispose(); } } /// получить id стран и жанров для использования в /api/v2.1/films/search-by-filters /// Запрос выполнен успешно /// A server side error occurred. public System.Threading.Tasks.Task FiltersAsync() { return FiltersAsync(System.Threading.CancellationToken.None); } /// A cancellation token that can be used by other objects or threads to receive notice of cancellation. /// получить id стран и жанров для использования в /api/v2.1/films/search-by-filters /// Запрос выполнен успешно /// A server side error occurred. public async System.Threading.Tasks.Task FiltersAsync(System.Threading.CancellationToken cancellationToken) { var urlBuilder_ = new System.Text.StringBuilder(); urlBuilder_.Append(BaseUrl != null ? BaseUrl.TrimEnd('/') : "").Append("/api/v2.1/films/filters"); var client_ = _httpClient; var disposeClient_ = false; try { using (var request_ = new System.Net.Http.HttpRequestMessage()) { request_.Method = new System.Net.Http.HttpMethod("GET"); request_.Headers.Accept.Add(System.Net.Http.Headers.MediaTypeWithQualityHeaderValue.Parse("application/json")); PrepareRequest(client_, request_, urlBuilder_); var url_ = urlBuilder_.ToString(); request_.RequestUri = new System.Uri(url_, System.UriKind.RelativeOrAbsolute); PrepareRequest(client_, request_, url_); var response_ = await client_.SendAsync(request_, System.Net.Http.HttpCompletionOption.ResponseHeadersRead, cancellationToken).ConfigureAwait(false); var disposeResponse_ = true; try { var headers_ = System.Linq.Enumerable.ToDictionary(response_.Headers, h_ => h_.Key, h_ => h_.Value); if (response_.Content != null && response_.Content.Headers != null) { foreach (var item_ in response_.Content.Headers) headers_[item_.Key] = item_.Value; } ProcessResponse(client_, response_); var status_ = (int)response_.StatusCode; if (status_ == 200) { var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); if (objectResponse_.Object == null) { throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); } return objectResponse_.Object; } else if (status_ == 401) { string responseText_ = ( response_.Content == null ) ? string.Empty : await response_.Content.ReadAsStringAsync().ConfigureAwait(false); throw new ApiException("\u041f\u0443\u0441\u0442\u043e\u0439 \u0438\u043b\u0438 \u043d\u0435\u043f\u0440\u0430\u0432\u0438\u043b\u044c\u043d\u044b\u0439 \u0442\u043e\u043a\u0435\u043d", status_, responseText_, headers_, null); } else if (status_ == 404) { string responseText_ = ( response_.Content == null ) ? string.Empty : await response_.Content.ReadAsStringAsync().ConfigureAwait(false); throw new ApiException("\u0424\u0438\u043b\u044c\u043c\u044b \u043d\u0435 \u043d\u0430\u0439\u0434\u0435\u043d\u044b", status_, responseText_, headers_, null); } else if (status_ == 429) { string responseText_ = ( response_.Content == null ) ? string.Empty : await response_.Content.ReadAsStringAsync().ConfigureAwait(false); throw new ApiException("\u0421\u043b\u0438\u0448\u043a\u043e\u043c \u043c\u043d\u043e\u0433\u043e \u0437\u0430\u043f\u0440\u043e\u0441\u043e\u0432. \u041b\u0438\u043c\u0438\u0442 10 \u0437\u0430\u043f\u0440\u043e\u0441\u043e\u0432 \u0432 \u0441\u0435\u043a\u0443\u043d\u0434\u0443", status_, responseText_, headers_, null); } else { var responseData_ = response_.Content == null ? null : await response_.Content.ReadAsStringAsync().ConfigureAwait(false); throw new ApiException("The HTTP status code of the response was not expected (" + status_ + ").", status_, responseData_, headers_, null); } } finally { if (disposeResponse_) response_.Dispose(); } } } finally { if (disposeClient_) client_.Dispose(); } } /// получить список фильмов по различным фильтрам /// список id стран разделенные запятой. Например <i>country=1,2,3</i> /// список id жанров разделенные запятой. Например <i>genre=1,2,3</i> /// сортировка /// тип фильма /// минимальный рейтинг /// максимальный рейтинг /// минимальный год /// максимальный год /// номер страницы /// Запрос выполнен успешно /// A server side error occurred. public System.Threading.Tasks.Task SearchByFiltersAsync(System.Collections.Generic.IEnumerable country, System.Collections.Generic.IEnumerable genre, Order? order, Type? type, int? ratingFrom, int? ratingTo, int? yearFrom, int? yearTo, int? page) { return SearchByFiltersAsync(country, genre, order, type, ratingFrom, ratingTo, yearFrom, yearTo, page, System.Threading.CancellationToken.None); } /// A cancellation token that can be used by other objects or threads to receive notice of cancellation. /// получить список фильмов по различным фильтрам /// список id стран разделенные запятой. Например <i>country=1,2,3</i> /// список id жанров разделенные запятой. Например <i>genre=1,2,3</i> /// сортировка /// тип фильма /// минимальный рейтинг /// максимальный рейтинг /// минимальный год /// максимальный год /// номер страницы /// Запрос выполнен успешно /// A server side error occurred. public async System.Threading.Tasks.Task SearchByFiltersAsync(System.Collections.Generic.IEnumerable country, System.Collections.Generic.IEnumerable genre, Order? order, Type? type, int? ratingFrom, int? ratingTo, int? yearFrom, int? yearTo, int? page, System.Threading.CancellationToken cancellationToken) { var urlBuilder_ = new System.Text.StringBuilder(); urlBuilder_.Append(BaseUrl != null ? BaseUrl.TrimEnd('/') : "").Append("/api/v2.1/films/search-by-filters?"); if (country != null) { foreach (var item_ in country) { urlBuilder_.Append(System.Uri.EscapeDataString("country") + "=").Append(System.Uri.EscapeDataString(ConvertToString(item_, System.Globalization.CultureInfo.InvariantCulture))).Append("&"); } } if (genre != null) { foreach (var item_ in genre) { urlBuilder_.Append(System.Uri.EscapeDataString("genre") + "=").Append(System.Uri.EscapeDataString(ConvertToString(item_, System.Globalization.CultureInfo.InvariantCulture))).Append("&"); } } if (order != null) { urlBuilder_.Append(System.Uri.EscapeDataString("order") + "=").Append(System.Uri.EscapeDataString(ConvertToString(order, System.Globalization.CultureInfo.InvariantCulture))).Append("&"); } if (type != null) { urlBuilder_.Append(System.Uri.EscapeDataString("type") + "=").Append(System.Uri.EscapeDataString(ConvertToString(type, System.Globalization.CultureInfo.InvariantCulture))).Append("&"); } if (ratingFrom != null) { urlBuilder_.Append(System.Uri.EscapeDataString("ratingFrom") + "=").Append(System.Uri.EscapeDataString(ConvertToString(ratingFrom, System.Globalization.CultureInfo.InvariantCulture))).Append("&"); } if (ratingTo != null) { urlBuilder_.Append(System.Uri.EscapeDataString("ratingTo") + "=").Append(System.Uri.EscapeDataString(ConvertToString(ratingTo, System.Globalization.CultureInfo.InvariantCulture))).Append("&"); } if (yearFrom != null) { urlBuilder_.Append(System.Uri.EscapeDataString("yearFrom") + "=").Append(System.Uri.EscapeDataString(ConvertToString(yearFrom, System.Globalization.CultureInfo.InvariantCulture))).Append("&"); } if (yearTo != null) { urlBuilder_.Append(System.Uri.EscapeDataString("yearTo") + "=").Append(System.Uri.EscapeDataString(ConvertToString(yearTo, System.Globalization.CultureInfo.InvariantCulture))).Append("&"); } if (page != null) { urlBuilder_.Append(System.Uri.EscapeDataString("page") + "=").Append(System.Uri.EscapeDataString(ConvertToString(page, System.Globalization.CultureInfo.InvariantCulture))).Append("&"); } urlBuilder_.Length--; var client_ = _httpClient; var disposeClient_ = false; try { using (var request_ = new System.Net.Http.HttpRequestMessage()) { request_.Method = new System.Net.Http.HttpMethod("GET"); request_.Headers.Accept.Add(System.Net.Http.Headers.MediaTypeWithQualityHeaderValue.Parse("application/json")); PrepareRequest(client_, request_, urlBuilder_); var url_ = urlBuilder_.ToString(); request_.RequestUri = new System.Uri(url_, System.UriKind.RelativeOrAbsolute); PrepareRequest(client_, request_, url_); var response_ = await client_.SendAsync(request_, System.Net.Http.HttpCompletionOption.ResponseHeadersRead, cancellationToken).ConfigureAwait(false); var disposeResponse_ = true; try { var headers_ = System.Linq.Enumerable.ToDictionary(response_.Headers, h_ => h_.Key, h_ => h_.Value); if (response_.Content != null && response_.Content.Headers != null) { foreach (var item_ in response_.Content.Headers) headers_[item_.Key] = item_.Value; } ProcessResponse(client_, response_); var status_ = (int)response_.StatusCode; if (status_ == 200) { var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); if (objectResponse_.Object == null) { throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); } return objectResponse_.Object; } else if (status_ == 401) { string responseText_ = ( response_.Content == null ) ? string.Empty : await response_.Content.ReadAsStringAsync().ConfigureAwait(false); throw new ApiException("\u041f\u0443\u0441\u0442\u043e\u0439 \u0438\u043b\u0438 \u043d\u0435\u043f\u0440\u0430\u0432\u0438\u043b\u044c\u043d\u044b\u0439 \u0442\u043e\u043a\u0435\u043d", status_, responseText_, headers_, null); } else if (status_ == 404) { string responseText_ = ( response_.Content == null ) ? string.Empty : await response_.Content.ReadAsStringAsync().ConfigureAwait(false); throw new ApiException("\u0424\u0438\u043b\u044c\u043c\u044b \u043d\u0435 \u043d\u0430\u0439\u0434\u0435\u043d\u044b", status_, responseText_, headers_, null); } else if (status_ == 429) { string responseText_ = ( response_.Content == null ) ? string.Empty : await response_.Content.ReadAsStringAsync().ConfigureAwait(false); throw new ApiException("\u0421\u043b\u0438\u0448\u043a\u043e\u043c \u043c\u043d\u043e\u0433\u043e \u0437\u0430\u043f\u0440\u043e\u0441\u043e\u0432. \u041b\u0438\u043c\u0438\u0442 10 \u0437\u0430\u043f\u0440\u043e\u0441\u043e\u0432 \u0432 \u0441\u0435\u043a\u0443\u043d\u0434\u0443", status_, responseText_, headers_, null); } else { var responseData_ = response_.Content == null ? null : await response_.Content.ReadAsStringAsync().ConfigureAwait(false); throw new ApiException("The HTTP status code of the response was not expected (" + status_ + ").", status_, responseData_, headers_, null); } } finally { if (disposeResponse_) response_.Dispose(); } } } finally { if (disposeClient_) client_.Dispose(); } } /// получить список фильмов из различных топов или коллекций. Например https://www.kinopoisk.ru/top/lists/58/ /// тип топа или коллекции /// номер страницы /// Запрос выполнен успешно /// A server side error occurred. public System.Threading.Tasks.Task TopAsync(Type2? type, int? page) { return TopAsync(type, page, System.Threading.CancellationToken.None); } /// A cancellation token that can be used by other objects or threads to receive notice of cancellation. /// получить список фильмов из различных топов или коллекций. Например https://www.kinopoisk.ru/top/lists/58/ /// тип топа или коллекции /// номер страницы /// Запрос выполнен успешно /// A server side error occurred. public async System.Threading.Tasks.Task TopAsync(Type2? type, int? page, System.Threading.CancellationToken cancellationToken) { var urlBuilder_ = new System.Text.StringBuilder(); urlBuilder_.Append(BaseUrl != null ? BaseUrl.TrimEnd('/') : "").Append("/api/v2.2/films/top?"); if (type != null) { urlBuilder_.Append(System.Uri.EscapeDataString("type") + "=").Append(System.Uri.EscapeDataString(ConvertToString(type, System.Globalization.CultureInfo.InvariantCulture))).Append("&"); } if (page != null) { urlBuilder_.Append(System.Uri.EscapeDataString("page") + "=").Append(System.Uri.EscapeDataString(ConvertToString(page, System.Globalization.CultureInfo.InvariantCulture))).Append("&"); } urlBuilder_.Length--; var client_ = _httpClient; var disposeClient_ = false; try { using (var request_ = new System.Net.Http.HttpRequestMessage()) { request_.Method = new System.Net.Http.HttpMethod("GET"); request_.Headers.Accept.Add(System.Net.Http.Headers.MediaTypeWithQualityHeaderValue.Parse("application/json")); PrepareRequest(client_, request_, urlBuilder_); var url_ = urlBuilder_.ToString(); request_.RequestUri = new System.Uri(url_, System.UriKind.RelativeOrAbsolute); PrepareRequest(client_, request_, url_); var response_ = await client_.SendAsync(request_, System.Net.Http.HttpCompletionOption.ResponseHeadersRead, cancellationToken).ConfigureAwait(false); var disposeResponse_ = true; try { var headers_ = System.Linq.Enumerable.ToDictionary(response_.Headers, h_ => h_.Key, h_ => h_.Value); if (response_.Content != null && response_.Content.Headers != null) { foreach (var item_ in response_.Content.Headers) headers_[item_.Key] = item_.Value; } ProcessResponse(client_, response_); var status_ = (int)response_.StatusCode; if (status_ == 200) { var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); if (objectResponse_.Object == null) { throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); } return objectResponse_.Object; } else if (status_ == 401) { string responseText_ = ( response_.Content == null ) ? string.Empty : await response_.Content.ReadAsStringAsync().ConfigureAwait(false); throw new ApiException("\u041f\u0443\u0441\u0442\u043e\u0439 \u0438\u043b\u0438 \u043d\u0435\u043f\u0440\u0430\u0432\u0438\u043b\u044c\u043d\u044b\u0439 \u0442\u043e\u043a\u0435\u043d", status_, responseText_, headers_, null); } else if (status_ == 429) { string responseText_ = ( response_.Content == null ) ? string.Empty : await response_.Content.ReadAsStringAsync().ConfigureAwait(false); throw new ApiException("\u0421\u043b\u0438\u0448\u043a\u043e\u043c \u043c\u043d\u043e\u0433\u043e \u0437\u0430\u043f\u0440\u043e\u0441\u043e\u0432. \u041b\u0438\u043c\u0438\u0442 3 \u0437\u0430\u043f\u0440\u043e\u0441\u0430 \u0432 \u0441\u0435\u043a\u0443\u043d\u0434\u0443", status_, responseText_, headers_, null); } else { var responseData_ = response_.Content == null ? null : await response_.Content.ReadAsStringAsync().ConfigureAwait(false); throw new ApiException("The HTTP status code of the response was not expected (" + status_ + ").", status_, responseData_, headers_, null); } } finally { if (disposeResponse_) response_.Dispose(); } } } finally { if (disposeClient_) client_.Dispose(); } } /// получить список похожих фильмов по kinopoisk film id /// kinopoisk film id /// Запрос выполнен успешно /// A server side error occurred. public System.Threading.Tasks.Task SimilarsAsync(int id) { return SimilarsAsync(id, System.Threading.CancellationToken.None); } /// A cancellation token that can be used by other objects or threads to receive notice of cancellation. /// получить список похожих фильмов по kinopoisk film id /// kinopoisk film id /// Запрос выполнен успешно /// A server side error occurred. public async System.Threading.Tasks.Task SimilarsAsync(int id, System.Threading.CancellationToken cancellationToken) { if (id == null) throw new System.ArgumentNullException("id"); var urlBuilder_ = new System.Text.StringBuilder(); urlBuilder_.Append(BaseUrl != null ? BaseUrl.TrimEnd('/') : "").Append("/api/v2.2/films/{id}/similars"); urlBuilder_.Replace("{id}", System.Uri.EscapeDataString(ConvertToString(id, System.Globalization.CultureInfo.InvariantCulture))); var client_ = _httpClient; var disposeClient_ = false; try { using (var request_ = new System.Net.Http.HttpRequestMessage()) { request_.Method = new System.Net.Http.HttpMethod("GET"); request_.Headers.Accept.Add(System.Net.Http.Headers.MediaTypeWithQualityHeaderValue.Parse("application/json")); PrepareRequest(client_, request_, urlBuilder_); var url_ = urlBuilder_.ToString(); request_.RequestUri = new System.Uri(url_, System.UriKind.RelativeOrAbsolute); PrepareRequest(client_, request_, url_); var response_ = await client_.SendAsync(request_, System.Net.Http.HttpCompletionOption.ResponseHeadersRead, cancellationToken).ConfigureAwait(false); var disposeResponse_ = true; try { var headers_ = System.Linq.Enumerable.ToDictionary(response_.Headers, h_ => h_.Key, h_ => h_.Value); if (response_.Content != null && response_.Content.Headers != null) { foreach (var item_ in response_.Content.Headers) headers_[item_.Key] = item_.Value; } ProcessResponse(client_, response_); var status_ = (int)response_.StatusCode; if (status_ == 200) { var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); if (objectResponse_.Object == null) { throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); } return objectResponse_.Object; } else if (status_ == 401) { string responseText_ = ( response_.Content == null ) ? string.Empty : await response_.Content.ReadAsStringAsync().ConfigureAwait(false); throw new ApiException("\u041f\u0443\u0441\u0442\u043e\u0439 \u0438\u043b\u0438 \u043d\u0435\u043f\u0440\u0430\u0432\u0438\u043b\u044c\u043d\u044b\u0439 \u0442\u043e\u043a\u0435\u043d", status_, responseText_, headers_, null); } else if (status_ == 429) { string responseText_ = ( response_.Content == null ) ? string.Empty : await response_.Content.ReadAsStringAsync().ConfigureAwait(false); throw new ApiException("\u0421\u043b\u0438\u0448\u043a\u043e\u043c \u043c\u043d\u043e\u0433\u043e \u0437\u0430\u043f\u0440\u043e\u0441\u043e\u0432. \u041b\u0438\u043c\u0438\u0442 10 \u0437\u0430\u043f\u0440\u043e\u0441\u043e\u0432 \u0432 \u0441\u0435\u043a\u0443\u043d\u0434\u0443", status_, responseText_, headers_, null); } else { var responseData_ = response_.Content == null ? null : await response_.Content.ReadAsStringAsync().ConfigureAwait(false); throw new ApiException("The HTTP status code of the response was not expected (" + status_ + ").", status_, responseData_, headers_, null); } } finally { if (disposeResponse_) response_.Dispose(); } } } finally { if (disposeClient_) client_.Dispose(); } } /// получить список цифровых релизов /// год релиза /// месяц релиза /// номер страницы /// Запрос выполнен успешно /// A server side error occurred. public System.Threading.Tasks.Task ReleasesAsync(int year, Month month, int? page) { return ReleasesAsync(year, month, page, System.Threading.CancellationToken.None); } /// A cancellation token that can be used by other objects or threads to receive notice of cancellation. /// получить список цифровых релизов /// год релиза /// месяц релиза /// номер страницы /// Запрос выполнен успешно /// A server side error occurred. public async System.Threading.Tasks.Task ReleasesAsync(int year, Month month, int? page, System.Threading.CancellationToken cancellationToken) { if (year == null) throw new System.ArgumentNullException("year"); if (month == null) throw new System.ArgumentNullException("month"); var urlBuilder_ = new System.Text.StringBuilder(); urlBuilder_.Append(BaseUrl != null ? BaseUrl.TrimEnd('/') : "").Append("/api/v2.1/films/releases?"); urlBuilder_.Append(System.Uri.EscapeDataString("year") + "=").Append(System.Uri.EscapeDataString(ConvertToString(year, System.Globalization.CultureInfo.InvariantCulture))).Append("&"); urlBuilder_.Append(System.Uri.EscapeDataString("month") + "=").Append(System.Uri.EscapeDataString(ConvertToString(month, System.Globalization.CultureInfo.InvariantCulture))).Append("&"); if (page != null) { urlBuilder_.Append(System.Uri.EscapeDataString("page") + "=").Append(System.Uri.EscapeDataString(ConvertToString(page, System.Globalization.CultureInfo.InvariantCulture))).Append("&"); } urlBuilder_.Length--; var client_ = _httpClient; var disposeClient_ = false; try { using (var request_ = new System.Net.Http.HttpRequestMessage()) { request_.Method = new System.Net.Http.HttpMethod("GET"); request_.Headers.Accept.Add(System.Net.Http.Headers.MediaTypeWithQualityHeaderValue.Parse("application/json")); PrepareRequest(client_, request_, urlBuilder_); var url_ = urlBuilder_.ToString(); request_.RequestUri = new System.Uri(url_, System.UriKind.RelativeOrAbsolute); PrepareRequest(client_, request_, url_); var response_ = await client_.SendAsync(request_, System.Net.Http.HttpCompletionOption.ResponseHeadersRead, cancellationToken).ConfigureAwait(false); var disposeResponse_ = true; try { var headers_ = System.Linq.Enumerable.ToDictionary(response_.Headers, h_ => h_.Key, h_ => h_.Value); if (response_.Content != null && response_.Content.Headers != null) { foreach (var item_ in response_.Content.Headers) headers_[item_.Key] = item_.Value; } ProcessResponse(client_, response_); var status_ = (int)response_.StatusCode; if (status_ == 200) { var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); if (objectResponse_.Object == null) { throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); } return objectResponse_.Object; } else if (status_ == 401) { string responseText_ = ( response_.Content == null ) ? string.Empty : await response_.Content.ReadAsStringAsync().ConfigureAwait(false); throw new ApiException("\u041f\u0443\u0441\u0442\u043e\u0439 \u0438\u043b\u0438 \u043d\u0435\u043f\u0440\u0430\u0432\u0438\u043b\u044c\u043d\u044b\u0439 \u0442\u043e\u043a\u0435\u043d", status_, responseText_, headers_, null); } else if (status_ == 404) { string responseText_ = ( response_.Content == null ) ? string.Empty : await response_.Content.ReadAsStringAsync().ConfigureAwait(false); throw new ApiException("\u0424\u0438\u043b\u044c\u043c\u044b \u043d\u0435 \u043d\u0430\u0439\u0434\u0435\u043d\u044b", status_, responseText_, headers_, null); } else if (status_ == 429) { string responseText_ = ( response_.Content == null ) ? string.Empty : await response_.Content.ReadAsStringAsync().ConfigureAwait(false); throw new ApiException("\u0421\u043b\u0438\u0448\u043a\u043e\u043c \u043c\u043d\u043e\u0433\u043e \u0437\u0430\u043f\u0440\u043e\u0441\u043e\u0432. \u041b\u0438\u043c\u0438\u0442 10 \u0437\u0430\u043f\u0440\u043e\u0441\u043e\u0432 \u0432 \u0441\u0435\u043a\u0443\u043d\u0434\u0443", status_, responseText_, headers_, null); } else { var responseData_ = response_.Content == null ? null : await response_.Content.ReadAsStringAsync().ConfigureAwait(false); throw new ApiException("The HTTP status code of the response was not expected (" + status_ + ").", status_, responseData_, headers_, null); } } finally { if (disposeResponse_) response_.Dispose(); } } } finally { if (disposeClient_) client_.Dispose(); } } /// получить рецензии зрителей /// kinopoisk film id /// номер страницы /// Запрос выполнен успешно /// A server side error occurred. public System.Threading.Tasks.Task ReviewsAsync(int filmId, int? page) { return ReviewsAsync(filmId, page, System.Threading.CancellationToken.None); } /// A cancellation token that can be used by other objects or threads to receive notice of cancellation. /// получить рецензии зрителей /// kinopoisk film id /// номер страницы /// Запрос выполнен успешно /// A server side error occurred. public async System.Threading.Tasks.Task ReviewsAsync(int filmId, int? page, System.Threading.CancellationToken cancellationToken) { if (filmId == null) throw new System.ArgumentNullException("filmId"); var urlBuilder_ = new System.Text.StringBuilder(); urlBuilder_.Append(BaseUrl != null ? BaseUrl.TrimEnd('/') : "").Append("/api/v1/reviews?"); urlBuilder_.Append(System.Uri.EscapeDataString("filmId") + "=").Append(System.Uri.EscapeDataString(ConvertToString(filmId, System.Globalization.CultureInfo.InvariantCulture))).Append("&"); if (page != null) { urlBuilder_.Append(System.Uri.EscapeDataString("page") + "=").Append(System.Uri.EscapeDataString(ConvertToString(page, System.Globalization.CultureInfo.InvariantCulture))).Append("&"); } urlBuilder_.Length--; var client_ = _httpClient; var disposeClient_ = false; try { using (var request_ = new System.Net.Http.HttpRequestMessage()) { request_.Method = new System.Net.Http.HttpMethod("GET"); request_.Headers.Accept.Add(System.Net.Http.Headers.MediaTypeWithQualityHeaderValue.Parse("application/json")); PrepareRequest(client_, request_, urlBuilder_); var url_ = urlBuilder_.ToString(); request_.RequestUri = new System.Uri(url_, System.UriKind.RelativeOrAbsolute); PrepareRequest(client_, request_, url_); var response_ = await client_.SendAsync(request_, System.Net.Http.HttpCompletionOption.ResponseHeadersRead, cancellationToken).ConfigureAwait(false); var disposeResponse_ = true; try { var headers_ = System.Linq.Enumerable.ToDictionary(response_.Headers, h_ => h_.Key, h_ => h_.Value); if (response_.Content != null && response_.Content.Headers != null) { foreach (var item_ in response_.Content.Headers) headers_[item_.Key] = item_.Value; } ProcessResponse(client_, response_); var status_ = (int)response_.StatusCode; if (status_ == 200) { var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); if (objectResponse_.Object == null) { throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); } return objectResponse_.Object; } else if (status_ == 401) { string responseText_ = ( response_.Content == null ) ? string.Empty : await response_.Content.ReadAsStringAsync().ConfigureAwait(false); throw new ApiException("\u041f\u0443\u0441\u0442\u043e\u0439 \u0438\u043b\u0438 \u043d\u0435\u043f\u0440\u0430\u0432\u0438\u043b\u044c\u043d\u044b\u0439 \u0442\u043e\u043a\u0435\u043d", status_, responseText_, headers_, null); } else if (status_ == 404) { string responseText_ = ( response_.Content == null ) ? string.Empty : await response_.Content.ReadAsStringAsync().ConfigureAwait(false); throw new ApiException("\u0420\u0435\u0446\u0435\u043d\u0437\u0438\u0438 \u043d\u0435 \u043d\u0430\u0439\u0434\u0435\u043d\u044b", status_, responseText_, headers_, null); } else if (status_ == 429) { string responseText_ = ( response_.Content == null ) ? string.Empty : await response_.Content.ReadAsStringAsync().ConfigureAwait(false); throw new ApiException("\u0421\u043b\u0438\u0448\u043a\u043e\u043c \u043c\u043d\u043e\u0433\u043e \u0437\u0430\u043f\u0440\u043e\u0441\u043e\u0432. \u041b\u0438\u043c\u0438\u0442 10 \u0437\u0430\u043f\u0440\u043e\u0441\u043e\u0432 \u0432 \u0441\u0435\u043a\u0443\u043d\u0434\u0443", status_, responseText_, headers_, null); } else { var responseData_ = response_.Content == null ? null : await response_.Content.ReadAsStringAsync().ConfigureAwait(false); throw new ApiException("The HTTP status code of the response was not expected (" + status_ + ").", status_, responseData_, headers_, null); } } finally { if (disposeResponse_) response_.Dispose(); } } } finally { if (disposeClient_) client_.Dispose(); } } /// получить полную рецензию по kinopoisk review id /// kinopoisk review id /// Запрос выполнен успешно /// A server side error occurred. public System.Threading.Tasks.Task DetailsAsync(int reviewId) { return DetailsAsync(reviewId, System.Threading.CancellationToken.None); } /// A cancellation token that can be used by other objects or threads to receive notice of cancellation. /// получить полную рецензию по kinopoisk review id /// kinopoisk review id /// Запрос выполнен успешно /// A server side error occurred. public async System.Threading.Tasks.Task DetailsAsync(int reviewId, System.Threading.CancellationToken cancellationToken) { if (reviewId == null) throw new System.ArgumentNullException("reviewId"); var urlBuilder_ = new System.Text.StringBuilder(); urlBuilder_.Append(BaseUrl != null ? BaseUrl.TrimEnd('/') : "").Append("/api/v1/reviews/details?"); urlBuilder_.Append(System.Uri.EscapeDataString("reviewId") + "=").Append(System.Uri.EscapeDataString(ConvertToString(reviewId, System.Globalization.CultureInfo.InvariantCulture))).Append("&"); urlBuilder_.Length--; var client_ = _httpClient; var disposeClient_ = false; try { using (var request_ = new System.Net.Http.HttpRequestMessage()) { request_.Method = new System.Net.Http.HttpMethod("GET"); request_.Headers.Accept.Add(System.Net.Http.Headers.MediaTypeWithQualityHeaderValue.Parse("application/json")); PrepareRequest(client_, request_, urlBuilder_); var url_ = urlBuilder_.ToString(); request_.RequestUri = new System.Uri(url_, System.UriKind.RelativeOrAbsolute); PrepareRequest(client_, request_, url_); var response_ = await client_.SendAsync(request_, System.Net.Http.HttpCompletionOption.ResponseHeadersRead, cancellationToken).ConfigureAwait(false); var disposeResponse_ = true; try { var headers_ = System.Linq.Enumerable.ToDictionary(response_.Headers, h_ => h_.Key, h_ => h_.Value); if (response_.Content != null && response_.Content.Headers != null) { foreach (var item_ in response_.Content.Headers) headers_[item_.Key] = item_.Value; } ProcessResponse(client_, response_); var status_ = (int)response_.StatusCode; if (status_ == 200) { var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); if (objectResponse_.Object == null) { throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); } return objectResponse_.Object; } else if (status_ == 401) { string responseText_ = ( response_.Content == null ) ? string.Empty : await response_.Content.ReadAsStringAsync().ConfigureAwait(false); throw new ApiException("\u041f\u0443\u0441\u0442\u043e\u0439 \u0438\u043b\u0438 \u043d\u0435\u043f\u0440\u0430\u0432\u0438\u043b\u044c\u043d\u044b\u0439 \u0442\u043e\u043a\u0435\u043d", status_, responseText_, headers_, null); } else if (status_ == 404) { string responseText_ = ( response_.Content == null ) ? string.Empty : await response_.Content.ReadAsStringAsync().ConfigureAwait(false); throw new ApiException("\u0420\u0435\u0446\u0435\u043d\u0437\u0438\u044f \u043d\u0435 \u043d\u0430\u0439\u0434\u0435\u043d\u0430", status_, responseText_, headers_, null); } else if (status_ == 429) { string responseText_ = ( response_.Content == null ) ? string.Empty : await response_.Content.ReadAsStringAsync().ConfigureAwait(false); throw new ApiException("\u0421\u043b\u0438\u0448\u043a\u043e\u043c \u043c\u043d\u043e\u0433\u043e \u0437\u0430\u043f\u0440\u043e\u0441\u043e\u0432. \u041b\u0438\u043c\u0438\u0442 10 \u0437\u0430\u043f\u0440\u043e\u0441\u043e\u0432 \u0432 \u0441\u0435\u043a\u0443\u043d\u0434\u0443", status_, responseText_, headers_, null); } else { var responseData_ = response_.Content == null ? null : await response_.Content.ReadAsStringAsync().ConfigureAwait(false); throw new ApiException("The HTTP status code of the response was not expected (" + status_ + ").", status_, responseData_, headers_, null); } } finally { if (disposeResponse_) response_.Dispose(); } } } finally { if (disposeClient_) client_.Dispose(); } } /// получить данные об актерах, режисерах и т.д. по kinopoisk film id /// kinopoisk film id /// Запрос выполнен успешно /// A server side error occurred. public System.Threading.Tasks.Task> StaffAllAsync(int filmId) { return StaffAllAsync(filmId, System.Threading.CancellationToken.None); } /// A cancellation token that can be used by other objects or threads to receive notice of cancellation. /// получить данные об актерах, режисерах и т.д. по kinopoisk film id /// kinopoisk film id /// Запрос выполнен успешно /// A server side error occurred. public async System.Threading.Tasks.Task> StaffAllAsync(int filmId, System.Threading.CancellationToken cancellationToken) { if (filmId == null) throw new System.ArgumentNullException("filmId"); var urlBuilder_ = new System.Text.StringBuilder(); urlBuilder_.Append(BaseUrl != null ? BaseUrl.TrimEnd('/') : "").Append("/api/v1/staff?"); urlBuilder_.Append(System.Uri.EscapeDataString("filmId") + "=").Append(System.Uri.EscapeDataString(ConvertToString(filmId, System.Globalization.CultureInfo.InvariantCulture))).Append("&"); urlBuilder_.Length--; var client_ = _httpClient; var disposeClient_ = false; try { using (var request_ = new System.Net.Http.HttpRequestMessage()) { request_.Method = new System.Net.Http.HttpMethod("GET"); request_.Headers.Accept.Add(System.Net.Http.Headers.MediaTypeWithQualityHeaderValue.Parse("application/json")); PrepareRequest(client_, request_, urlBuilder_); var url_ = urlBuilder_.ToString(); request_.RequestUri = new System.Uri(url_, System.UriKind.RelativeOrAbsolute); PrepareRequest(client_, request_, url_); var response_ = await client_.SendAsync(request_, System.Net.Http.HttpCompletionOption.ResponseHeadersRead, cancellationToken).ConfigureAwait(false); var disposeResponse_ = true; try { var headers_ = System.Linq.Enumerable.ToDictionary(response_.Headers, h_ => h_.Key, h_ => h_.Value); if (response_.Content != null && response_.Content.Headers != null) { foreach (var item_ in response_.Content.Headers) headers_[item_.Key] = item_.Value; } ProcessResponse(client_, response_); var status_ = (int)response_.StatusCode; if (status_ == 200) { var objectResponse_ = await ReadObjectResponseAsync>(response_, headers_, cancellationToken).ConfigureAwait(false); if (objectResponse_.Object == null) { throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); } return objectResponse_.Object; } else if (status_ == 401) { string responseText_ = ( response_.Content == null ) ? string.Empty : await response_.Content.ReadAsStringAsync().ConfigureAwait(false); throw new ApiException("\u041f\u0443\u0441\u0442\u043e\u0439 \u0438\u043b\u0438 \u043d\u0435\u043f\u0440\u0430\u0432\u0438\u043b\u044c\u043d\u044b\u0439 \u0442\u043e\u043a\u0435\u043d", status_, responseText_, headers_, null); } else if (status_ == 404) { string responseText_ = ( response_.Content == null ) ? string.Empty : await response_.Content.ReadAsStringAsync().ConfigureAwait(false); throw new ApiException("\u0414\u0430\u043d\u043d\u044b\u0435 \u043d\u0435 \u043d\u0430\u0439\u0434\u0435\u043d\u044b", status_, responseText_, headers_, null); } else if (status_ == 429) { string responseText_ = ( response_.Content == null ) ? string.Empty : await response_.Content.ReadAsStringAsync().ConfigureAwait(false); throw new ApiException("\u0421\u043b\u0438\u0448\u043a\u043e\u043c \u043c\u043d\u043e\u0433\u043e \u0437\u0430\u043f\u0440\u043e\u0441\u043e\u0432. \u041b\u0438\u043c\u0438\u0442 10 \u0437\u0430\u043f\u0440\u043e\u0441\u043e\u0432 \u0432 \u0441\u0435\u043a\u0443\u043d\u0434\u0443", status_, responseText_, headers_, null); } else { var responseData_ = response_.Content == null ? null : await response_.Content.ReadAsStringAsync().ConfigureAwait(false); throw new ApiException("The HTTP status code of the response was not expected (" + status_ + ").", status_, responseData_, headers_, null); } } finally { if (disposeResponse_) response_.Dispose(); } } } finally { if (disposeClient_) client_.Dispose(); } } /// получить данные о конкретном человеке по kinopoisk person id /// kinopoisk person id /// Запрос выполнен успешно /// A server side error occurred. public System.Threading.Tasks.Task StaffAsync(int id) { return StaffAsync(id, System.Threading.CancellationToken.None); } /// A cancellation token that can be used by other objects or threads to receive notice of cancellation. /// получить данные о конкретном человеке по kinopoisk person id /// kinopoisk person id /// Запрос выполнен успешно /// A server side error occurred. public async System.Threading.Tasks.Task StaffAsync(int id, System.Threading.CancellationToken cancellationToken) { if (id == null) throw new System.ArgumentNullException("id"); var urlBuilder_ = new System.Text.StringBuilder(); urlBuilder_.Append(BaseUrl != null ? BaseUrl.TrimEnd('/') : "").Append("/api/v1/staff/{id}"); urlBuilder_.Replace("{id}", System.Uri.EscapeDataString(ConvertToString(id, System.Globalization.CultureInfo.InvariantCulture))); var client_ = _httpClient; var disposeClient_ = false; try { using (var request_ = new System.Net.Http.HttpRequestMessage()) { request_.Method = new System.Net.Http.HttpMethod("GET"); request_.Headers.Accept.Add(System.Net.Http.Headers.MediaTypeWithQualityHeaderValue.Parse("application/json")); PrepareRequest(client_, request_, urlBuilder_); var url_ = urlBuilder_.ToString(); request_.RequestUri = new System.Uri(url_, System.UriKind.RelativeOrAbsolute); PrepareRequest(client_, request_, url_); var response_ = await client_.SendAsync(request_, System.Net.Http.HttpCompletionOption.ResponseHeadersRead, cancellationToken).ConfigureAwait(false); var disposeResponse_ = true; try { var headers_ = System.Linq.Enumerable.ToDictionary(response_.Headers, h_ => h_.Key, h_ => h_.Value); if (response_.Content != null && response_.Content.Headers != null) { foreach (var item_ in response_.Content.Headers) headers_[item_.Key] = item_.Value; } ProcessResponse(client_, response_); var status_ = (int)response_.StatusCode; if (status_ == 200) { var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); if (objectResponse_.Object == null) { throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); } return objectResponse_.Object; } else if (status_ == 401) { string responseText_ = ( response_.Content == null ) ? string.Empty : await response_.Content.ReadAsStringAsync().ConfigureAwait(false); throw new ApiException("\u041f\u0443\u0441\u0442\u043e\u0439 \u0438\u043b\u0438 \u043d\u0435\u043f\u0440\u0430\u0432\u0438\u043b\u044c\u043d\u044b\u0439 \u0442\u043e\u043a\u0435\u043d", status_, responseText_, headers_, null); } else if (status_ == 404) { string responseText_ = ( response_.Content == null ) ? string.Empty : await response_.Content.ReadAsStringAsync().ConfigureAwait(false); throw new ApiException("\u0414\u0430\u043d\u043d\u044b\u0435 \u043d\u0435 \u043d\u0430\u0439\u0434\u0435\u043d\u044b", status_, responseText_, headers_, null); } else if (status_ == 429) { string responseText_ = ( response_.Content == null ) ? string.Empty : await response_.Content.ReadAsStringAsync().ConfigureAwait(false); throw new ApiException("\u0421\u043b\u0438\u0448\u043a\u043e\u043c \u043c\u043d\u043e\u0433\u043e \u0437\u0430\u043f\u0440\u043e\u0441\u043e\u0432. \u041b\u0438\u043c\u0438\u0442 10 \u0437\u0430\u043f\u0440\u043e\u0441\u043e\u0432 \u0432 \u0441\u0435\u043a\u0443\u043d\u0434\u0443", status_, responseText_, headers_, null); } else { var responseData_ = response_.Content == null ? null : await response_.Content.ReadAsStringAsync().ConfigureAwait(false); throw new ApiException("The HTTP status code of the response was not expected (" + status_ + ").", status_, responseData_, headers_, null); } } finally { if (disposeResponse_) response_.Dispose(); } } } finally { if (disposeClient_) client_.Dispose(); } } protected struct ObjectResponseResult { public ObjectResponseResult(T responseObject, string responseText) { this.Object = responseObject; this.Text = responseText; } public T Object { get; } public string Text { get; } } public bool ReadResponseAsString { get; set; } protected virtual async System.Threading.Tasks.Task> ReadObjectResponseAsync(System.Net.Http.HttpResponseMessage response, System.Collections.Generic.IReadOnlyDictionary> headers, System.Threading.CancellationToken cancellationToken) { if (response == null || response.Content == null) { return new ObjectResponseResult(default(T), string.Empty); } if (ReadResponseAsString) { var responseText = await response.Content.ReadAsStringAsync().ConfigureAwait(false); try { var typedBody = Newtonsoft.Json.JsonConvert.DeserializeObject(responseText, JsonSerializerSettings); return new ObjectResponseResult(typedBody, responseText); } catch (Newtonsoft.Json.JsonException exception) { var message = "Could not deserialize the response body string as " + typeof(T).FullName + "."; throw new ApiException(message, (int)response.StatusCode, responseText, headers, exception); } } else { try { using (var responseStream = await response.Content.ReadAsStreamAsync().ConfigureAwait(false)) using (var streamReader = new System.IO.StreamReader(responseStream)) using (var jsonTextReader = new Newtonsoft.Json.JsonTextReader(streamReader)) { var serializer = Newtonsoft.Json.JsonSerializer.Create(JsonSerializerSettings); var typedBody = serializer.Deserialize(jsonTextReader); return new ObjectResponseResult(typedBody, string.Empty); } } catch (Newtonsoft.Json.JsonException exception) { var message = "Could not deserialize the response body stream as " + typeof(T).FullName + "."; throw new ApiException(message, (int)response.StatusCode, string.Empty, headers, exception); } } } private string ConvertToString(object value, System.Globalization.CultureInfo cultureInfo) { if (value == null) { return ""; } if (value is System.Enum) { var name = System.Enum.GetName(value.GetType(), value); if (name != null) { var field = System.Reflection.IntrospectionExtensions.GetTypeInfo(value.GetType()).GetDeclaredField(name); if (field != null) { var attribute = System.Reflection.CustomAttributeExtensions.GetCustomAttribute(field, typeof(System.Runtime.Serialization.EnumMemberAttribute)) as System.Runtime.Serialization.EnumMemberAttribute; if (attribute != null) { return attribute.Value != null ? attribute.Value : name; } } var converted = System.Convert.ToString(System.Convert.ChangeType(value, System.Enum.GetUnderlyingType(value.GetType()), cultureInfo)); return converted == null ? string.Empty : converted; } } else if (value is bool) { return System.Convert.ToString((bool)value, cultureInfo).ToLowerInvariant(); } else if (value is byte[]) { return System.Convert.ToBase64String((byte[]) value); } else if (value.GetType().IsArray) { var array = System.Linq.Enumerable.OfType((System.Array) value); return string.Join(",", System.Linq.Enumerable.Select(array, o => ConvertToString(o, cultureInfo))); } var result = System.Convert.ToString(value, cultureInfo); return result == null ? "" : result; } } [System.CodeDom.Compiler.GeneratedCode("NSwag", "13.11.1.0 (NJsonSchema v10.4.3.0 (Newtonsoft.Json v12.0.0.0))")] public partial class BoxClient { private string _baseUrl = "https://kinopoiskapiunofficial.tech"; private System.Net.Http.HttpClient _httpClient; private System.Lazy _settings; public BoxClient(System.Net.Http.HttpClient httpClient) { _httpClient = httpClient; _settings = new System.Lazy(CreateSerializerSettings); } private Newtonsoft.Json.JsonSerializerSettings CreateSerializerSettings() { var settings = KinopoiskUnofficialInfo.ApiClient.JsonTransformator.TransformSettings(new Newtonsoft.Json.JsonSerializerSettings { }); UpdateJsonSerializerSettings(settings); return settings; } public string BaseUrl { get { return _baseUrl; } set { _baseUrl = value; } } protected Newtonsoft.Json.JsonSerializerSettings JsonSerializerSettings { get { return _settings.Value; } } partial void UpdateJsonSerializerSettings(Newtonsoft.Json.JsonSerializerSettings settings); partial void PrepareRequest(System.Net.Http.HttpClient client, System.Net.Http.HttpRequestMessage request, string url); partial void PrepareRequest(System.Net.Http.HttpClient client, System.Net.Http.HttpRequestMessage request, System.Text.StringBuilder urlBuilder); partial void ProcessResponse(System.Net.Http.HttpClient client, System.Net.Http.HttpResponseMessage response); /// получить данные о бюджете и сборах фильма по kinopoisk film id /// kinopoisk film id /// Запрос выполнен успешно /// A server side error occurred. public System.Threading.Tasks.Task OfficeAsync(int id) { return OfficeAsync(id, System.Threading.CancellationToken.None); } /// A cancellation token that can be used by other objects or threads to receive notice of cancellation. /// получить данные о бюджете и сборах фильма по kinopoisk film id /// kinopoisk film id /// Запрос выполнен успешно /// A server side error occurred. public async System.Threading.Tasks.Task OfficeAsync(int id, System.Threading.CancellationToken cancellationToken) { if (id == null) throw new System.ArgumentNullException("id"); var urlBuilder_ = new System.Text.StringBuilder(); urlBuilder_.Append(BaseUrl != null ? BaseUrl.TrimEnd('/') : "").Append("/api/v2.2/films/{id}/box_office"); urlBuilder_.Replace("{id}", System.Uri.EscapeDataString(ConvertToString(id, System.Globalization.CultureInfo.InvariantCulture))); var client_ = _httpClient; var disposeClient_ = false; try { using (var request_ = new System.Net.Http.HttpRequestMessage()) { request_.Method = new System.Net.Http.HttpMethod("GET"); request_.Headers.Accept.Add(System.Net.Http.Headers.MediaTypeWithQualityHeaderValue.Parse("application/json")); PrepareRequest(client_, request_, urlBuilder_); var url_ = urlBuilder_.ToString(); request_.RequestUri = new System.Uri(url_, System.UriKind.RelativeOrAbsolute); PrepareRequest(client_, request_, url_); var response_ = await client_.SendAsync(request_, System.Net.Http.HttpCompletionOption.ResponseHeadersRead, cancellationToken).ConfigureAwait(false); var disposeResponse_ = true; try { var headers_ = System.Linq.Enumerable.ToDictionary(response_.Headers, h_ => h_.Key, h_ => h_.Value); if (response_.Content != null && response_.Content.Headers != null) { foreach (var item_ in response_.Content.Headers) headers_[item_.Key] = item_.Value; } ProcessResponse(client_, response_); var status_ = (int)response_.StatusCode; if (status_ == 200) { var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); if (objectResponse_.Object == null) { throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); } return objectResponse_.Object; } else if (status_ == 401) { string responseText_ = ( response_.Content == null ) ? string.Empty : await response_.Content.ReadAsStringAsync().ConfigureAwait(false); throw new ApiException("\u041f\u0443\u0441\u0442\u043e\u0439 \u0438\u043b\u0438 \u043d\u0435\u043f\u0440\u0430\u0432\u0438\u043b\u044c\u043d\u044b\u0439 \u0442\u043e\u043a\u0435\u043d", status_, responseText_, headers_, null); } else if (status_ == 429) { string responseText_ = ( response_.Content == null ) ? string.Empty : await response_.Content.ReadAsStringAsync().ConfigureAwait(false); throw new ApiException("\u0421\u043b\u0438\u0448\u043a\u043e\u043c \u043c\u043d\u043e\u0433\u043e \u0437\u0430\u043f\u0440\u043e\u0441\u043e\u0432. \u041b\u0438\u043c\u0438\u0442 10 \u0437\u0430\u043f\u0440\u043e\u0441\u043e\u0432 \u0432 \u0441\u0435\u043a\u0443\u043d\u0434\u0443", status_, responseText_, headers_, null); } else { var responseData_ = response_.Content == null ? null : await response_.Content.ReadAsStringAsync().ConfigureAwait(false); throw new ApiException("The HTTP status code of the response was not expected (" + status_ + ").", status_, responseData_, headers_, null); } } finally { if (disposeResponse_) response_.Dispose(); } } } finally { if (disposeClient_) client_.Dispose(); } } protected struct ObjectResponseResult { public ObjectResponseResult(T responseObject, string responseText) { this.Object = responseObject; this.Text = responseText; } public T Object { get; } public string Text { get; } } public bool ReadResponseAsString { get; set; } protected virtual async System.Threading.Tasks.Task> ReadObjectResponseAsync(System.Net.Http.HttpResponseMessage response, System.Collections.Generic.IReadOnlyDictionary> headers, System.Threading.CancellationToken cancellationToken) { if (response == null || response.Content == null) { return new ObjectResponseResult(default(T), string.Empty); } if (ReadResponseAsString) { var responseText = await response.Content.ReadAsStringAsync().ConfigureAwait(false); try { var typedBody = Newtonsoft.Json.JsonConvert.DeserializeObject(responseText, JsonSerializerSettings); return new ObjectResponseResult(typedBody, responseText); } catch (Newtonsoft.Json.JsonException exception) { var message = "Could not deserialize the response body string as " + typeof(T).FullName + "."; throw new ApiException(message, (int)response.StatusCode, responseText, headers, exception); } } else { try { using (var responseStream = await response.Content.ReadAsStreamAsync().ConfigureAwait(false)) using (var streamReader = new System.IO.StreamReader(responseStream)) using (var jsonTextReader = new Newtonsoft.Json.JsonTextReader(streamReader)) { var serializer = Newtonsoft.Json.JsonSerializer.Create(JsonSerializerSettings); var typedBody = serializer.Deserialize(jsonTextReader); return new ObjectResponseResult(typedBody, string.Empty); } } catch (Newtonsoft.Json.JsonException exception) { var message = "Could not deserialize the response body stream as " + typeof(T).FullName + "."; throw new ApiException(message, (int)response.StatusCode, string.Empty, headers, exception); } } } private string ConvertToString(object value, System.Globalization.CultureInfo cultureInfo) { if (value == null) { return ""; } if (value is System.Enum) { var name = System.Enum.GetName(value.GetType(), value); if (name != null) { var field = System.Reflection.IntrospectionExtensions.GetTypeInfo(value.GetType()).GetDeclaredField(name); if (field != null) { var attribute = System.Reflection.CustomAttributeExtensions.GetCustomAttribute(field, typeof(System.Runtime.Serialization.EnumMemberAttribute)) as System.Runtime.Serialization.EnumMemberAttribute; if (attribute != null) { return attribute.Value != null ? attribute.Value : name; } } var converted = System.Convert.ToString(System.Convert.ChangeType(value, System.Enum.GetUnderlyingType(value.GetType()), cultureInfo)); return converted == null ? string.Empty : converted; } } else if (value is bool) { return System.Convert.ToString((bool)value, cultureInfo).ToLowerInvariant(); } else if (value is byte[]) { return System.Convert.ToBase64String((byte[]) value); } else if (value.GetType().IsArray) { var array = System.Linq.Enumerable.OfType((System.Array) value); return string.Join(",", System.Linq.Enumerable.Select(array, o => ConvertToString(o, cultureInfo))); } var result = System.Convert.ToString(value, cultureInfo); return result == null ? "" : result; } } [System.CodeDom.Compiler.GeneratedCode("NSwag", "13.11.1.0 (NJsonSchema v10.4.3.0 (Newtonsoft.Json v12.0.0.0))")] public partial class AndClient { private string _baseUrl = "https://kinopoiskapiunofficial.tech"; private System.Net.Http.HttpClient _httpClient; private System.Lazy _settings; public AndClient(System.Net.Http.HttpClient httpClient) { _httpClient = httpClient; _settings = new System.Lazy(CreateSerializerSettings); } private Newtonsoft.Json.JsonSerializerSettings CreateSerializerSettings() { var settings = KinopoiskUnofficialInfo.ApiClient.JsonTransformator.TransformSettings(new Newtonsoft.Json.JsonSerializerSettings { }); UpdateJsonSerializerSettings(settings); return settings; } public string BaseUrl { get { return _baseUrl; } set { _baseUrl = value; } } protected Newtonsoft.Json.JsonSerializerSettings JsonSerializerSettings { get { return _settings.Value; } } partial void UpdateJsonSerializerSettings(Newtonsoft.Json.JsonSerializerSettings settings); partial void PrepareRequest(System.Net.Http.HttpClient client, System.Net.Http.HttpRequestMessage request, string url); partial void PrepareRequest(System.Net.Http.HttpClient client, System.Net.Http.HttpRequestMessage request, System.Text.StringBuilder urlBuilder); partial void ProcessResponse(System.Net.Http.HttpClient client, System.Net.Http.HttpResponseMessage response); /// получить сиквелы и приквелы для фильма по kinopoisk film id /// kinopoisk film id /// Запрос выполнен успешно /// A server side error occurred. public System.Threading.Tasks.Task> PrequelsAsync(int id) { return PrequelsAsync(id, System.Threading.CancellationToken.None); } /// A cancellation token that can be used by other objects or threads to receive notice of cancellation. /// получить сиквелы и приквелы для фильма по kinopoisk film id /// kinopoisk film id /// Запрос выполнен успешно /// A server side error occurred. public async System.Threading.Tasks.Task> PrequelsAsync(int id, System.Threading.CancellationToken cancellationToken) { if (id == null) throw new System.ArgumentNullException("id"); var urlBuilder_ = new System.Text.StringBuilder(); urlBuilder_.Append(BaseUrl != null ? BaseUrl.TrimEnd('/') : "").Append("/api/v2.1/films/{id}/sequels_and_prequels"); urlBuilder_.Replace("{id}", System.Uri.EscapeDataString(ConvertToString(id, System.Globalization.CultureInfo.InvariantCulture))); var client_ = _httpClient; var disposeClient_ = false; try { using (var request_ = new System.Net.Http.HttpRequestMessage()) { request_.Method = new System.Net.Http.HttpMethod("GET"); request_.Headers.Accept.Add(System.Net.Http.Headers.MediaTypeWithQualityHeaderValue.Parse("application/json")); PrepareRequest(client_, request_, urlBuilder_); var url_ = urlBuilder_.ToString(); request_.RequestUri = new System.Uri(url_, System.UriKind.RelativeOrAbsolute); PrepareRequest(client_, request_, url_); var response_ = await client_.SendAsync(request_, System.Net.Http.HttpCompletionOption.ResponseHeadersRead, cancellationToken).ConfigureAwait(false); var disposeResponse_ = true; try { var headers_ = System.Linq.Enumerable.ToDictionary(response_.Headers, h_ => h_.Key, h_ => h_.Value); if (response_.Content != null && response_.Content.Headers != null) { foreach (var item_ in response_.Content.Headers) headers_[item_.Key] = item_.Value; } ProcessResponse(client_, response_); var status_ = (int)response_.StatusCode; if (status_ == 200) { var objectResponse_ = await ReadObjectResponseAsync>(response_, headers_, cancellationToken).ConfigureAwait(false); if (objectResponse_.Object == null) { throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); } return objectResponse_.Object; } else if (status_ == 401) { string responseText_ = ( response_.Content == null ) ? string.Empty : await response_.Content.ReadAsStringAsync().ConfigureAwait(false); throw new ApiException("\u041f\u0443\u0441\u0442\u043e\u0439 \u0438\u043b\u0438 \u043d\u0435\u043f\u0440\u0430\u0432\u0438\u043b\u044c\u043d\u044b\u0439 \u0442\u043e\u043a\u0435\u043d", status_, responseText_, headers_, null); } else if (status_ == 404) { string responseText_ = ( response_.Content == null ) ? string.Empty : await response_.Content.ReadAsStringAsync().ConfigureAwait(false); throw new ApiException("\u0424\u0438\u043b\u044c\u043c \u043d\u0435 \u043d\u0430\u0439\u0434\u0435\u043d", status_, responseText_, headers_, null); } else if (status_ == 429) { string responseText_ = ( response_.Content == null ) ? string.Empty : await response_.Content.ReadAsStringAsync().ConfigureAwait(false); throw new ApiException("\u0421\u043b\u0438\u0448\u043a\u043e\u043c \u043c\u043d\u043e\u0433\u043e \u0437\u0430\u043f\u0440\u043e\u0441\u043e\u0432. \u041b\u0438\u043c\u0438\u0442 10 \u0437\u0430\u043f\u0440\u043e\u0441\u043e\u0432 \u0432 \u0441\u0435\u043a\u0443\u043d\u0434\u0443", status_, responseText_, headers_, null); } else { var responseData_ = response_.Content == null ? null : await response_.Content.ReadAsStringAsync().ConfigureAwait(false); throw new ApiException("The HTTP status code of the response was not expected (" + status_ + ").", status_, responseData_, headers_, null); } } finally { if (disposeResponse_) response_.Dispose(); } } } finally { if (disposeClient_) client_.Dispose(); } } protected struct ObjectResponseResult { public ObjectResponseResult(T responseObject, string responseText) { this.Object = responseObject; this.Text = responseText; } public T Object { get; } public string Text { get; } } public bool ReadResponseAsString { get; set; } protected virtual async System.Threading.Tasks.Task> ReadObjectResponseAsync(System.Net.Http.HttpResponseMessage response, System.Collections.Generic.IReadOnlyDictionary> headers, System.Threading.CancellationToken cancellationToken) { if (response == null || response.Content == null) { return new ObjectResponseResult(default(T), string.Empty); } if (ReadResponseAsString) { var responseText = await response.Content.ReadAsStringAsync().ConfigureAwait(false); try { var typedBody = Newtonsoft.Json.JsonConvert.DeserializeObject(responseText, JsonSerializerSettings); return new ObjectResponseResult(typedBody, responseText); } catch (Newtonsoft.Json.JsonException exception) { var message = "Could not deserialize the response body string as " + typeof(T).FullName + "."; throw new ApiException(message, (int)response.StatusCode, responseText, headers, exception); } } else { try { using (var responseStream = await response.Content.ReadAsStreamAsync().ConfigureAwait(false)) using (var streamReader = new System.IO.StreamReader(responseStream)) using (var jsonTextReader = new Newtonsoft.Json.JsonTextReader(streamReader)) { var serializer = Newtonsoft.Json.JsonSerializer.Create(JsonSerializerSettings); var typedBody = serializer.Deserialize(jsonTextReader); return new ObjectResponseResult(typedBody, string.Empty); } } catch (Newtonsoft.Json.JsonException exception) { var message = "Could not deserialize the response body stream as " + typeof(T).FullName + "."; throw new ApiException(message, (int)response.StatusCode, string.Empty, headers, exception); } } } private string ConvertToString(object value, System.Globalization.CultureInfo cultureInfo) { if (value == null) { return ""; } if (value is System.Enum) { var name = System.Enum.GetName(value.GetType(), value); if (name != null) { var field = System.Reflection.IntrospectionExtensions.GetTypeInfo(value.GetType()).GetDeclaredField(name); if (field != null) { var attribute = System.Reflection.CustomAttributeExtensions.GetCustomAttribute(field, typeof(System.Runtime.Serialization.EnumMemberAttribute)) as System.Runtime.Serialization.EnumMemberAttribute; if (attribute != null) { return attribute.Value != null ? attribute.Value : name; } } var converted = System.Convert.ToString(System.Convert.ChangeType(value, System.Enum.GetUnderlyingType(value.GetType()), cultureInfo)); return converted == null ? string.Empty : converted; } } else if (value is bool) { return System.Convert.ToString((bool)value, cultureInfo).ToLowerInvariant(); } else if (value is byte[]) { return System.Convert.ToBase64String((byte[]) value); } else if (value.GetType().IsArray) { var array = System.Linq.Enumerable.OfType((System.Array) value); return string.Join(",", System.Linq.Enumerable.Select(array, o => ConvertToString(o, cultureInfo))); } var result = System.Convert.ToString(value, cultureInfo); return result == null ? "" : result; } } [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "10.4.3.0 (Newtonsoft.Json v12.0.0.0)")] public partial class Film { [Newtonsoft.Json.JsonProperty("kinopoiskId", Required = Newtonsoft.Json.Required.Always)] public int KinopoiskId { get; set; } [Newtonsoft.Json.JsonProperty("imdbId", Required = Newtonsoft.Json.Required.Always)] [System.ComponentModel.DataAnnotations.Required(AllowEmptyStrings = true)] public string ImdbId { get; set; } [Newtonsoft.Json.JsonProperty("nameRu", Required = Newtonsoft.Json.Required.Always)] [System.ComponentModel.DataAnnotations.Required(AllowEmptyStrings = true)] public string NameRu { get; set; } [Newtonsoft.Json.JsonProperty("nameEn", Required = Newtonsoft.Json.Required.Always)] [System.ComponentModel.DataAnnotations.Required(AllowEmptyStrings = true)] public string NameEn { get; set; } [Newtonsoft.Json.JsonProperty("nameOriginal", Required = Newtonsoft.Json.Required.Always)] [System.ComponentModel.DataAnnotations.Required(AllowEmptyStrings = true)] public string NameOriginal { get; set; } [Newtonsoft.Json.JsonProperty("posterUrl", Required = Newtonsoft.Json.Required.Always)] [System.ComponentModel.DataAnnotations.Required(AllowEmptyStrings = true)] public string PosterUrl { get; set; } [Newtonsoft.Json.JsonProperty("posterUrlPreview", Required = Newtonsoft.Json.Required.Always)] [System.ComponentModel.DataAnnotations.Required(AllowEmptyStrings = true)] public string PosterUrlPreview { get; set; } [Newtonsoft.Json.JsonProperty("reviewsCount", Required = Newtonsoft.Json.Required.Always)] public int ReviewsCount { get; set; } [Newtonsoft.Json.JsonProperty("ratingGoodReview", Required = Newtonsoft.Json.Required.Always)] public double RatingGoodReview { get; set; } [Newtonsoft.Json.JsonProperty("ratingGoodReviewVoteCount", Required = Newtonsoft.Json.Required.Always)] public int RatingGoodReviewVoteCount { get; set; } [Newtonsoft.Json.JsonProperty("ratingKinopoisk", Required = Newtonsoft.Json.Required.Always)] public double RatingKinopoisk { get; set; } [Newtonsoft.Json.JsonProperty("ratingKinopoiskVoteCount", Required = Newtonsoft.Json.Required.Always)] public int RatingKinopoiskVoteCount { get; set; } [Newtonsoft.Json.JsonProperty("ratingImdb", Required = Newtonsoft.Json.Required.Always)] public double RatingImdb { get; set; } [Newtonsoft.Json.JsonProperty("ratingImdbVoteCount", Required = Newtonsoft.Json.Required.Always)] public int RatingImdbVoteCount { get; set; } [Newtonsoft.Json.JsonProperty("ratingFilmCritics", Required = Newtonsoft.Json.Required.Always)] public double RatingFilmCritics { get; set; } [Newtonsoft.Json.JsonProperty("ratingFilmCriticsVoteCount", Required = Newtonsoft.Json.Required.Always)] public int RatingFilmCriticsVoteCount { get; set; } [Newtonsoft.Json.JsonProperty("ratingAwait", Required = Newtonsoft.Json.Required.Always)] public double RatingAwait { get; set; } [Newtonsoft.Json.JsonProperty("ratingAwaitCount", Required = Newtonsoft.Json.Required.Always)] public int RatingAwaitCount { get; set; } [Newtonsoft.Json.JsonProperty("ratingRfCritics", Required = Newtonsoft.Json.Required.Always)] public double RatingRfCritics { get; set; } [Newtonsoft.Json.JsonProperty("ratingRfCriticsVoteCount", Required = Newtonsoft.Json.Required.Always)] public int RatingRfCriticsVoteCount { get; set; } [Newtonsoft.Json.JsonProperty("webUrl", Required = Newtonsoft.Json.Required.Always)] [System.ComponentModel.DataAnnotations.Required(AllowEmptyStrings = true)] public string WebUrl { get; set; } [Newtonsoft.Json.JsonProperty("year", Required = Newtonsoft.Json.Required.Always)] public int Year { get; set; } [Newtonsoft.Json.JsonProperty("filmLength", Required = Newtonsoft.Json.Required.Always)] public int FilmLength { get; set; } [Newtonsoft.Json.JsonProperty("slogan", Required = Newtonsoft.Json.Required.Always)] [System.ComponentModel.DataAnnotations.Required(AllowEmptyStrings = true)] public string Slogan { get; set; } [Newtonsoft.Json.JsonProperty("description", Required = Newtonsoft.Json.Required.Always)] [System.ComponentModel.DataAnnotations.Required(AllowEmptyStrings = true)] public string Description { get; set; } [Newtonsoft.Json.JsonProperty("shortDescription", Required = Newtonsoft.Json.Required.Always)] [System.ComponentModel.DataAnnotations.Required(AllowEmptyStrings = true)] public string ShortDescription { get; set; } [Newtonsoft.Json.JsonProperty("editorAnnotation", Required = Newtonsoft.Json.Required.Always)] [System.ComponentModel.DataAnnotations.Required(AllowEmptyStrings = true)] public string EditorAnnotation { get; set; } [Newtonsoft.Json.JsonProperty("isTicketsAvailable", Required = Newtonsoft.Json.Required.Always)] public bool IsTicketsAvailable { get; set; } [Newtonsoft.Json.JsonProperty("productionStatus", Required = Newtonsoft.Json.Required.Always)] [System.ComponentModel.DataAnnotations.Required(AllowEmptyStrings = true)] [Newtonsoft.Json.JsonConverter(typeof(Newtonsoft.Json.Converters.StringEnumConverter))] public FilmProductionStatus ProductionStatus { get; set; } [Newtonsoft.Json.JsonProperty("type", Required = Newtonsoft.Json.Required.Always)] [System.ComponentModel.DataAnnotations.Required(AllowEmptyStrings = true)] [Newtonsoft.Json.JsonConverter(typeof(Newtonsoft.Json.Converters.StringEnumConverter))] public FilmType Type { get; set; } [Newtonsoft.Json.JsonProperty("ratingMpaa", Required = Newtonsoft.Json.Required.Always)] [System.ComponentModel.DataAnnotations.Required(AllowEmptyStrings = true)] public string RatingMpaa { get; set; } [Newtonsoft.Json.JsonProperty("ratingAgeLimits", Required = Newtonsoft.Json.Required.Always)] [System.ComponentModel.DataAnnotations.Required(AllowEmptyStrings = true)] public string RatingAgeLimits { get; set; } [Newtonsoft.Json.JsonProperty("hasImax", Required = Newtonsoft.Json.Required.Always)] public bool HasImax { get; set; } [Newtonsoft.Json.JsonProperty("has3D", Required = Newtonsoft.Json.Required.Always)] public bool Has3D { get; set; } [Newtonsoft.Json.JsonProperty("lastSync", Required = Newtonsoft.Json.Required.Always)] [System.ComponentModel.DataAnnotations.Required(AllowEmptyStrings = true)] public string LastSync { get; set; } [Newtonsoft.Json.JsonProperty("countries", Required = Newtonsoft.Json.Required.Always)] [System.ComponentModel.DataAnnotations.Required] public System.Collections.Generic.ICollection Countries { get; set; } = new System.Collections.ObjectModel.Collection(); [Newtonsoft.Json.JsonProperty("genres", Required = Newtonsoft.Json.Required.Always)] [System.ComponentModel.DataAnnotations.Required] public System.Collections.Generic.ICollection Genres { get; set; } = new System.Collections.ObjectModel.Collection(); [Newtonsoft.Json.JsonProperty("startYear", Required = Newtonsoft.Json.Required.Always)] public int StartYear { get; set; } [Newtonsoft.Json.JsonProperty("endYear", Required = Newtonsoft.Json.Required.Always)] public int EndYear { get; set; } [Newtonsoft.Json.JsonProperty("serial", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] public bool Serial { get; set; } [Newtonsoft.Json.JsonProperty("shortFilm", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] public bool ShortFilm { get; set; } [Newtonsoft.Json.JsonProperty("completed", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] public bool Completed { get; set; } private System.Collections.Generic.IDictionary _additionalProperties = new System.Collections.Generic.Dictionary(); [Newtonsoft.Json.JsonExtensionData] public System.Collections.Generic.IDictionary AdditionalProperties { get { return _additionalProperties; } set { _additionalProperties = value; } } } [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "10.4.3.0 (Newtonsoft.Json v12.0.0.0)")] public partial class SeasonResponse { [Newtonsoft.Json.JsonProperty("total", Required = Newtonsoft.Json.Required.Always)] public int Total { get; set; } [Newtonsoft.Json.JsonProperty("items", Required = Newtonsoft.Json.Required.Always)] [System.ComponentModel.DataAnnotations.Required] public System.Collections.Generic.ICollection Items { get; set; } = new System.Collections.ObjectModel.Collection(); private System.Collections.Generic.IDictionary _additionalProperties = new System.Collections.Generic.Dictionary(); [Newtonsoft.Json.JsonExtensionData] public System.Collections.Generic.IDictionary AdditionalProperties { get { return _additionalProperties; } set { _additionalProperties = value; } } } [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "10.4.3.0 (Newtonsoft.Json v12.0.0.0)")] public partial class FactResponse { [Newtonsoft.Json.JsonProperty("total", Required = Newtonsoft.Json.Required.Always)] public int Total { get; set; } [Newtonsoft.Json.JsonProperty("items", Required = Newtonsoft.Json.Required.Always)] [System.ComponentModel.DataAnnotations.Required] public System.Collections.Generic.ICollection Items { get; set; } = new System.Collections.ObjectModel.Collection(); private System.Collections.Generic.IDictionary _additionalProperties = new System.Collections.Generic.Dictionary(); [Newtonsoft.Json.JsonExtensionData] public System.Collections.Generic.IDictionary AdditionalProperties { get { return _additionalProperties; } set { _additionalProperties = value; } } } [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "10.4.3.0 (Newtonsoft.Json v12.0.0.0)")] public partial class DistributionResponse { [Newtonsoft.Json.JsonProperty("total", Required = Newtonsoft.Json.Required.Always)] public int Total { get; set; } [Newtonsoft.Json.JsonProperty("items", Required = Newtonsoft.Json.Required.Always)] [System.ComponentModel.DataAnnotations.Required] public System.Collections.Generic.ICollection Items { get; set; } = new System.Collections.ObjectModel.Collection(); private System.Collections.Generic.IDictionary _additionalProperties = new System.Collections.Generic.Dictionary(); [Newtonsoft.Json.JsonExtensionData] public System.Collections.Generic.IDictionary AdditionalProperties { get { return _additionalProperties; } set { _additionalProperties = value; } } } [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "10.4.3.0 (Newtonsoft.Json v12.0.0.0)")] public partial class BoxOfficeResponse { [Newtonsoft.Json.JsonProperty("total", Required = Newtonsoft.Json.Required.Always)] public int Total { get; set; } [Newtonsoft.Json.JsonProperty("items", Required = Newtonsoft.Json.Required.Always)] [System.ComponentModel.DataAnnotations.Required] public System.Collections.Generic.ICollection Items { get; set; } = new System.Collections.ObjectModel.Collection(); private System.Collections.Generic.IDictionary _additionalProperties = new System.Collections.Generic.Dictionary(); [Newtonsoft.Json.JsonExtensionData] public System.Collections.Generic.IDictionary AdditionalProperties { get { return _additionalProperties; } set { _additionalProperties = value; } } } [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "10.4.3.0 (Newtonsoft.Json v12.0.0.0)")] public partial class Fact { [Newtonsoft.Json.JsonProperty("text", Required = Newtonsoft.Json.Required.Always)] [System.ComponentModel.DataAnnotations.Required(AllowEmptyStrings = true)] public string Text { get; set; } [Newtonsoft.Json.JsonProperty("type", Required = Newtonsoft.Json.Required.Always)] [System.ComponentModel.DataAnnotations.Required(AllowEmptyStrings = true)] [Newtonsoft.Json.JsonConverter(typeof(Newtonsoft.Json.Converters.StringEnumConverter))] public FactType Type { get; set; } [Newtonsoft.Json.JsonProperty("spoiler", Required = Newtonsoft.Json.Required.Always)] public bool Spoiler { get; set; } private System.Collections.Generic.IDictionary _additionalProperties = new System.Collections.Generic.Dictionary(); [Newtonsoft.Json.JsonExtensionData] public System.Collections.Generic.IDictionary AdditionalProperties { get { return _additionalProperties; } set { _additionalProperties = value; } } } [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "10.4.3.0 (Newtonsoft.Json v12.0.0.0)")] public partial class BoxOffice { [Newtonsoft.Json.JsonProperty("type", Required = Newtonsoft.Json.Required.Always)] [System.ComponentModel.DataAnnotations.Required(AllowEmptyStrings = true)] public string Type { get; set; } [Newtonsoft.Json.JsonProperty("amount", Required = Newtonsoft.Json.Required.Always)] public int Amount { get; set; } [Newtonsoft.Json.JsonProperty("currencyCode", Required = Newtonsoft.Json.Required.Always)] [System.ComponentModel.DataAnnotations.Required(AllowEmptyStrings = true)] public string CurrencyCode { get; set; } [Newtonsoft.Json.JsonProperty("name", Required = Newtonsoft.Json.Required.Always)] [System.ComponentModel.DataAnnotations.Required(AllowEmptyStrings = true)] public string Name { get; set; } [Newtonsoft.Json.JsonProperty("symbol", Required = Newtonsoft.Json.Required.Always)] [System.ComponentModel.DataAnnotations.Required(AllowEmptyStrings = true)] public string Symbol { get; set; } private System.Collections.Generic.IDictionary _additionalProperties = new System.Collections.Generic.Dictionary(); [Newtonsoft.Json.JsonExtensionData] public System.Collections.Generic.IDictionary AdditionalProperties { get { return _additionalProperties; } set { _additionalProperties = value; } } } [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "10.4.3.0 (Newtonsoft.Json v12.0.0.0)")] public partial class Distribution { [Newtonsoft.Json.JsonProperty("type", Required = Newtonsoft.Json.Required.Always)] [System.ComponentModel.DataAnnotations.Required(AllowEmptyStrings = true)] [Newtonsoft.Json.JsonConverter(typeof(Newtonsoft.Json.Converters.StringEnumConverter))] public DistributionType Type { get; set; } [Newtonsoft.Json.JsonProperty("subType", Required = Newtonsoft.Json.Required.Always)] [System.ComponentModel.DataAnnotations.Required(AllowEmptyStrings = true)] [Newtonsoft.Json.JsonConverter(typeof(Newtonsoft.Json.Converters.StringEnumConverter))] public DistributionSubType SubType { get; set; } [Newtonsoft.Json.JsonProperty("date", Required = Newtonsoft.Json.Required.Always)] [System.ComponentModel.DataAnnotations.Required(AllowEmptyStrings = true)] public string Date { get; set; } [Newtonsoft.Json.JsonProperty("reRelease", Required = Newtonsoft.Json.Required.Always)] public bool ReRelease { get; set; } [Newtonsoft.Json.JsonProperty("country", Required = Newtonsoft.Json.Required.Always)] [System.ComponentModel.DataAnnotations.Required] public Country Country { get; set; } = new Country(); [Newtonsoft.Json.JsonProperty("companies", Required = Newtonsoft.Json.Required.Always)] [System.ComponentModel.DataAnnotations.Required] public System.Collections.Generic.ICollection Companies { get; set; } = new System.Collections.ObjectModel.Collection(); private System.Collections.Generic.IDictionary _additionalProperties = new System.Collections.Generic.Dictionary(); [Newtonsoft.Json.JsonExtensionData] public System.Collections.Generic.IDictionary AdditionalProperties { get { return _additionalProperties; } set { _additionalProperties = value; } } } [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "10.4.3.0 (Newtonsoft.Json v12.0.0.0)")] public partial class Company { [Newtonsoft.Json.JsonProperty("name", Required = Newtonsoft.Json.Required.Always)] [System.ComponentModel.DataAnnotations.Required(AllowEmptyStrings = true)] public string Name { get; set; } private System.Collections.Generic.IDictionary _additionalProperties = new System.Collections.Generic.Dictionary(); [Newtonsoft.Json.JsonExtensionData] public System.Collections.Generic.IDictionary AdditionalProperties { get { return _additionalProperties; } set { _additionalProperties = value; } } } [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "10.4.3.0 (Newtonsoft.Json v12.0.0.0)")] public partial class Season { [Newtonsoft.Json.JsonProperty("number", Required = Newtonsoft.Json.Required.Always)] public int Number { get; set; } [Newtonsoft.Json.JsonProperty("episodes", Required = Newtonsoft.Json.Required.Always)] [System.ComponentModel.DataAnnotations.Required] public System.Collections.Generic.ICollection Episodes { get; set; } = new System.Collections.ObjectModel.Collection(); private System.Collections.Generic.IDictionary _additionalProperties = new System.Collections.Generic.Dictionary(); [Newtonsoft.Json.JsonExtensionData] public System.Collections.Generic.IDictionary AdditionalProperties { get { return _additionalProperties; } set { _additionalProperties = value; } } } [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "10.4.3.0 (Newtonsoft.Json v12.0.0.0)")] public partial class Episode { [Newtonsoft.Json.JsonProperty("seasonNumber", Required = Newtonsoft.Json.Required.Always)] public int SeasonNumber { get; set; } [Newtonsoft.Json.JsonProperty("episodeNumber", Required = Newtonsoft.Json.Required.Always)] public int EpisodeNumber { get; set; } [Newtonsoft.Json.JsonProperty("nameRu", Required = Newtonsoft.Json.Required.Always)] [System.ComponentModel.DataAnnotations.Required(AllowEmptyStrings = true)] public string NameRu { get; set; } [Newtonsoft.Json.JsonProperty("nameEn", Required = Newtonsoft.Json.Required.Always)] [System.ComponentModel.DataAnnotations.Required(AllowEmptyStrings = true)] public string NameEn { get; set; } [Newtonsoft.Json.JsonProperty("synopsis", Required = Newtonsoft.Json.Required.Always)] [System.ComponentModel.DataAnnotations.Required(AllowEmptyStrings = true)] public string Synopsis { get; set; } [Newtonsoft.Json.JsonProperty("releaseDate", Required = Newtonsoft.Json.Required.Always)] [System.ComponentModel.DataAnnotations.Required(AllowEmptyStrings = true)] public string ReleaseDate { get; set; } private System.Collections.Generic.IDictionary _additionalProperties = new System.Collections.Generic.Dictionary(); [Newtonsoft.Json.JsonExtensionData] public System.Collections.Generic.IDictionary AdditionalProperties { get { return _additionalProperties; } set { _additionalProperties = value; } } } [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "10.4.3.0 (Newtonsoft.Json v12.0.0.0)")] public partial class Country { [Newtonsoft.Json.JsonProperty("country", Required = Newtonsoft.Json.Required.Always)] [System.ComponentModel.DataAnnotations.Required(AllowEmptyStrings = true)] public string Country1 { get; set; } private System.Collections.Generic.IDictionary _additionalProperties = new System.Collections.Generic.Dictionary(); [Newtonsoft.Json.JsonExtensionData] public System.Collections.Generic.IDictionary AdditionalProperties { get { return _additionalProperties; } set { _additionalProperties = value; } } } [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "10.4.3.0 (Newtonsoft.Json v12.0.0.0)")] public partial class Genre { [Newtonsoft.Json.JsonProperty("genre", Required = Newtonsoft.Json.Required.Always)] [System.ComponentModel.DataAnnotations.Required(AllowEmptyStrings = true)] public string Genre1 { get; set; } private System.Collections.Generic.IDictionary _additionalProperties = new System.Collections.Generic.Dictionary(); [Newtonsoft.Json.JsonExtensionData] public System.Collections.Generic.IDictionary AdditionalProperties { get { return _additionalProperties; } set { _additionalProperties = value; } } } [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "10.4.3.0 (Newtonsoft.Json v12.0.0.0)")] public partial class FiltersResponse { [Newtonsoft.Json.JsonProperty("genres", Required = Newtonsoft.Json.Required.Always)] [System.ComponentModel.DataAnnotations.Required] public System.Collections.Generic.ICollection Genres { get; set; } = new System.Collections.ObjectModel.Collection(); [Newtonsoft.Json.JsonProperty("countries", Required = Newtonsoft.Json.Required.Always)] [System.ComponentModel.DataAnnotations.Required] public System.Collections.Generic.ICollection Countries { get; set; } = new System.Collections.ObjectModel.Collection(); private System.Collections.Generic.IDictionary _additionalProperties = new System.Collections.Generic.Dictionary(); [Newtonsoft.Json.JsonExtensionData] public System.Collections.Generic.IDictionary AdditionalProperties { get { return _additionalProperties; } set { _additionalProperties = value; } } } [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "10.4.3.0 (Newtonsoft.Json v12.0.0.0)")] public partial class FilmSearchResponse { [Newtonsoft.Json.JsonProperty("keyword", Required = Newtonsoft.Json.Required.Always)] [System.ComponentModel.DataAnnotations.Required(AllowEmptyStrings = true)] public string Keyword { get; set; } [Newtonsoft.Json.JsonProperty("pagesCount", Required = Newtonsoft.Json.Required.Always)] public int PagesCount { get; set; } [Newtonsoft.Json.JsonProperty("searchFilmsCountResult", Required = Newtonsoft.Json.Required.Always)] public int SearchFilmsCountResult { get; set; } [Newtonsoft.Json.JsonProperty("films", Required = Newtonsoft.Json.Required.Always)] [System.ComponentModel.DataAnnotations.Required] public System.Collections.Generic.ICollection Films { get; set; } = new System.Collections.ObjectModel.Collection(); private System.Collections.Generic.IDictionary _additionalProperties = new System.Collections.Generic.Dictionary(); [Newtonsoft.Json.JsonExtensionData] public System.Collections.Generic.IDictionary AdditionalProperties { get { return _additionalProperties; } set { _additionalProperties = value; } } } [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "10.4.3.0 (Newtonsoft.Json v12.0.0.0)")] public partial class FilmSearchByFiltersResponse { [Newtonsoft.Json.JsonProperty("pagesCount", Required = Newtonsoft.Json.Required.Always)] public int PagesCount { get; set; } [Newtonsoft.Json.JsonProperty("films", Required = Newtonsoft.Json.Required.Always)] [System.ComponentModel.DataAnnotations.Required] public System.Collections.Generic.ICollection Films { get; set; } = new System.Collections.ObjectModel.Collection(); private System.Collections.Generic.IDictionary _additionalProperties = new System.Collections.Generic.Dictionary(); [Newtonsoft.Json.JsonExtensionData] public System.Collections.Generic.IDictionary AdditionalProperties { get { return _additionalProperties; } set { _additionalProperties = value; } } } [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "10.4.3.0 (Newtonsoft.Json v12.0.0.0)")] public partial class FilmSequelsAndPrequelsResponse { [Newtonsoft.Json.JsonProperty("filmId", Required = Newtonsoft.Json.Required.Always)] public int FilmId { get; set; } [Newtonsoft.Json.JsonProperty("nameRu", Required = Newtonsoft.Json.Required.Always)] [System.ComponentModel.DataAnnotations.Required(AllowEmptyStrings = true)] public string NameRu { get; set; } [Newtonsoft.Json.JsonProperty("nameEn", Required = Newtonsoft.Json.Required.Always)] [System.ComponentModel.DataAnnotations.Required(AllowEmptyStrings = true)] public string NameEn { get; set; } [Newtonsoft.Json.JsonProperty("nameOriginal", Required = Newtonsoft.Json.Required.Always)] [System.ComponentModel.DataAnnotations.Required(AllowEmptyStrings = true)] public string NameOriginal { get; set; } [Newtonsoft.Json.JsonProperty("posterUrl", Required = Newtonsoft.Json.Required.Always)] [System.ComponentModel.DataAnnotations.Required(AllowEmptyStrings = true)] public string PosterUrl { get; set; } [Newtonsoft.Json.JsonProperty("posterUrlPreview", Required = Newtonsoft.Json.Required.Always)] [System.ComponentModel.DataAnnotations.Required(AllowEmptyStrings = true)] public string PosterUrlPreview { get; set; } [Newtonsoft.Json.JsonProperty("relationType", Required = Newtonsoft.Json.Required.Always)] [System.ComponentModel.DataAnnotations.Required(AllowEmptyStrings = true)] [Newtonsoft.Json.JsonConverter(typeof(Newtonsoft.Json.Converters.StringEnumConverter))] public FilmSequelsAndPrequelsResponseRelationType RelationType { get; set; } private System.Collections.Generic.IDictionary _additionalProperties = new System.Collections.Generic.Dictionary(); [Newtonsoft.Json.JsonExtensionData] public System.Collections.Generic.IDictionary AdditionalProperties { get { return _additionalProperties; } set { _additionalProperties = value; } } } [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "10.4.3.0 (Newtonsoft.Json v12.0.0.0)")] public partial class RelatedFilmResponse { [Newtonsoft.Json.JsonProperty("total", Required = Newtonsoft.Json.Required.Always)] public int Total { get; set; } [Newtonsoft.Json.JsonProperty("items", Required = Newtonsoft.Json.Required.Always)] [System.ComponentModel.DataAnnotations.Required] public System.Collections.Generic.ICollection Items { get; set; } = new System.Collections.ObjectModel.Collection(); private System.Collections.Generic.IDictionary _additionalProperties = new System.Collections.Generic.Dictionary(); [Newtonsoft.Json.JsonExtensionData] public System.Collections.Generic.IDictionary AdditionalProperties { get { return _additionalProperties; } set { _additionalProperties = value; } } } [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "10.4.3.0 (Newtonsoft.Json v12.0.0.0)")] public partial class FilmTopResponse { [Newtonsoft.Json.JsonProperty("pagesCount", Required = Newtonsoft.Json.Required.Always)] public int PagesCount { get; set; } [Newtonsoft.Json.JsonProperty("films", Required = Newtonsoft.Json.Required.Always)] [System.ComponentModel.DataAnnotations.Required] public System.Collections.Generic.ICollection Films { get; set; } = new System.Collections.ObjectModel.Collection(); private System.Collections.Generic.IDictionary _additionalProperties = new System.Collections.Generic.Dictionary(); [Newtonsoft.Json.JsonExtensionData] public System.Collections.Generic.IDictionary AdditionalProperties { get { return _additionalProperties; } set { _additionalProperties = value; } } } [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "10.4.3.0 (Newtonsoft.Json v12.0.0.0)")] public partial class ReviewsResponse { [Newtonsoft.Json.JsonProperty("page", Required = Newtonsoft.Json.Required.Always)] public int Page { get; set; } [Newtonsoft.Json.JsonProperty("filmId", Required = Newtonsoft.Json.Required.Always)] public int FilmId { get; set; } [Newtonsoft.Json.JsonProperty("reviewAllCount", Required = Newtonsoft.Json.Required.Always)] public int ReviewAllCount { get; set; } [Newtonsoft.Json.JsonProperty("reviewAllPositiveRatio", Required = Newtonsoft.Json.Required.Always)] [System.ComponentModel.DataAnnotations.Required(AllowEmptyStrings = true)] public string ReviewAllPositiveRatio { get; set; } [Newtonsoft.Json.JsonProperty("reviewPositiveCount", Required = Newtonsoft.Json.Required.Always)] public int ReviewPositiveCount { get; set; } [Newtonsoft.Json.JsonProperty("reviewNegativeCount", Required = Newtonsoft.Json.Required.Always)] public int ReviewNegativeCount { get; set; } [Newtonsoft.Json.JsonProperty("reviewNeutralCount", Required = Newtonsoft.Json.Required.Always)] public int ReviewNeutralCount { get; set; } [Newtonsoft.Json.JsonProperty("pagesCount", Required = Newtonsoft.Json.Required.Always)] public int PagesCount { get; set; } [Newtonsoft.Json.JsonProperty("reviews", Required = Newtonsoft.Json.Required.Always)] [System.ComponentModel.DataAnnotations.Required] public System.Collections.Generic.ICollection Reviews { get; set; } = new System.Collections.ObjectModel.Collection(); private System.Collections.Generic.IDictionary _additionalProperties = new System.Collections.Generic.Dictionary(); [Newtonsoft.Json.JsonExtensionData] public System.Collections.Generic.IDictionary AdditionalProperties { get { return _additionalProperties; } set { _additionalProperties = value; } } } [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "10.4.3.0 (Newtonsoft.Json v12.0.0.0)")] public partial class ReviewDetailsResponse { [Newtonsoft.Json.JsonProperty("reviewId", Required = Newtonsoft.Json.Required.Always)] public int ReviewId { get; set; } [Newtonsoft.Json.JsonProperty("reviewType", Required = Newtonsoft.Json.Required.Always)] [System.ComponentModel.DataAnnotations.Required(AllowEmptyStrings = true)] [Newtonsoft.Json.JsonConverter(typeof(Newtonsoft.Json.Converters.StringEnumConverter))] public ReviewDetailsResponseReviewType ReviewType { get; set; } [Newtonsoft.Json.JsonProperty("reviewData", Required = Newtonsoft.Json.Required.Always)] [System.ComponentModel.DataAnnotations.Required(AllowEmptyStrings = true)] public string ReviewData { get; set; } [Newtonsoft.Json.JsonProperty("userPositiveRating", Required = Newtonsoft.Json.Required.Always)] public int UserPositiveRating { get; set; } [Newtonsoft.Json.JsonProperty("userNegativeRating", Required = Newtonsoft.Json.Required.Always)] public int UserNegativeRating { get; set; } [Newtonsoft.Json.JsonProperty("reviewAutor", Required = Newtonsoft.Json.Required.Always)] [System.ComponentModel.DataAnnotations.Required(AllowEmptyStrings = true)] public string ReviewAutor { get; set; } [Newtonsoft.Json.JsonProperty("reviewTitle", Required = Newtonsoft.Json.Required.Always)] [System.ComponentModel.DataAnnotations.Required(AllowEmptyStrings = true)] public string ReviewTitle { get; set; } [Newtonsoft.Json.JsonProperty("reviewDescription", Required = Newtonsoft.Json.Required.Always)] public double ReviewDescription { get; set; } private System.Collections.Generic.IDictionary _additionalProperties = new System.Collections.Generic.Dictionary(); [Newtonsoft.Json.JsonExtensionData] public System.Collections.Generic.IDictionary AdditionalProperties { get { return _additionalProperties; } set { _additionalProperties = value; } } } [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "10.4.3.0 (Newtonsoft.Json v12.0.0.0)")] public partial class StaffResponse { [Newtonsoft.Json.JsonProperty("staffId", Required = Newtonsoft.Json.Required.Always)] public int StaffId { get; set; } [Newtonsoft.Json.JsonProperty("nameRu", Required = Newtonsoft.Json.Required.Always)] [System.ComponentModel.DataAnnotations.Required(AllowEmptyStrings = true)] public string NameRu { get; set; } [Newtonsoft.Json.JsonProperty("nameEn", Required = Newtonsoft.Json.Required.Always)] [System.ComponentModel.DataAnnotations.Required(AllowEmptyStrings = true)] public string NameEn { get; set; } [Newtonsoft.Json.JsonProperty("posterUrl", Required = Newtonsoft.Json.Required.Always)] [System.ComponentModel.DataAnnotations.Required(AllowEmptyStrings = true)] public string PosterUrl { get; set; } [Newtonsoft.Json.JsonProperty("professionText", Required = Newtonsoft.Json.Required.Always)] [System.ComponentModel.DataAnnotations.Required(AllowEmptyStrings = true)] public string ProfessionText { get; set; } [Newtonsoft.Json.JsonProperty("professionKey", Required = Newtonsoft.Json.Required.Always)] [System.ComponentModel.DataAnnotations.Required(AllowEmptyStrings = true)] [Newtonsoft.Json.JsonConverter(typeof(Newtonsoft.Json.Converters.StringEnumConverter))] public StaffResponseProfessionKey ProfessionKey { get; set; } private System.Collections.Generic.IDictionary _additionalProperties = new System.Collections.Generic.Dictionary(); [Newtonsoft.Json.JsonExtensionData] public System.Collections.Generic.IDictionary AdditionalProperties { get { return _additionalProperties; } set { _additionalProperties = value; } } } [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "10.4.3.0 (Newtonsoft.Json v12.0.0.0)")] public partial class PersonResponse { [Newtonsoft.Json.JsonProperty("personId", Required = Newtonsoft.Json.Required.Always)] public int PersonId { get; set; } [Newtonsoft.Json.JsonProperty("webUrl", Required = Newtonsoft.Json.Required.Always)] [System.ComponentModel.DataAnnotations.Required(AllowEmptyStrings = true)] public string WebUrl { get; set; } [Newtonsoft.Json.JsonProperty("nameRu", Required = Newtonsoft.Json.Required.Always)] [System.ComponentModel.DataAnnotations.Required(AllowEmptyStrings = true)] public string NameRu { get; set; } [Newtonsoft.Json.JsonProperty("nameEn", Required = Newtonsoft.Json.Required.Always)] [System.ComponentModel.DataAnnotations.Required(AllowEmptyStrings = true)] public string NameEn { get; set; } [Newtonsoft.Json.JsonProperty("sex", Required = Newtonsoft.Json.Required.Always)] [System.ComponentModel.DataAnnotations.Required(AllowEmptyStrings = true)] [Newtonsoft.Json.JsonConverter(typeof(Newtonsoft.Json.Converters.StringEnumConverter))] public PersonResponseSex Sex { get; set; } [Newtonsoft.Json.JsonProperty("posterUrl", Required = Newtonsoft.Json.Required.Always)] [System.ComponentModel.DataAnnotations.Required(AllowEmptyStrings = true)] public string PosterUrl { get; set; } [Newtonsoft.Json.JsonProperty("growth", Required = Newtonsoft.Json.Required.Always)] [System.ComponentModel.DataAnnotations.Required(AllowEmptyStrings = true)] public string Growth { get; set; } [Newtonsoft.Json.JsonProperty("birthday", Required = Newtonsoft.Json.Required.Always)] [System.ComponentModel.DataAnnotations.Required(AllowEmptyStrings = true)] public string Birthday { get; set; } [Newtonsoft.Json.JsonProperty("death", Required = Newtonsoft.Json.Required.Always)] [System.ComponentModel.DataAnnotations.Required(AllowEmptyStrings = true)] public string Death { get; set; } [Newtonsoft.Json.JsonProperty("age", Required = Newtonsoft.Json.Required.Always)] public int Age { get; set; } [Newtonsoft.Json.JsonProperty("birthplace", Required = Newtonsoft.Json.Required.Always)] [System.ComponentModel.DataAnnotations.Required(AllowEmptyStrings = true)] public string Birthplace { get; set; } [Newtonsoft.Json.JsonProperty("deathplace", Required = Newtonsoft.Json.Required.Always)] [System.ComponentModel.DataAnnotations.Required(AllowEmptyStrings = true)] public string Deathplace { get; set; } [Newtonsoft.Json.JsonProperty("hasAwards", Required = Newtonsoft.Json.Required.Always)] public int HasAwards { get; set; } [Newtonsoft.Json.JsonProperty("profession", Required = Newtonsoft.Json.Required.Always)] [System.ComponentModel.DataAnnotations.Required(AllowEmptyStrings = true)] public string Profession { get; set; } [Newtonsoft.Json.JsonProperty("facts", Required = Newtonsoft.Json.Required.Always)] [System.ComponentModel.DataAnnotations.Required] public System.Collections.Generic.ICollection Facts { get; set; } = new System.Collections.ObjectModel.Collection(); [Newtonsoft.Json.JsonProperty("spouses", Required = Newtonsoft.Json.Required.Always)] [System.ComponentModel.DataAnnotations.Required] public System.Collections.Generic.ICollection Spouses { get; set; } = new System.Collections.ObjectModel.Collection(); [Newtonsoft.Json.JsonProperty("films", Required = Newtonsoft.Json.Required.Always)] [System.ComponentModel.DataAnnotations.Required] public System.Collections.Generic.ICollection Films { get; set; } = new System.Collections.ObjectModel.Collection(); private System.Collections.Generic.IDictionary _additionalProperties = new System.Collections.Generic.Dictionary(); [Newtonsoft.Json.JsonExtensionData] public System.Collections.Generic.IDictionary AdditionalProperties { get { return _additionalProperties; } set { _additionalProperties = value; } } } [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "10.4.3.0 (Newtonsoft.Json v12.0.0.0)")] public partial class FilmFrameResponse { [Newtonsoft.Json.JsonProperty("frames", Required = Newtonsoft.Json.Required.Always)] [System.ComponentModel.DataAnnotations.Required] public System.Collections.Generic.ICollection Frames { get; set; } = new System.Collections.ObjectModel.Collection(); private System.Collections.Generic.IDictionary _additionalProperties = new System.Collections.Generic.Dictionary(); [Newtonsoft.Json.JsonExtensionData] public System.Collections.Generic.IDictionary AdditionalProperties { get { return _additionalProperties; } set { _additionalProperties = value; } } } [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "10.4.3.0 (Newtonsoft.Json v12.0.0.0)")] public partial class DigitalReleaseResponse { [Newtonsoft.Json.JsonProperty("page", Required = Newtonsoft.Json.Required.Always)] public int Page { get; set; } [Newtonsoft.Json.JsonProperty("total", Required = Newtonsoft.Json.Required.Always)] public int Total { get; set; } [Newtonsoft.Json.JsonProperty("releases", Required = Newtonsoft.Json.Required.Always)] [System.ComponentModel.DataAnnotations.Required] public System.Collections.Generic.ICollection Releases { get; set; } = new System.Collections.ObjectModel.Collection(); private System.Collections.Generic.IDictionary _additionalProperties = new System.Collections.Generic.Dictionary(); [Newtonsoft.Json.JsonExtensionData] public System.Collections.Generic.IDictionary AdditionalProperties { get { return _additionalProperties; } set { _additionalProperties = value; } } } [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "10.4.3.0 (Newtonsoft.Json v12.0.0.0)")] public partial class DigitalReleaseItem { [Newtonsoft.Json.JsonProperty("filmId", Required = Newtonsoft.Json.Required.Always)] public int FilmId { get; set; } [Newtonsoft.Json.JsonProperty("nameRu", Required = Newtonsoft.Json.Required.Always)] [System.ComponentModel.DataAnnotations.Required(AllowEmptyStrings = true)] public string NameRu { get; set; } [Newtonsoft.Json.JsonProperty("nameEn", Required = Newtonsoft.Json.Required.Always)] [System.ComponentModel.DataAnnotations.Required(AllowEmptyStrings = true)] public string NameEn { get; set; } [Newtonsoft.Json.JsonProperty("year", Required = Newtonsoft.Json.Required.Always)] public int Year { get; set; } [Newtonsoft.Json.JsonProperty("posterUrl", Required = Newtonsoft.Json.Required.Always)] [System.ComponentModel.DataAnnotations.Required(AllowEmptyStrings = true)] public string PosterUrl { get; set; } [Newtonsoft.Json.JsonProperty("posterUrlPreview", Required = Newtonsoft.Json.Required.Always)] [System.ComponentModel.DataAnnotations.Required(AllowEmptyStrings = true)] public string PosterUrlPreview { get; set; } [Newtonsoft.Json.JsonProperty("countries", Required = Newtonsoft.Json.Required.Always)] [System.ComponentModel.DataAnnotations.Required] public System.Collections.Generic.ICollection Countries { get; set; } = new System.Collections.ObjectModel.Collection(); [Newtonsoft.Json.JsonProperty("genres", Required = Newtonsoft.Json.Required.Always)] [System.ComponentModel.DataAnnotations.Required] public System.Collections.Generic.ICollection Genres { get; set; } = new System.Collections.ObjectModel.Collection(); [Newtonsoft.Json.JsonProperty("rating", Required = Newtonsoft.Json.Required.Always)] public double Rating { get; set; } [Newtonsoft.Json.JsonProperty("ratingVoteCount", Required = Newtonsoft.Json.Required.Always)] public int RatingVoteCount { get; set; } [Newtonsoft.Json.JsonProperty("expectationsRating", Required = Newtonsoft.Json.Required.Always)] public double ExpectationsRating { get; set; } [Newtonsoft.Json.JsonProperty("expectationsRatingVoteCount", Required = Newtonsoft.Json.Required.Always)] public int ExpectationsRatingVoteCount { get; set; } [Newtonsoft.Json.JsonProperty("duration", Required = Newtonsoft.Json.Required.Always)] public int Duration { get; set; } [Newtonsoft.Json.JsonProperty("releaseDate", Required = Newtonsoft.Json.Required.Always)] [System.ComponentModel.DataAnnotations.Required(AllowEmptyStrings = true)] public string ReleaseDate { get; set; } private System.Collections.Generic.IDictionary _additionalProperties = new System.Collections.Generic.Dictionary(); [Newtonsoft.Json.JsonExtensionData] public System.Collections.Generic.IDictionary AdditionalProperties { get { return _additionalProperties; } set { _additionalProperties = value; } } } [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "10.4.3.0 (Newtonsoft.Json v12.0.0.0)")] public partial class VideoResponse { [Newtonsoft.Json.JsonProperty("total", Required = Newtonsoft.Json.Required.Always)] public int Total { get; set; } [Newtonsoft.Json.JsonProperty("items", Required = Newtonsoft.Json.Required.Always)] [System.ComponentModel.DataAnnotations.Required] public System.Collections.Generic.ICollection Items { get; set; } = new System.Collections.ObjectModel.Collection(); private System.Collections.Generic.IDictionary _additionalProperties = new System.Collections.Generic.Dictionary(); [Newtonsoft.Json.JsonExtensionData] public System.Collections.Generic.IDictionary AdditionalProperties { get { return _additionalProperties; } set { _additionalProperties = value; } } } [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "10.4.3.0 (Newtonsoft.Json v12.0.0.0)")] public partial class FiltersResponse_genres { [Newtonsoft.Json.JsonProperty("id", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] public int Id { get; set; } [Newtonsoft.Json.JsonProperty("genre", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] public string Genre { get; set; } private System.Collections.Generic.IDictionary _additionalProperties = new System.Collections.Generic.Dictionary(); [Newtonsoft.Json.JsonExtensionData] public System.Collections.Generic.IDictionary AdditionalProperties { get { return _additionalProperties; } set { _additionalProperties = value; } } } [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "10.4.3.0 (Newtonsoft.Json v12.0.0.0)")] public partial class FiltersResponse_countries { [Newtonsoft.Json.JsonProperty("id", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] public int Id { get; set; } [Newtonsoft.Json.JsonProperty("country", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] public string Country { get; set; } private System.Collections.Generic.IDictionary _additionalProperties = new System.Collections.Generic.Dictionary(); [Newtonsoft.Json.JsonExtensionData] public System.Collections.Generic.IDictionary AdditionalProperties { get { return _additionalProperties; } set { _additionalProperties = value; } } } [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "10.4.3.0 (Newtonsoft.Json v12.0.0.0)")] public partial class FilmSearchResponse_films { [Newtonsoft.Json.JsonProperty("filmId", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] public int FilmId { get; set; } [Newtonsoft.Json.JsonProperty("nameRu", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] public string NameRu { get; set; } [Newtonsoft.Json.JsonProperty("nameEn", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] public string NameEn { get; set; } [Newtonsoft.Json.JsonProperty("type", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] [Newtonsoft.Json.JsonConverter(typeof(Newtonsoft.Json.Converters.StringEnumConverter))] public FilmSearchResponse_filmsType Type { get; set; } [Newtonsoft.Json.JsonProperty("year", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] public string Year { get; set; } [Newtonsoft.Json.JsonProperty("description", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] public string Description { get; set; } [Newtonsoft.Json.JsonProperty("filmLength", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] public string FilmLength { get; set; } [Newtonsoft.Json.JsonProperty("countries", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] public System.Collections.Generic.ICollection Countries { get; set; } [Newtonsoft.Json.JsonProperty("genres", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] public System.Collections.Generic.ICollection Genres { get; set; } [Newtonsoft.Json.JsonProperty("rating", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] public string Rating { get; set; } [Newtonsoft.Json.JsonProperty("ratingVoteCount", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] public int RatingVoteCount { get; set; } [Newtonsoft.Json.JsonProperty("posterUrl", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] public string PosterUrl { get; set; } [Newtonsoft.Json.JsonProperty("posterUrlPreview", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] public string PosterUrlPreview { get; set; } private System.Collections.Generic.IDictionary _additionalProperties = new System.Collections.Generic.Dictionary(); [Newtonsoft.Json.JsonExtensionData] public System.Collections.Generic.IDictionary AdditionalProperties { get { return _additionalProperties; } set { _additionalProperties = value; } } } [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "10.4.3.0 (Newtonsoft.Json v12.0.0.0)")] public partial class RelatedFilmResponse_items { [Newtonsoft.Json.JsonProperty("filmId", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] public int FilmId { get; set; } [Newtonsoft.Json.JsonProperty("nameRu", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] public string NameRu { get; set; } [Newtonsoft.Json.JsonProperty("nameEn", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] public string NameEn { get; set; } [Newtonsoft.Json.JsonProperty("nameOriginal", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] public string NameOriginal { get; set; } [Newtonsoft.Json.JsonProperty("posterUrl", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] public string PosterUrl { get; set; } [Newtonsoft.Json.JsonProperty("posterUrlPreview", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] public string PosterUrlPreview { get; set; } [Newtonsoft.Json.JsonProperty("relationType", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] [Newtonsoft.Json.JsonConverter(typeof(Newtonsoft.Json.Converters.StringEnumConverter))] public RelatedFilmResponse_itemsRelationType RelationType { get; set; } private System.Collections.Generic.IDictionary _additionalProperties = new System.Collections.Generic.Dictionary(); [Newtonsoft.Json.JsonExtensionData] public System.Collections.Generic.IDictionary AdditionalProperties { get { return _additionalProperties; } set { _additionalProperties = value; } } } [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "10.4.3.0 (Newtonsoft.Json v12.0.0.0)")] public partial class FilmTopResponse_films { [Newtonsoft.Json.JsonProperty("filmId", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] public int FilmId { get; set; } [Newtonsoft.Json.JsonProperty("nameRu", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] public string NameRu { get; set; } [Newtonsoft.Json.JsonProperty("nameEn", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] public string NameEn { get; set; } [Newtonsoft.Json.JsonProperty("year", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] public string Year { get; set; } [Newtonsoft.Json.JsonProperty("filmLength", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] public string FilmLength { get; set; } [Newtonsoft.Json.JsonProperty("countries", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] public System.Collections.Generic.ICollection Countries { get; set; } [Newtonsoft.Json.JsonProperty("genres", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] public System.Collections.Generic.ICollection Genres { get; set; } [Newtonsoft.Json.JsonProperty("rating", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] public double Rating { get; set; } [Newtonsoft.Json.JsonProperty("ratingVoteCount", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] public int RatingVoteCount { get; set; } [Newtonsoft.Json.JsonProperty("posterUrl", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] public string PosterUrl { get; set; } [Newtonsoft.Json.JsonProperty("posterUrlPreview", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] public string PosterUrlPreview { get; set; } private System.Collections.Generic.IDictionary _additionalProperties = new System.Collections.Generic.Dictionary(); [Newtonsoft.Json.JsonExtensionData] public System.Collections.Generic.IDictionary AdditionalProperties { get { return _additionalProperties; } set { _additionalProperties = value; } } } [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "10.4.3.0 (Newtonsoft.Json v12.0.0.0)")] public partial class ReviewsResponse_reviews { [Newtonsoft.Json.JsonProperty("reviewId", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] public int ReviewId { get; set; } [Newtonsoft.Json.JsonProperty("reviewType", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] [Newtonsoft.Json.JsonConverter(typeof(Newtonsoft.Json.Converters.StringEnumConverter))] public ReviewsResponse_reviewsReviewType ReviewType { get; set; } [Newtonsoft.Json.JsonProperty("reviewData", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] public string ReviewData { get; set; } [Newtonsoft.Json.JsonProperty("userPositiveRating", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] public string UserPositiveRating { get; set; } [Newtonsoft.Json.JsonProperty("userNegativeRating", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] public string UserNegativeRating { get; set; } [Newtonsoft.Json.JsonProperty("reviewAutor", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] public string ReviewAutor { get; set; } [Newtonsoft.Json.JsonProperty("reviewTitle", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] public string ReviewTitle { get; set; } [Newtonsoft.Json.JsonProperty("reviewDescription", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] public double ReviewDescription { get; set; } private System.Collections.Generic.IDictionary _additionalProperties = new System.Collections.Generic.Dictionary(); [Newtonsoft.Json.JsonExtensionData] public System.Collections.Generic.IDictionary AdditionalProperties { get { return _additionalProperties; } set { _additionalProperties = value; } } } [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "10.4.3.0 (Newtonsoft.Json v12.0.0.0)")] public partial class PersonResponse_spouses { [Newtonsoft.Json.JsonProperty("personId", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] public int PersonId { get; set; } [Newtonsoft.Json.JsonProperty("name", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] public string Name { get; set; } [Newtonsoft.Json.JsonProperty("divorced", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] public bool Divorced { get; set; } [Newtonsoft.Json.JsonProperty("divorcedReason", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] public string DivorcedReason { get; set; } [Newtonsoft.Json.JsonProperty("sex", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] [Newtonsoft.Json.JsonConverter(typeof(Newtonsoft.Json.Converters.StringEnumConverter))] public PersonResponse_spousesSex Sex { get; set; } [Newtonsoft.Json.JsonProperty("children", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] public int Children { get; set; } [Newtonsoft.Json.JsonProperty("webUrl", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] public string WebUrl { get; set; } [Newtonsoft.Json.JsonProperty("relation", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] public string Relation { get; set; } private System.Collections.Generic.IDictionary _additionalProperties = new System.Collections.Generic.Dictionary(); [Newtonsoft.Json.JsonExtensionData] public System.Collections.Generic.IDictionary AdditionalProperties { get { return _additionalProperties; } set { _additionalProperties = value; } } } [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "10.4.3.0 (Newtonsoft.Json v12.0.0.0)")] public partial class PersonResponse_films { [Newtonsoft.Json.JsonProperty("filmId", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] public int FilmId { get; set; } [Newtonsoft.Json.JsonProperty("nameRu", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] public string NameRu { get; set; } [Newtonsoft.Json.JsonProperty("nameEn", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] public string NameEn { get; set; } [Newtonsoft.Json.JsonProperty("rating", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] public string Rating { get; set; } [Newtonsoft.Json.JsonProperty("general", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] public bool General { get; set; } [Newtonsoft.Json.JsonProperty("description", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] public string Description { get; set; } [Newtonsoft.Json.JsonProperty("professionKey", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] [Newtonsoft.Json.JsonConverter(typeof(Newtonsoft.Json.Converters.StringEnumConverter))] public PersonResponse_filmsProfessionKey ProfessionKey { get; set; } private System.Collections.Generic.IDictionary _additionalProperties = new System.Collections.Generic.Dictionary(); [Newtonsoft.Json.JsonExtensionData] public System.Collections.Generic.IDictionary AdditionalProperties { get { return _additionalProperties; } set { _additionalProperties = value; } } } [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "10.4.3.0 (Newtonsoft.Json v12.0.0.0)")] public partial class FilmFrameResponse_frames { [Newtonsoft.Json.JsonProperty("image", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] public string Image { get; set; } [Newtonsoft.Json.JsonProperty("preview", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] public string Preview { get; set; } private System.Collections.Generic.IDictionary _additionalProperties = new System.Collections.Generic.Dictionary(); [Newtonsoft.Json.JsonExtensionData] public System.Collections.Generic.IDictionary AdditionalProperties { get { return _additionalProperties; } set { _additionalProperties = value; } } } [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "10.4.3.0 (Newtonsoft.Json v12.0.0.0)")] public partial class VideoResponse_items { [Newtonsoft.Json.JsonProperty("url", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] public string Url { get; set; } [Newtonsoft.Json.JsonProperty("name", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] public string Name { get; set; } [Newtonsoft.Json.JsonProperty("site", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] [Newtonsoft.Json.JsonConverter(typeof(Newtonsoft.Json.Converters.StringEnumConverter))] public VideoResponse_itemsSite Site { get; set; } private System.Collections.Generic.IDictionary _additionalProperties = new System.Collections.Generic.Dictionary(); [Newtonsoft.Json.JsonExtensionData] public System.Collections.Generic.IDictionary AdditionalProperties { get { return _additionalProperties; } set { _additionalProperties = value; } } } [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "10.4.3.0 (Newtonsoft.Json v12.0.0.0)")] public enum Order { [System.Runtime.Serialization.EnumMember(Value = @"RATING")] RATING = 0, [System.Runtime.Serialization.EnumMember(Value = @"NUM_VOTE")] NUM_VOTE = 1, [System.Runtime.Serialization.EnumMember(Value = @"YEAR")] YEAR = 2, } [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "10.4.3.0 (Newtonsoft.Json v12.0.0.0)")] public enum Type { [System.Runtime.Serialization.EnumMember(Value = @"FILM")] FILM = 0, [System.Runtime.Serialization.EnumMember(Value = @"TV_SHOW")] TV_SHOW = 1, [System.Runtime.Serialization.EnumMember(Value = @"ALL")] ALL = 2, } [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "10.4.3.0 (Newtonsoft.Json v12.0.0.0)")] public enum Type2 { [System.Runtime.Serialization.EnumMember(Value = @"TOP_250_BEST_FILMS")] TOP_250_BEST_FILMS = 0, [System.Runtime.Serialization.EnumMember(Value = @"TOP_100_POPULAR_FILMS")] TOP_100_POPULAR_FILMS = 1, [System.Runtime.Serialization.EnumMember(Value = @"TOP_AWAIT_FILMS")] TOP_AWAIT_FILMS = 2, } [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "10.4.3.0 (Newtonsoft.Json v12.0.0.0)")] public enum Month { [System.Runtime.Serialization.EnumMember(Value = @"JANUARY")] JANUARY = 0, [System.Runtime.Serialization.EnumMember(Value = @"FEBRUARY")] FEBRUARY = 1, [System.Runtime.Serialization.EnumMember(Value = @"MARCH")] MARCH = 2, [System.Runtime.Serialization.EnumMember(Value = @"APRIL")] APRIL = 3, [System.Runtime.Serialization.EnumMember(Value = @"MAY")] MAY = 4, [System.Runtime.Serialization.EnumMember(Value = @"JUNE")] JUNE = 5, [System.Runtime.Serialization.EnumMember(Value = @"JULY")] JULY = 6, [System.Runtime.Serialization.EnumMember(Value = @"AUGUST")] AUGUST = 7, [System.Runtime.Serialization.EnumMember(Value = @"SEPTEMBER")] SEPTEMBER = 8, [System.Runtime.Serialization.EnumMember(Value = @"OCTOBER")] OCTOBER = 9, [System.Runtime.Serialization.EnumMember(Value = @"NOVEMBER")] NOVEMBER = 10, [System.Runtime.Serialization.EnumMember(Value = @"DECEMBER")] DECEMBER = 11, } [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "10.4.3.0 (Newtonsoft.Json v12.0.0.0)")] public enum FilmProductionStatus { [System.Runtime.Serialization.EnumMember(Value = @"FILMING")] FILMING = 0, [System.Runtime.Serialization.EnumMember(Value = @"PRE_PRODUCTION")] PRE_PRODUCTION = 1, [System.Runtime.Serialization.EnumMember(Value = @"COMPLETED")] COMPLETED = 2, [System.Runtime.Serialization.EnumMember(Value = @"ANNOUNCED")] ANNOUNCED = 3, [System.Runtime.Serialization.EnumMember(Value = @"UNKNOWN")] UNKNOWN = 4, [System.Runtime.Serialization.EnumMember(Value = @"POST_PRODUCTION")] POST_PRODUCTION = 5, } [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "10.4.3.0 (Newtonsoft.Json v12.0.0.0)")] public enum FilmType { [System.Runtime.Serialization.EnumMember(Value = @"FILM")] FILM = 0, [System.Runtime.Serialization.EnumMember(Value = @"VIDEO")] VIDEO = 1, [System.Runtime.Serialization.EnumMember(Value = @"TV_SERIES")] TV_SERIES = 2, [System.Runtime.Serialization.EnumMember(Value = @"MINI_SERIES")] MINI_SERIES = 3, [System.Runtime.Serialization.EnumMember(Value = @"TV_SHOW")] TV_SHOW = 4, } [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "10.4.3.0 (Newtonsoft.Json v12.0.0.0)")] public enum FactType { [System.Runtime.Serialization.EnumMember(Value = @"FACT")] FACT = 0, [System.Runtime.Serialization.EnumMember(Value = @"BLOOPER")] BLOOPER = 1, } [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "10.4.3.0 (Newtonsoft.Json v12.0.0.0)")] public enum DistributionType { [System.Runtime.Serialization.EnumMember(Value = @"LOCAL")] LOCAL = 0, [System.Runtime.Serialization.EnumMember(Value = @"COUNTRY_SPECIFIC")] COUNTRY_SPECIFIC = 1, [System.Runtime.Serialization.EnumMember(Value = @"PREMIERE")] PREMIERE = 2, [System.Runtime.Serialization.EnumMember(Value = @"ALL")] ALL = 3, [System.Runtime.Serialization.EnumMember(Value = @"WORLD_PREMIER")] WORLD_PREMIER = 4, } [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "10.4.3.0 (Newtonsoft.Json v12.0.0.0)")] public enum DistributionSubType { [System.Runtime.Serialization.EnumMember(Value = @"CINEMA")] CINEMA = 0, [System.Runtime.Serialization.EnumMember(Value = @"DVD")] DVD = 1, [System.Runtime.Serialization.EnumMember(Value = @"DIGITAL")] DIGITAL = 2, [System.Runtime.Serialization.EnumMember(Value = @"BLURAY")] BLURAY = 3, } [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "10.4.3.0 (Newtonsoft.Json v12.0.0.0)")] public enum FilmSequelsAndPrequelsResponseRelationType { [System.Runtime.Serialization.EnumMember(Value = @"SEQUEL")] SEQUEL = 0, [System.Runtime.Serialization.EnumMember(Value = @"PREQUEL")] PREQUEL = 1, [System.Runtime.Serialization.EnumMember(Value = @"REMAKE")] REMAKE = 2, [System.Runtime.Serialization.EnumMember(Value = @"UNKNOWN")] UNKNOWN = 3, } [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "10.4.3.0 (Newtonsoft.Json v12.0.0.0)")] public enum ReviewDetailsResponseReviewType { [System.Runtime.Serialization.EnumMember(Value = @"POSITIVE")] POSITIVE = 0, [System.Runtime.Serialization.EnumMember(Value = @"NEGATIVE")] NEGATIVE = 1, [System.Runtime.Serialization.EnumMember(Value = @"NEUTRAL")] NEUTRAL = 2, [System.Runtime.Serialization.EnumMember(Value = @"UNKNOWN")] UNKNOWN = 3, } [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "10.4.3.0 (Newtonsoft.Json v12.0.0.0)")] public enum StaffResponseProfessionKey { [System.Runtime.Serialization.EnumMember(Value = @"WRITER")] WRITER = 0, [System.Runtime.Serialization.EnumMember(Value = @"OPERATOR")] OPERATOR = 1, [System.Runtime.Serialization.EnumMember(Value = @"EDITOR")] EDITOR = 2, [System.Runtime.Serialization.EnumMember(Value = @"COMPOSER")] COMPOSER = 3, [System.Runtime.Serialization.EnumMember(Value = @"PRODUCER_USSR")] PRODUCER_USSR = 4, [System.Runtime.Serialization.EnumMember(Value = @"TRANSLATOR")] TRANSLATOR = 5, [System.Runtime.Serialization.EnumMember(Value = @"DIRECTOR")] DIRECTOR = 6, [System.Runtime.Serialization.EnumMember(Value = @"DESIGN")] DESIGN = 7, [System.Runtime.Serialization.EnumMember(Value = @"PRODUCER")] PRODUCER = 8, [System.Runtime.Serialization.EnumMember(Value = @"ACTOR")] ACTOR = 9, [System.Runtime.Serialization.EnumMember(Value = @"VOICE_DIRECTOR")] VOICE_DIRECTOR = 10, [System.Runtime.Serialization.EnumMember(Value = @"UNKNOWN")] UNKNOWN = 11, } [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "10.4.3.0 (Newtonsoft.Json v12.0.0.0)")] public enum PersonResponseSex { [System.Runtime.Serialization.EnumMember(Value = @"MALE")] MALE = 0, [System.Runtime.Serialization.EnumMember(Value = @"FEMALE")] FEMALE = 1, } [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "10.4.3.0 (Newtonsoft.Json v12.0.0.0)")] public enum FilmSearchResponse_filmsType { [System.Runtime.Serialization.EnumMember(Value = @"FILM")] FILM = 0, [System.Runtime.Serialization.EnumMember(Value = @"TV_SHOW")] TV_SHOW = 1, [System.Runtime.Serialization.EnumMember(Value = @"UNKNOWN")] UNKNOWN = 2, } [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "10.4.3.0 (Newtonsoft.Json v12.0.0.0)")] public enum RelatedFilmResponse_itemsRelationType { [System.Runtime.Serialization.EnumMember(Value = @"SIMILAR")] SIMILAR = 0, } [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "10.4.3.0 (Newtonsoft.Json v12.0.0.0)")] public enum ReviewsResponse_reviewsReviewType { [System.Runtime.Serialization.EnumMember(Value = @"POSITIVE")] POSITIVE = 0, [System.Runtime.Serialization.EnumMember(Value = @"NEGATIVE")] NEGATIVE = 1, [System.Runtime.Serialization.EnumMember(Value = @"NEUTRAL")] NEUTRAL = 2, [System.Runtime.Serialization.EnumMember(Value = @"UNKNOWN")] UNKNOWN = 3, } [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "10.4.3.0 (Newtonsoft.Json v12.0.0.0)")] public enum PersonResponse_spousesSex { [System.Runtime.Serialization.EnumMember(Value = @"MALE")] MALE = 0, [System.Runtime.Serialization.EnumMember(Value = @"FEMALE")] FEMALE = 1, } [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "10.4.3.0 (Newtonsoft.Json v12.0.0.0)")] public enum PersonResponse_filmsProfessionKey { [System.Runtime.Serialization.EnumMember(Value = @"WRITER")] WRITER = 0, [System.Runtime.Serialization.EnumMember(Value = @"OPERATOR")] OPERATOR = 1, [System.Runtime.Serialization.EnumMember(Value = @"EDITOR")] EDITOR = 2, [System.Runtime.Serialization.EnumMember(Value = @"COMPOSER")] COMPOSER = 3, [System.Runtime.Serialization.EnumMember(Value = @"PRODUCER_USSR")] PRODUCER_USSR = 4, [System.Runtime.Serialization.EnumMember(Value = @"HIMSELF")] HIMSELF = 5, [System.Runtime.Serialization.EnumMember(Value = @"HERSELF")] HERSELF = 6, [System.Runtime.Serialization.EnumMember(Value = @"HRONO_TITR_MALE")] HRONO_TITR_MALE = 7, [System.Runtime.Serialization.EnumMember(Value = @"HRONO_TITR_FEMALE")] HRONO_TITR_FEMALE = 8, [System.Runtime.Serialization.EnumMember(Value = @"TRANSLATOR")] TRANSLATOR = 9, [System.Runtime.Serialization.EnumMember(Value = @"DIRECTOR")] DIRECTOR = 10, [System.Runtime.Serialization.EnumMember(Value = @"DESIGN")] DESIGN = 11, [System.Runtime.Serialization.EnumMember(Value = @"PRODUCER")] PRODUCER = 12, [System.Runtime.Serialization.EnumMember(Value = @"ACTOR")] ACTOR = 13, [System.Runtime.Serialization.EnumMember(Value = @"VOICE_DIRECTOR")] VOICE_DIRECTOR = 14, [System.Runtime.Serialization.EnumMember(Value = @"UNKNOWN")] UNKNOWN = 15, } [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "10.4.3.0 (Newtonsoft.Json v12.0.0.0)")] public enum VideoResponse_itemsSite { [System.Runtime.Serialization.EnumMember(Value = @"YOUTUBE")] YOUTUBE = 0, [System.Runtime.Serialization.EnumMember(Value = @"KINOPOISK_WIDGET")] KINOPOISK_WIDGET = 1, [System.Runtime.Serialization.EnumMember(Value = @"UNKNOWN")] UNKNOWN = 2, [System.Runtime.Serialization.EnumMember(Value = @"YANDEX_DISK")] YANDEX_DISK = 3, } [System.CodeDom.Compiler.GeneratedCode("NSwag", "13.11.1.0 (NJsonSchema v10.4.3.0 (Newtonsoft.Json v12.0.0.0))")] public partial class ApiException : System.Exception { public int StatusCode { get; private set; } public string Response { get; private set; } public System.Collections.Generic.IReadOnlyDictionary> Headers { get; private set; } public ApiException(string message, int statusCode, string response, System.Collections.Generic.IReadOnlyDictionary> headers, System.Exception innerException) : base(message + "\n\nStatus: " + statusCode + "\nResponse: \n" + ((response == null) ? "(null)" : response.Substring(0, response.Length >= 512 ? 512 : response.Length)), innerException) { StatusCode = statusCode; Response = response; Headers = headers; } public override string ToString() { return string.Format("HTTP Response: \n\n{0}\n\n{1}", Response, base.ToString()); } } [System.CodeDom.Compiler.GeneratedCode("NSwag", "13.11.1.0 (NJsonSchema v10.4.3.0 (Newtonsoft.Json v12.0.0.0))")] public partial class ApiException : ApiException { public TResult Result { get; private set; } public ApiException(string message, int statusCode, string response, System.Collections.Generic.IReadOnlyDictionary> headers, TResult result, System.Exception innerException) : base(message, statusCode, response, headers, innerException) { Result = result; } } } #pragma warning restore 1591 #pragma warning restore 1573 #pragma warning restore 472 #pragma warning restore 114 #pragma warning restore 108