3996 lines
213 KiB
C#
3996 lines
213 KiB
C#
//----------------------
|
|
// <auto-generated>
|
|
// Generated using the NSwag toolchain v13.11.1.0 (NJsonSchema v10.4.3.0 (Newtonsoft.Json v12.0.0.0)) (http://NSwag.org)
|
|
// </auto-generated>
|
|
//----------------------
|
|
|
|
#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<Newtonsoft.Json.JsonSerializerSettings> _settings;
|
|
|
|
public Client(System.Net.Http.HttpClient httpClient)
|
|
{
|
|
_httpClient = httpClient;
|
|
_settings = new System.Lazy<Newtonsoft.Json.JsonSerializerSettings>(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);
|
|
/// <summary>получить данные о фильме по kinopoisk id</summary>
|
|
/// <param name="id">kinopoisk film id</param>
|
|
/// <returns>Запрос выполнен успешно</returns>
|
|
/// <exception cref="ApiException">A server side error occurred.</exception>
|
|
public System.Threading.Tasks.Task<Film> FilmsAsync(int id)
|
|
{
|
|
return FilmsAsync(id, System.Threading.CancellationToken.None);
|
|
}
|
|
|
|
/// <param name="cancellationToken">A cancellation token that can be used by other objects or threads to receive notice of cancellation.</param>
|
|
/// <summary>получить данные о фильме по kinopoisk id</summary>
|
|
/// <param name="id">kinopoisk film id</param>
|
|
/// <returns>Запрос выполнен успешно</returns>
|
|
/// <exception cref="ApiException">A server side error occurred.</exception>
|
|
public async System.Threading.Tasks.Task<Film> 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<Film>(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();
|
|
}
|
|
}
|
|
|
|
/// <summary>получить данные о сезонах для сериала по kinopoisk film id</summary>
|
|
/// <param name="id">kinopoisk film id</param>
|
|
/// <returns>Запрос выполнен успешно</returns>
|
|
/// <exception cref="ApiException">A server side error occurred.</exception>
|
|
public System.Threading.Tasks.Task<SeasonResponse> SeasonsAsync(int id)
|
|
{
|
|
return SeasonsAsync(id, System.Threading.CancellationToken.None);
|
|
}
|
|
|
|
/// <param name="cancellationToken">A cancellation token that can be used by other objects or threads to receive notice of cancellation.</param>
|
|
/// <summary>получить данные о сезонах для сериала по kinopoisk film id</summary>
|
|
/// <param name="id">kinopoisk film id</param>
|
|
/// <returns>Запрос выполнен успешно</returns>
|
|
/// <exception cref="ApiException">A server side error occurred.</exception>
|
|
public async System.Threading.Tasks.Task<SeasonResponse> 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<SeasonResponse>(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();
|
|
}
|
|
}
|
|
|
|
/// <summary>получить данные о фактах и ошибках в фильме по kinopoisk film id</summary>
|
|
/// <param name="id">kinopoisk film id</param>
|
|
/// <returns>Запрос выполнен успешно</returns>
|
|
/// <exception cref="ApiException">A server side error occurred.</exception>
|
|
public System.Threading.Tasks.Task<FactResponse> FactsAsync(int id)
|
|
{
|
|
return FactsAsync(id, System.Threading.CancellationToken.None);
|
|
}
|
|
|
|
/// <param name="cancellationToken">A cancellation token that can be used by other objects or threads to receive notice of cancellation.</param>
|
|
/// <summary>получить данные о фактах и ошибках в фильме по kinopoisk film id</summary>
|
|
/// <param name="id">kinopoisk film id</param>
|
|
/// <returns>Запрос выполнен успешно</returns>
|
|
/// <exception cref="ApiException">A server side error occurred.</exception>
|
|
public async System.Threading.Tasks.Task<FactResponse> 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<FactResponse>(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();
|
|
}
|
|
}
|
|
|
|
/// <summary>получить данные о прокате фильма по kinopoisk film id</summary>
|
|
/// <param name="id">kinopoisk film id</param>
|
|
/// <returns>Запрос выполнен успешно</returns>
|
|
/// <exception cref="ApiException">A server side error occurred.</exception>
|
|
public System.Threading.Tasks.Task<DistributionResponse> DistributionsAsync(int id)
|
|
{
|
|
return DistributionsAsync(id, System.Threading.CancellationToken.None);
|
|
}
|
|
|
|
/// <param name="cancellationToken">A cancellation token that can be used by other objects or threads to receive notice of cancellation.</param>
|
|
/// <summary>получить данные о прокате фильма по kinopoisk film id</summary>
|
|
/// <param name="id">kinopoisk film id</param>
|
|
/// <returns>Запрос выполнен успешно</returns>
|
|
/// <exception cref="ApiException">A server side error occurred.</exception>
|
|
public async System.Threading.Tasks.Task<DistributionResponse> 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<DistributionResponse>(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();
|
|
}
|
|
}
|
|
|
|
/// <summary>получить кадры из фильма по kinopoisk film id</summary>
|
|
/// <param name="id">kinopoisk film id</param>
|
|
/// <returns>Запрос выполнен успешно</returns>
|
|
/// <exception cref="ApiException">A server side error occurred.</exception>
|
|
public System.Threading.Tasks.Task<FilmFrameResponse> FramesAsync(int id)
|
|
{
|
|
return FramesAsync(id, System.Threading.CancellationToken.None);
|
|
}
|
|
|
|
/// <param name="cancellationToken">A cancellation token that can be used by other objects or threads to receive notice of cancellation.</param>
|
|
/// <summary>получить кадры из фильма по kinopoisk film id</summary>
|
|
/// <param name="id">kinopoisk film id</param>
|
|
/// <returns>Запрос выполнен успешно</returns>
|
|
/// <exception cref="ApiException">A server side error occurred.</exception>
|
|
public async System.Threading.Tasks.Task<FilmFrameResponse> 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<FilmFrameResponse>(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();
|
|
}
|
|
}
|
|
|
|
/// <summary>получить трейлеры,тизеры,видео для фильма по kinopoisk film id</summary>
|
|
/// <param name="id">kinopoisk film id</param>
|
|
/// <returns>Запрос выполнен успешно</returns>
|
|
/// <exception cref="ApiException">A server side error occurred.</exception>
|
|
public System.Threading.Tasks.Task<VideoResponse> VideosAsync(int id)
|
|
{
|
|
return VideosAsync(id, System.Threading.CancellationToken.None);
|
|
}
|
|
|
|
/// <param name="cancellationToken">A cancellation token that can be used by other objects or threads to receive notice of cancellation.</param>
|
|
/// <summary>получить трейлеры,тизеры,видео для фильма по kinopoisk film id</summary>
|
|
/// <param name="id">kinopoisk film id</param>
|
|
/// <returns>Запрос выполнен успешно</returns>
|
|
/// <exception cref="ApiException">A server side error occurred.</exception>
|
|
public async System.Threading.Tasks.Task<VideoResponse> 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<VideoResponse>(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();
|
|
}
|
|
}
|
|
|
|
/// <summary>получить список фильмов по ключевым словам</summary>
|
|
/// <param name="keyword">ключивые слова для поиска</param>
|
|
/// <param name="page">номер страницы</param>
|
|
/// <returns>Запрос выполнен успешно</returns>
|
|
/// <exception cref="ApiException">A server side error occurred.</exception>
|
|
public System.Threading.Tasks.Task<FilmSearchResponse> SearchByKeywordAsync(string keyword, int? page)
|
|
{
|
|
return SearchByKeywordAsync(keyword, page, System.Threading.CancellationToken.None);
|
|
}
|
|
|
|
/// <param name="cancellationToken">A cancellation token that can be used by other objects or threads to receive notice of cancellation.</param>
|
|
/// <summary>получить список фильмов по ключевым словам</summary>
|
|
/// <param name="keyword">ключивые слова для поиска</param>
|
|
/// <param name="page">номер страницы</param>
|
|
/// <returns>Запрос выполнен успешно</returns>
|
|
/// <exception cref="ApiException">A server side error occurred.</exception>
|
|
public async System.Threading.Tasks.Task<FilmSearchResponse> 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<FilmSearchResponse>(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();
|
|
}
|
|
}
|
|
|
|
/// <summary>получить id стран и жанров для использования в /api/v2.1/films/search-by-filters</summary>
|
|
/// <returns>Запрос выполнен успешно</returns>
|
|
/// <exception cref="ApiException">A server side error occurred.</exception>
|
|
public System.Threading.Tasks.Task<FiltersResponse> FiltersAsync()
|
|
{
|
|
return FiltersAsync(System.Threading.CancellationToken.None);
|
|
}
|
|
|
|
/// <param name="cancellationToken">A cancellation token that can be used by other objects or threads to receive notice of cancellation.</param>
|
|
/// <summary>получить id стран и жанров для использования в /api/v2.1/films/search-by-filters</summary>
|
|
/// <returns>Запрос выполнен успешно</returns>
|
|
/// <exception cref="ApiException">A server side error occurred.</exception>
|
|
public async System.Threading.Tasks.Task<FiltersResponse> 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<FiltersResponse>(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();
|
|
}
|
|
}
|
|
|
|
/// <summary>получить список фильмов по различным фильтрам</summary>
|
|
/// <param name="country">список id стран разделенные запятой. Например <i>country=1,2,3</i></param>
|
|
/// <param name="genre">список id жанров разделенные запятой. Например <i>genre=1,2,3</i></param>
|
|
/// <param name="order">сортировка</param>
|
|
/// <param name="type">тип фильма</param>
|
|
/// <param name="ratingFrom">минимальный рейтинг</param>
|
|
/// <param name="ratingTo">максимальный рейтинг</param>
|
|
/// <param name="yearFrom">минимальный год</param>
|
|
/// <param name="yearTo">максимальный год</param>
|
|
/// <param name="page">номер страницы</param>
|
|
/// <returns>Запрос выполнен успешно</returns>
|
|
/// <exception cref="ApiException">A server side error occurred.</exception>
|
|
public System.Threading.Tasks.Task<FilmSearchByFiltersResponse> SearchByFiltersAsync(System.Collections.Generic.IEnumerable<int> country, System.Collections.Generic.IEnumerable<int> 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);
|
|
}
|
|
|
|
/// <param name="cancellationToken">A cancellation token that can be used by other objects or threads to receive notice of cancellation.</param>
|
|
/// <summary>получить список фильмов по различным фильтрам</summary>
|
|
/// <param name="country">список id стран разделенные запятой. Например <i>country=1,2,3</i></param>
|
|
/// <param name="genre">список id жанров разделенные запятой. Например <i>genre=1,2,3</i></param>
|
|
/// <param name="order">сортировка</param>
|
|
/// <param name="type">тип фильма</param>
|
|
/// <param name="ratingFrom">минимальный рейтинг</param>
|
|
/// <param name="ratingTo">максимальный рейтинг</param>
|
|
/// <param name="yearFrom">минимальный год</param>
|
|
/// <param name="yearTo">максимальный год</param>
|
|
/// <param name="page">номер страницы</param>
|
|
/// <returns>Запрос выполнен успешно</returns>
|
|
/// <exception cref="ApiException">A server side error occurred.</exception>
|
|
public async System.Threading.Tasks.Task<FilmSearchByFiltersResponse> SearchByFiltersAsync(System.Collections.Generic.IEnumerable<int> country, System.Collections.Generic.IEnumerable<int> 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<FilmSearchByFiltersResponse>(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();
|
|
}
|
|
}
|
|
|
|
/// <summary>получить список фильмов из различных топов или коллекций. Например https://www.kinopoisk.ru/top/lists/58/</summary>
|
|
/// <param name="type">тип топа или коллекции</param>
|
|
/// <param name="page">номер страницы</param>
|
|
/// <returns>Запрос выполнен успешно</returns>
|
|
/// <exception cref="ApiException">A server side error occurred.</exception>
|
|
public System.Threading.Tasks.Task<FilmTopResponse> TopAsync(Type2? type, int? page)
|
|
{
|
|
return TopAsync(type, page, System.Threading.CancellationToken.None);
|
|
}
|
|
|
|
/// <param name="cancellationToken">A cancellation token that can be used by other objects or threads to receive notice of cancellation.</param>
|
|
/// <summary>получить список фильмов из различных топов или коллекций. Например https://www.kinopoisk.ru/top/lists/58/</summary>
|
|
/// <param name="type">тип топа или коллекции</param>
|
|
/// <param name="page">номер страницы</param>
|
|
/// <returns>Запрос выполнен успешно</returns>
|
|
/// <exception cref="ApiException">A server side error occurred.</exception>
|
|
public async System.Threading.Tasks.Task<FilmTopResponse> 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<FilmTopResponse>(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();
|
|
}
|
|
}
|
|
|
|
/// <summary>получить список похожих фильмов по kinopoisk film id</summary>
|
|
/// <param name="id">kinopoisk film id</param>
|
|
/// <returns>Запрос выполнен успешно</returns>
|
|
/// <exception cref="ApiException">A server side error occurred.</exception>
|
|
public System.Threading.Tasks.Task<RelatedFilmResponse> SimilarsAsync(int id)
|
|
{
|
|
return SimilarsAsync(id, System.Threading.CancellationToken.None);
|
|
}
|
|
|
|
/// <param name="cancellationToken">A cancellation token that can be used by other objects or threads to receive notice of cancellation.</param>
|
|
/// <summary>получить список похожих фильмов по kinopoisk film id</summary>
|
|
/// <param name="id">kinopoisk film id</param>
|
|
/// <returns>Запрос выполнен успешно</returns>
|
|
/// <exception cref="ApiException">A server side error occurred.</exception>
|
|
public async System.Threading.Tasks.Task<RelatedFilmResponse> 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<RelatedFilmResponse>(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();
|
|
}
|
|
}
|
|
|
|
/// <summary>получить список цифровых релизов</summary>
|
|
/// <param name="year">год релиза</param>
|
|
/// <param name="month">месяц релиза</param>
|
|
/// <param name="page">номер страницы</param>
|
|
/// <returns>Запрос выполнен успешно</returns>
|
|
/// <exception cref="ApiException">A server side error occurred.</exception>
|
|
public System.Threading.Tasks.Task<DigitalReleaseResponse> ReleasesAsync(int year, Month month, int? page)
|
|
{
|
|
return ReleasesAsync(year, month, page, System.Threading.CancellationToken.None);
|
|
}
|
|
|
|
/// <param name="cancellationToken">A cancellation token that can be used by other objects or threads to receive notice of cancellation.</param>
|
|
/// <summary>получить список цифровых релизов</summary>
|
|
/// <param name="year">год релиза</param>
|
|
/// <param name="month">месяц релиза</param>
|
|
/// <param name="page">номер страницы</param>
|
|
/// <returns>Запрос выполнен успешно</returns>
|
|
/// <exception cref="ApiException">A server side error occurred.</exception>
|
|
public async System.Threading.Tasks.Task<DigitalReleaseResponse> 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<DigitalReleaseResponse>(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();
|
|
}
|
|
}
|
|
|
|
/// <summary>получить рецензии зрителей</summary>
|
|
/// <param name="filmId">kinopoisk film id</param>
|
|
/// <param name="page">номер страницы</param>
|
|
/// <returns>Запрос выполнен успешно</returns>
|
|
/// <exception cref="ApiException">A server side error occurred.</exception>
|
|
public System.Threading.Tasks.Task<ReviewsResponse> ReviewsAsync(int filmId, int? page)
|
|
{
|
|
return ReviewsAsync(filmId, page, System.Threading.CancellationToken.None);
|
|
}
|
|
|
|
/// <param name="cancellationToken">A cancellation token that can be used by other objects or threads to receive notice of cancellation.</param>
|
|
/// <summary>получить рецензии зрителей</summary>
|
|
/// <param name="filmId">kinopoisk film id</param>
|
|
/// <param name="page">номер страницы</param>
|
|
/// <returns>Запрос выполнен успешно</returns>
|
|
/// <exception cref="ApiException">A server side error occurred.</exception>
|
|
public async System.Threading.Tasks.Task<ReviewsResponse> 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<ReviewsResponse>(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();
|
|
}
|
|
}
|
|
|
|
/// <summary>получить полную рецензию по kinopoisk review id</summary>
|
|
/// <param name="reviewId">kinopoisk review id</param>
|
|
/// <returns>Запрос выполнен успешно</returns>
|
|
/// <exception cref="ApiException">A server side error occurred.</exception>
|
|
public System.Threading.Tasks.Task<ReviewDetailsResponse> DetailsAsync(int reviewId)
|
|
{
|
|
return DetailsAsync(reviewId, System.Threading.CancellationToken.None);
|
|
}
|
|
|
|
/// <param name="cancellationToken">A cancellation token that can be used by other objects or threads to receive notice of cancellation.</param>
|
|
/// <summary>получить полную рецензию по kinopoisk review id</summary>
|
|
/// <param name="reviewId">kinopoisk review id</param>
|
|
/// <returns>Запрос выполнен успешно</returns>
|
|
/// <exception cref="ApiException">A server side error occurred.</exception>
|
|
public async System.Threading.Tasks.Task<ReviewDetailsResponse> 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<ReviewDetailsResponse>(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();
|
|
}
|
|
}
|
|
|
|
/// <summary>получить данные об актерах, режисерах и т.д. по kinopoisk film id</summary>
|
|
/// <param name="filmId">kinopoisk film id</param>
|
|
/// <returns>Запрос выполнен успешно</returns>
|
|
/// <exception cref="ApiException">A server side error occurred.</exception>
|
|
public System.Threading.Tasks.Task<System.Collections.Generic.ICollection<StaffResponse>> StaffAllAsync(int filmId)
|
|
{
|
|
return StaffAllAsync(filmId, System.Threading.CancellationToken.None);
|
|
}
|
|
|
|
/// <param name="cancellationToken">A cancellation token that can be used by other objects or threads to receive notice of cancellation.</param>
|
|
/// <summary>получить данные об актерах, режисерах и т.д. по kinopoisk film id</summary>
|
|
/// <param name="filmId">kinopoisk film id</param>
|
|
/// <returns>Запрос выполнен успешно</returns>
|
|
/// <exception cref="ApiException">A server side error occurred.</exception>
|
|
public async System.Threading.Tasks.Task<System.Collections.Generic.ICollection<StaffResponse>> 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<System.Collections.Generic.ICollection<StaffResponse>>(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();
|
|
}
|
|
}
|
|
|
|
/// <summary>получить данные о конкретном человеке по kinopoisk person id</summary>
|
|
/// <param name="id">kinopoisk person id</param>
|
|
/// <returns>Запрос выполнен успешно</returns>
|
|
/// <exception cref="ApiException">A server side error occurred.</exception>
|
|
public System.Threading.Tasks.Task<PersonResponse> StaffAsync(int id)
|
|
{
|
|
return StaffAsync(id, System.Threading.CancellationToken.None);
|
|
}
|
|
|
|
/// <param name="cancellationToken">A cancellation token that can be used by other objects or threads to receive notice of cancellation.</param>
|
|
/// <summary>получить данные о конкретном человеке по kinopoisk person id</summary>
|
|
/// <param name="id">kinopoisk person id</param>
|
|
/// <returns>Запрос выполнен успешно</returns>
|
|
/// <exception cref="ApiException">A server side error occurred.</exception>
|
|
public async System.Threading.Tasks.Task<PersonResponse> 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<PersonResponse>(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<T>
|
|
{
|
|
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<ObjectResponseResult<T>> ReadObjectResponseAsync<T>(System.Net.Http.HttpResponseMessage response, System.Collections.Generic.IReadOnlyDictionary<string, System.Collections.Generic.IEnumerable<string>> headers, System.Threading.CancellationToken cancellationToken)
|
|
{
|
|
if (response == null || response.Content == null)
|
|
{
|
|
return new ObjectResponseResult<T>(default(T), string.Empty);
|
|
}
|
|
|
|
if (ReadResponseAsString)
|
|
{
|
|
var responseText = await response.Content.ReadAsStringAsync().ConfigureAwait(false);
|
|
try
|
|
{
|
|
var typedBody = Newtonsoft.Json.JsonConvert.DeserializeObject<T>(responseText, JsonSerializerSettings);
|
|
return new ObjectResponseResult<T>(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<T>(jsonTextReader);
|
|
return new ObjectResponseResult<T>(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<object>((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<Newtonsoft.Json.JsonSerializerSettings> _settings;
|
|
|
|
public BoxClient(System.Net.Http.HttpClient httpClient)
|
|
{
|
|
_httpClient = httpClient;
|
|
_settings = new System.Lazy<Newtonsoft.Json.JsonSerializerSettings>(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);
|
|
/// <summary>получить данные о бюджете и сборах фильма по kinopoisk film id</summary>
|
|
/// <param name="id">kinopoisk film id</param>
|
|
/// <returns>Запрос выполнен успешно</returns>
|
|
/// <exception cref="ApiException">A server side error occurred.</exception>
|
|
public System.Threading.Tasks.Task<BoxOfficeResponse> OfficeAsync(int id)
|
|
{
|
|
return OfficeAsync(id, System.Threading.CancellationToken.None);
|
|
}
|
|
|
|
/// <param name="cancellationToken">A cancellation token that can be used by other objects or threads to receive notice of cancellation.</param>
|
|
/// <summary>получить данные о бюджете и сборах фильма по kinopoisk film id</summary>
|
|
/// <param name="id">kinopoisk film id</param>
|
|
/// <returns>Запрос выполнен успешно</returns>
|
|
/// <exception cref="ApiException">A server side error occurred.</exception>
|
|
public async System.Threading.Tasks.Task<BoxOfficeResponse> 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<BoxOfficeResponse>(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<T>
|
|
{
|
|
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<ObjectResponseResult<T>> ReadObjectResponseAsync<T>(System.Net.Http.HttpResponseMessage response, System.Collections.Generic.IReadOnlyDictionary<string, System.Collections.Generic.IEnumerable<string>> headers, System.Threading.CancellationToken cancellationToken)
|
|
{
|
|
if (response == null || response.Content == null)
|
|
{
|
|
return new ObjectResponseResult<T>(default(T), string.Empty);
|
|
}
|
|
|
|
if (ReadResponseAsString)
|
|
{
|
|
var responseText = await response.Content.ReadAsStringAsync().ConfigureAwait(false);
|
|
try
|
|
{
|
|
var typedBody = Newtonsoft.Json.JsonConvert.DeserializeObject<T>(responseText, JsonSerializerSettings);
|
|
return new ObjectResponseResult<T>(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<T>(jsonTextReader);
|
|
return new ObjectResponseResult<T>(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<object>((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<Newtonsoft.Json.JsonSerializerSettings> _settings;
|
|
|
|
public AndClient(System.Net.Http.HttpClient httpClient)
|
|
{
|
|
_httpClient = httpClient;
|
|
_settings = new System.Lazy<Newtonsoft.Json.JsonSerializerSettings>(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);
|
|
/// <summary>получить сиквелы и приквелы для фильма по kinopoisk film id</summary>
|
|
/// <param name="id">kinopoisk film id</param>
|
|
/// <returns>Запрос выполнен успешно</returns>
|
|
/// <exception cref="ApiException">A server side error occurred.</exception>
|
|
public System.Threading.Tasks.Task<System.Collections.Generic.ICollection<FilmSequelsAndPrequelsResponse>> PrequelsAsync(int id)
|
|
{
|
|
return PrequelsAsync(id, System.Threading.CancellationToken.None);
|
|
}
|
|
|
|
/// <param name="cancellationToken">A cancellation token that can be used by other objects or threads to receive notice of cancellation.</param>
|
|
/// <summary>получить сиквелы и приквелы для фильма по kinopoisk film id</summary>
|
|
/// <param name="id">kinopoisk film id</param>
|
|
/// <returns>Запрос выполнен успешно</returns>
|
|
/// <exception cref="ApiException">A server side error occurred.</exception>
|
|
public async System.Threading.Tasks.Task<System.Collections.Generic.ICollection<FilmSequelsAndPrequelsResponse>> 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<System.Collections.Generic.ICollection<FilmSequelsAndPrequelsResponse>>(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<T>
|
|
{
|
|
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<ObjectResponseResult<T>> ReadObjectResponseAsync<T>(System.Net.Http.HttpResponseMessage response, System.Collections.Generic.IReadOnlyDictionary<string, System.Collections.Generic.IEnumerable<string>> headers, System.Threading.CancellationToken cancellationToken)
|
|
{
|
|
if (response == null || response.Content == null)
|
|
{
|
|
return new ObjectResponseResult<T>(default(T), string.Empty);
|
|
}
|
|
|
|
if (ReadResponseAsString)
|
|
{
|
|
var responseText = await response.Content.ReadAsStringAsync().ConfigureAwait(false);
|
|
try
|
|
{
|
|
var typedBody = Newtonsoft.Json.JsonConvert.DeserializeObject<T>(responseText, JsonSerializerSettings);
|
|
return new ObjectResponseResult<T>(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<T>(jsonTextReader);
|
|
return new ObjectResponseResult<T>(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<object>((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<Country> Countries { get; set; } = new System.Collections.ObjectModel.Collection<Country>();
|
|
|
|
[Newtonsoft.Json.JsonProperty("genres", Required = Newtonsoft.Json.Required.Always)]
|
|
[System.ComponentModel.DataAnnotations.Required]
|
|
public System.Collections.Generic.ICollection<Genre> Genres { get; set; } = new System.Collections.ObjectModel.Collection<Genre>();
|
|
|
|
[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<string, object> _additionalProperties = new System.Collections.Generic.Dictionary<string, object>();
|
|
|
|
[Newtonsoft.Json.JsonExtensionData]
|
|
public System.Collections.Generic.IDictionary<string, object> 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<Season> Items { get; set; } = new System.Collections.ObjectModel.Collection<Season>();
|
|
|
|
private System.Collections.Generic.IDictionary<string, object> _additionalProperties = new System.Collections.Generic.Dictionary<string, object>();
|
|
|
|
[Newtonsoft.Json.JsonExtensionData]
|
|
public System.Collections.Generic.IDictionary<string, object> 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<Fact> Items { get; set; } = new System.Collections.ObjectModel.Collection<Fact>();
|
|
|
|
private System.Collections.Generic.IDictionary<string, object> _additionalProperties = new System.Collections.Generic.Dictionary<string, object>();
|
|
|
|
[Newtonsoft.Json.JsonExtensionData]
|
|
public System.Collections.Generic.IDictionary<string, object> 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<Distribution> Items { get; set; } = new System.Collections.ObjectModel.Collection<Distribution>();
|
|
|
|
private System.Collections.Generic.IDictionary<string, object> _additionalProperties = new System.Collections.Generic.Dictionary<string, object>();
|
|
|
|
[Newtonsoft.Json.JsonExtensionData]
|
|
public System.Collections.Generic.IDictionary<string, object> 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<BoxOffice> Items { get; set; } = new System.Collections.ObjectModel.Collection<BoxOffice>();
|
|
|
|
private System.Collections.Generic.IDictionary<string, object> _additionalProperties = new System.Collections.Generic.Dictionary<string, object>();
|
|
|
|
[Newtonsoft.Json.JsonExtensionData]
|
|
public System.Collections.Generic.IDictionary<string, object> 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<string, object> _additionalProperties = new System.Collections.Generic.Dictionary<string, object>();
|
|
|
|
[Newtonsoft.Json.JsonExtensionData]
|
|
public System.Collections.Generic.IDictionary<string, object> 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<string, object> _additionalProperties = new System.Collections.Generic.Dictionary<string, object>();
|
|
|
|
[Newtonsoft.Json.JsonExtensionData]
|
|
public System.Collections.Generic.IDictionary<string, object> 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<Company> Companies { get; set; } = new System.Collections.ObjectModel.Collection<Company>();
|
|
|
|
private System.Collections.Generic.IDictionary<string, object> _additionalProperties = new System.Collections.Generic.Dictionary<string, object>();
|
|
|
|
[Newtonsoft.Json.JsonExtensionData]
|
|
public System.Collections.Generic.IDictionary<string, object> 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<string, object> _additionalProperties = new System.Collections.Generic.Dictionary<string, object>();
|
|
|
|
[Newtonsoft.Json.JsonExtensionData]
|
|
public System.Collections.Generic.IDictionary<string, object> 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<Episode> Episodes { get; set; } = new System.Collections.ObjectModel.Collection<Episode>();
|
|
|
|
private System.Collections.Generic.IDictionary<string, object> _additionalProperties = new System.Collections.Generic.Dictionary<string, object>();
|
|
|
|
[Newtonsoft.Json.JsonExtensionData]
|
|
public System.Collections.Generic.IDictionary<string, object> 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<string, object> _additionalProperties = new System.Collections.Generic.Dictionary<string, object>();
|
|
|
|
[Newtonsoft.Json.JsonExtensionData]
|
|
public System.Collections.Generic.IDictionary<string, object> 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<string, object> _additionalProperties = new System.Collections.Generic.Dictionary<string, object>();
|
|
|
|
[Newtonsoft.Json.JsonExtensionData]
|
|
public System.Collections.Generic.IDictionary<string, object> 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<string, object> _additionalProperties = new System.Collections.Generic.Dictionary<string, object>();
|
|
|
|
[Newtonsoft.Json.JsonExtensionData]
|
|
public System.Collections.Generic.IDictionary<string, object> 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<FiltersResponse_genres> Genres { get; set; } = new System.Collections.ObjectModel.Collection<FiltersResponse_genres>();
|
|
|
|
[Newtonsoft.Json.JsonProperty("countries", Required = Newtonsoft.Json.Required.Always)]
|
|
[System.ComponentModel.DataAnnotations.Required]
|
|
public System.Collections.Generic.ICollection<FiltersResponse_countries> Countries { get; set; } = new System.Collections.ObjectModel.Collection<FiltersResponse_countries>();
|
|
|
|
private System.Collections.Generic.IDictionary<string, object> _additionalProperties = new System.Collections.Generic.Dictionary<string, object>();
|
|
|
|
[Newtonsoft.Json.JsonExtensionData]
|
|
public System.Collections.Generic.IDictionary<string, object> 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<FilmSearchResponse_films> Films { get; set; } = new System.Collections.ObjectModel.Collection<FilmSearchResponse_films>();
|
|
|
|
private System.Collections.Generic.IDictionary<string, object> _additionalProperties = new System.Collections.Generic.Dictionary<string, object>();
|
|
|
|
[Newtonsoft.Json.JsonExtensionData]
|
|
public System.Collections.Generic.IDictionary<string, object> 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<FilmSearchResponse_films> Films { get; set; } = new System.Collections.ObjectModel.Collection<FilmSearchResponse_films>();
|
|
|
|
private System.Collections.Generic.IDictionary<string, object> _additionalProperties = new System.Collections.Generic.Dictionary<string, object>();
|
|
|
|
[Newtonsoft.Json.JsonExtensionData]
|
|
public System.Collections.Generic.IDictionary<string, object> 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<string, object> _additionalProperties = new System.Collections.Generic.Dictionary<string, object>();
|
|
|
|
[Newtonsoft.Json.JsonExtensionData]
|
|
public System.Collections.Generic.IDictionary<string, object> 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<RelatedFilmResponse_items> Items { get; set; } = new System.Collections.ObjectModel.Collection<RelatedFilmResponse_items>();
|
|
|
|
private System.Collections.Generic.IDictionary<string, object> _additionalProperties = new System.Collections.Generic.Dictionary<string, object>();
|
|
|
|
[Newtonsoft.Json.JsonExtensionData]
|
|
public System.Collections.Generic.IDictionary<string, object> 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<FilmTopResponse_films> Films { get; set; } = new System.Collections.ObjectModel.Collection<FilmTopResponse_films>();
|
|
|
|
private System.Collections.Generic.IDictionary<string, object> _additionalProperties = new System.Collections.Generic.Dictionary<string, object>();
|
|
|
|
[Newtonsoft.Json.JsonExtensionData]
|
|
public System.Collections.Generic.IDictionary<string, object> 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<ReviewsResponse_reviews> Reviews { get; set; } = new System.Collections.ObjectModel.Collection<ReviewsResponse_reviews>();
|
|
|
|
private System.Collections.Generic.IDictionary<string, object> _additionalProperties = new System.Collections.Generic.Dictionary<string, object>();
|
|
|
|
[Newtonsoft.Json.JsonExtensionData]
|
|
public System.Collections.Generic.IDictionary<string, object> 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<string, object> _additionalProperties = new System.Collections.Generic.Dictionary<string, object>();
|
|
|
|
[Newtonsoft.Json.JsonExtensionData]
|
|
public System.Collections.Generic.IDictionary<string, object> 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<string, object> _additionalProperties = new System.Collections.Generic.Dictionary<string, object>();
|
|
|
|
[Newtonsoft.Json.JsonExtensionData]
|
|
public System.Collections.Generic.IDictionary<string, object> 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<string> Facts { get; set; } = new System.Collections.ObjectModel.Collection<string>();
|
|
|
|
[Newtonsoft.Json.JsonProperty("spouses", Required = Newtonsoft.Json.Required.Always)]
|
|
[System.ComponentModel.DataAnnotations.Required]
|
|
public System.Collections.Generic.ICollection<PersonResponse_spouses> Spouses { get; set; } = new System.Collections.ObjectModel.Collection<PersonResponse_spouses>();
|
|
|
|
[Newtonsoft.Json.JsonProperty("films", Required = Newtonsoft.Json.Required.Always)]
|
|
[System.ComponentModel.DataAnnotations.Required]
|
|
public System.Collections.Generic.ICollection<PersonResponse_films> Films { get; set; } = new System.Collections.ObjectModel.Collection<PersonResponse_films>();
|
|
|
|
private System.Collections.Generic.IDictionary<string, object> _additionalProperties = new System.Collections.Generic.Dictionary<string, object>();
|
|
|
|
[Newtonsoft.Json.JsonExtensionData]
|
|
public System.Collections.Generic.IDictionary<string, object> 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<FilmFrameResponse_frames> Frames { get; set; } = new System.Collections.ObjectModel.Collection<FilmFrameResponse_frames>();
|
|
|
|
private System.Collections.Generic.IDictionary<string, object> _additionalProperties = new System.Collections.Generic.Dictionary<string, object>();
|
|
|
|
[Newtonsoft.Json.JsonExtensionData]
|
|
public System.Collections.Generic.IDictionary<string, object> 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<DigitalReleaseItem> Releases { get; set; } = new System.Collections.ObjectModel.Collection<DigitalReleaseItem>();
|
|
|
|
private System.Collections.Generic.IDictionary<string, object> _additionalProperties = new System.Collections.Generic.Dictionary<string, object>();
|
|
|
|
[Newtonsoft.Json.JsonExtensionData]
|
|
public System.Collections.Generic.IDictionary<string, object> 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<Country> Countries { get; set; } = new System.Collections.ObjectModel.Collection<Country>();
|
|
|
|
[Newtonsoft.Json.JsonProperty("genres", Required = Newtonsoft.Json.Required.Always)]
|
|
[System.ComponentModel.DataAnnotations.Required]
|
|
public System.Collections.Generic.ICollection<Genre> Genres { get; set; } = new System.Collections.ObjectModel.Collection<Genre>();
|
|
|
|
[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<string, object> _additionalProperties = new System.Collections.Generic.Dictionary<string, object>();
|
|
|
|
[Newtonsoft.Json.JsonExtensionData]
|
|
public System.Collections.Generic.IDictionary<string, object> 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<VideoResponse_items> Items { get; set; } = new System.Collections.ObjectModel.Collection<VideoResponse_items>();
|
|
|
|
private System.Collections.Generic.IDictionary<string, object> _additionalProperties = new System.Collections.Generic.Dictionary<string, object>();
|
|
|
|
[Newtonsoft.Json.JsonExtensionData]
|
|
public System.Collections.Generic.IDictionary<string, object> 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<string, object> _additionalProperties = new System.Collections.Generic.Dictionary<string, object>();
|
|
|
|
[Newtonsoft.Json.JsonExtensionData]
|
|
public System.Collections.Generic.IDictionary<string, object> 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<string, object> _additionalProperties = new System.Collections.Generic.Dictionary<string, object>();
|
|
|
|
[Newtonsoft.Json.JsonExtensionData]
|
|
public System.Collections.Generic.IDictionary<string, object> 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<Country> Countries { get; set; }
|
|
|
|
[Newtonsoft.Json.JsonProperty("genres", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)]
|
|
public System.Collections.Generic.ICollection<Genre> 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<string, object> _additionalProperties = new System.Collections.Generic.Dictionary<string, object>();
|
|
|
|
[Newtonsoft.Json.JsonExtensionData]
|
|
public System.Collections.Generic.IDictionary<string, object> 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<string, object> _additionalProperties = new System.Collections.Generic.Dictionary<string, object>();
|
|
|
|
[Newtonsoft.Json.JsonExtensionData]
|
|
public System.Collections.Generic.IDictionary<string, object> 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<Country> Countries { get; set; }
|
|
|
|
[Newtonsoft.Json.JsonProperty("genres", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)]
|
|
public System.Collections.Generic.ICollection<Genre> 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<string, object> _additionalProperties = new System.Collections.Generic.Dictionary<string, object>();
|
|
|
|
[Newtonsoft.Json.JsonExtensionData]
|
|
public System.Collections.Generic.IDictionary<string, object> 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<string, object> _additionalProperties = new System.Collections.Generic.Dictionary<string, object>();
|
|
|
|
[Newtonsoft.Json.JsonExtensionData]
|
|
public System.Collections.Generic.IDictionary<string, object> 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<string, object> _additionalProperties = new System.Collections.Generic.Dictionary<string, object>();
|
|
|
|
[Newtonsoft.Json.JsonExtensionData]
|
|
public System.Collections.Generic.IDictionary<string, object> 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<string, object> _additionalProperties = new System.Collections.Generic.Dictionary<string, object>();
|
|
|
|
[Newtonsoft.Json.JsonExtensionData]
|
|
public System.Collections.Generic.IDictionary<string, object> 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<string, object> _additionalProperties = new System.Collections.Generic.Dictionary<string, object>();
|
|
|
|
[Newtonsoft.Json.JsonExtensionData]
|
|
public System.Collections.Generic.IDictionary<string, object> 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<string, object> _additionalProperties = new System.Collections.Generic.Dictionary<string, object>();
|
|
|
|
[Newtonsoft.Json.JsonExtensionData]
|
|
public System.Collections.Generic.IDictionary<string, object> 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<string, System.Collections.Generic.IEnumerable<string>> Headers { get; private set; }
|
|
|
|
public ApiException(string message, int statusCode, string response, System.Collections.Generic.IReadOnlyDictionary<string, System.Collections.Generic.IEnumerable<string>> 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<TResult> : ApiException
|
|
{
|
|
public TResult Result { get; private set; }
|
|
|
|
public ApiException(string message, int statusCode, string response, System.Collections.Generic.IReadOnlyDictionary<string, System.Collections.Generic.IEnumerable<string>> 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 |