3649 lines
186 KiB
C#
3649 lines
186 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>Get film data by kinopoisk film id</summary>
|
|
/// <param name="id">film id from kinopoisk</param>
|
|
/// <param name="append_to_response">comma-separated list of data to add to the response. E.g. <i>append_to_response=BUDGET, RATING, REVIEW, POSTERS</i> . <b>NOTE - every additional parameter increases response time!</b></param>
|
|
/// <returns>Successful operation</returns>
|
|
/// <exception cref="ApiException">A server side error occurred.</exception>
|
|
public System.Threading.Tasks.Task<Film> FilmsAsync(int id, System.Collections.Generic.IEnumerable<Anonymous> append_to_response)
|
|
{
|
|
return FilmsAsync(id, append_to_response, 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>Get film data by kinopoisk film id</summary>
|
|
/// <param name="id">film id from kinopoisk</param>
|
|
/// <param name="append_to_response">comma-separated list of data to add to the response. E.g. <i>append_to_response=BUDGET, RATING, REVIEW, POSTERS</i> . <b>NOTE - every additional parameter increases response time!</b></param>
|
|
/// <returns>Successful operation</returns>
|
|
/// <exception cref="ApiException">A server side error occurred.</exception>
|
|
public async System.Threading.Tasks.Task<Film> FilmsAsync(int id, System.Collections.Generic.IEnumerable<Anonymous> append_to_response, 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}?");
|
|
urlBuilder_.Replace("{id}", System.Uri.EscapeDataString(ConvertToString(id, System.Globalization.CultureInfo.InvariantCulture)));
|
|
if (append_to_response != null)
|
|
{
|
|
foreach (var item_ in append_to_response) { urlBuilder_.Append(System.Uri.EscapeDataString("append_to_response") + "=").Append(System.Uri.EscapeDataString(ConvertToString(item_, 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<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("Wrong or empty access token", status_, responseText_, headers_, null);
|
|
}
|
|
else
|
|
if (status_ == 404)
|
|
{
|
|
string responseText_ = ( response_.Content == null ) ? string.Empty : await response_.Content.ReadAsStringAsync().ConfigureAwait(false);
|
|
throw new ApiException("Film is not found", status_, responseText_, headers_, null);
|
|
}
|
|
else
|
|
if (status_ == 429)
|
|
{
|
|
string responseText_ = ( response_.Content == null ) ? string.Empty : await response_.Content.ReadAsStringAsync().ConfigureAwait(false);
|
|
throw new ApiException("Too Many Requests. Limit 10 req/sec", 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>Get film frames</summary>
|
|
/// <param name="id">film id from kinopoisk</param>
|
|
/// <returns>Successful operation</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>Get film frames</summary>
|
|
/// <param name="id">film id from kinopoisk</param>
|
|
/// <returns>Successful operation</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("Wrong or empty access token", status_, responseText_, headers_, null);
|
|
}
|
|
else
|
|
if (status_ == 404)
|
|
{
|
|
string responseText_ = ( response_.Content == null ) ? string.Empty : await response_.Content.ReadAsStringAsync().ConfigureAwait(false);
|
|
throw new ApiException("Frames are not found", status_, responseText_, headers_, null);
|
|
}
|
|
else
|
|
if (status_ == 429)
|
|
{
|
|
string responseText_ = ( response_.Content == null ) ? string.Empty : await response_.Content.ReadAsStringAsync().ConfigureAwait(false);
|
|
throw new ApiException("Too Many Requests. Limit 3 req/sec", 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>Get film trailers/teasers</summary>
|
|
/// <param name="id">film id from kinopoisk</param>
|
|
/// <returns>Successful operation</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>Get film trailers/teasers</summary>
|
|
/// <param name="id">film id from kinopoisk</param>
|
|
/// <returns>Successful operation</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.1/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("Wrong or empty access token", status_, responseText_, headers_, null);
|
|
}
|
|
else
|
|
if (status_ == 404)
|
|
{
|
|
string responseText_ = ( response_.Content == null ) ? string.Empty : await response_.Content.ReadAsStringAsync().ConfigureAwait(false);
|
|
throw new ApiException("Videos are not found", status_, responseText_, headers_, null);
|
|
}
|
|
else
|
|
if (status_ == 429)
|
|
{
|
|
string responseText_ = ( response_.Content == null ) ? string.Empty : await response_.Content.ReadAsStringAsync().ConfigureAwait(false);
|
|
throw new ApiException("Too Many Requests. Limit 3 req/sec", 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>Get studios information for film</summary>
|
|
/// <param name="id">film id from kinopoisk</param>
|
|
/// <returns>Successful operation</returns>
|
|
/// <exception cref="ApiException">A server side error occurred.</exception>
|
|
public System.Threading.Tasks.Task<FilmStudioResponse> StudiosAsync(int id)
|
|
{
|
|
return StudiosAsync(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>Get studios information for film</summary>
|
|
/// <param name="id">film id from kinopoisk</param>
|
|
/// <returns>Successful operation</returns>
|
|
/// <exception cref="ApiException">A server side error occurred.</exception>
|
|
public async System.Threading.Tasks.Task<FilmStudioResponse> StudiosAsync(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}/studios");
|
|
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<FilmStudioResponse>(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("Wrong or empty access token", status_, responseText_, headers_, null);
|
|
}
|
|
else
|
|
if (status_ == 404)
|
|
{
|
|
string responseText_ = ( response_.Content == null ) ? string.Empty : await response_.Content.ReadAsStringAsync().ConfigureAwait(false);
|
|
throw new ApiException("Studios are not found", status_, responseText_, headers_, null);
|
|
}
|
|
else
|
|
if (status_ == 429)
|
|
{
|
|
string responseText_ = ( response_.Content == null ) ? string.Empty : await response_.Content.ReadAsStringAsync().ConfigureAwait(false);
|
|
throw new ApiException("Too Many Requests. Limit 0.5 req/sec", 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>Get list of films by keyword</summary>
|
|
/// <param name="keyword">keywords for searching film</param>
|
|
/// <param name="page">page number</param>
|
|
/// <returns>Successful operation</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>Get list of films by keyword</summary>
|
|
/// <param name="keyword">keywords for searching film</param>
|
|
/// <param name="page">page number</param>
|
|
/// <returns>Successful operation</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("Wrong or empty access token", status_, responseText_, headers_, null);
|
|
}
|
|
else
|
|
if (status_ == 404)
|
|
{
|
|
string responseText_ = ( response_.Content == null ) ? string.Empty : await response_.Content.ReadAsStringAsync().ConfigureAwait(false);
|
|
throw new ApiException("Films are not found", status_, responseText_, headers_, null);
|
|
}
|
|
else
|
|
if (status_ == 429)
|
|
{
|
|
string responseText_ = ( response_.Content == null ) ? string.Empty : await response_.Content.ReadAsStringAsync().ConfigureAwait(false);
|
|
throw new ApiException("Too Many Requests. Limit 5 req/sec", 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>Get counries and genres ids for /api/v2.1/films/search-by-filters</summary>
|
|
/// <returns>Successful operation</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>Get counries and genres ids for /api/v2.1/films/search-by-filters</summary>
|
|
/// <returns>Successful operation</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("Wrong or empty access token", status_, responseText_, headers_, null);
|
|
}
|
|
else
|
|
if (status_ == 404)
|
|
{
|
|
string responseText_ = ( response_.Content == null ) ? string.Empty : await response_.Content.ReadAsStringAsync().ConfigureAwait(false);
|
|
throw new ApiException("Filters are not found", status_, responseText_, headers_, null);
|
|
}
|
|
else
|
|
if (status_ == 429)
|
|
{
|
|
string responseText_ = ( response_.Content == null ) ? string.Empty : await response_.Content.ReadAsStringAsync().ConfigureAwait(false);
|
|
throw new ApiException("Too Many Requests. Limit 10 req/sec", 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>Get list of films by different filters</summary>
|
|
/// <param name="country">comma-separated list of country ids. E.g. <i>country=1,2,3</i></param>
|
|
/// <param name="genre">comma-separated list of genre ids. E.g. <i>genre=1,2,3</i></param>
|
|
/// <param name="order">order of sorting</param>
|
|
/// <param name="type">type of entity</param>
|
|
/// <param name="ratingFrom">min rating</param>
|
|
/// <param name="ratingTo">max rating</param>
|
|
/// <param name="yearFrom">min year</param>
|
|
/// <param name="yearTo">max year</param>
|
|
/// <param name="page">page number</param>
|
|
/// <returns>Successful operation</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>Get list of films by different filters</summary>
|
|
/// <param name="country">comma-separated list of country ids. E.g. <i>country=1,2,3</i></param>
|
|
/// <param name="genre">comma-separated list of genre ids. E.g. <i>genre=1,2,3</i></param>
|
|
/// <param name="order">order of sorting</param>
|
|
/// <param name="type">type of entity</param>
|
|
/// <param name="ratingFrom">min rating</param>
|
|
/// <param name="ratingTo">max rating</param>
|
|
/// <param name="yearFrom">min year</param>
|
|
/// <param name="yearTo">max year</param>
|
|
/// <param name="page">page number</param>
|
|
/// <returns>Successful operation</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("Wrong or empty access token", status_, responseText_, headers_, null);
|
|
}
|
|
else
|
|
if (status_ == 404)
|
|
{
|
|
string responseText_ = ( response_.Content == null ) ? string.Empty : await response_.Content.ReadAsStringAsync().ConfigureAwait(false);
|
|
throw new ApiException("Films are not found", status_, responseText_, headers_, null);
|
|
}
|
|
else
|
|
if (status_ == 429)
|
|
{
|
|
string responseText_ = ( response_.Content == null ) ? string.Empty : await response_.Content.ReadAsStringAsync().ConfigureAwait(false);
|
|
throw new ApiException("Too Many Requests. Limit 10 req/sec", 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>Get list of films accoding to kinopoisk tops. E.g https://www.kinopoisk.ru/top/lists/58/</summary>
|
|
/// <param name="type">type of top</param>
|
|
/// <param name="page">page number</param>
|
|
/// <returns>Successful operation</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>Get list of films accoding to kinopoisk tops. E.g https://www.kinopoisk.ru/top/lists/58/</summary>
|
|
/// <param name="type">type of top</param>
|
|
/// <param name="page">page number</param>
|
|
/// <returns>Successful operation</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("Wrong or empty access token", status_, responseText_, headers_, null);
|
|
}
|
|
else
|
|
if (status_ == 429)
|
|
{
|
|
string responseText_ = ( response_.Content == null ) ? string.Empty : await response_.Content.ReadAsStringAsync().ConfigureAwait(false);
|
|
throw new ApiException("Too Many Requests. Limit 3 req/sec", 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>Get similars for particular film</summary>
|
|
/// <param name="id">film id from kinopoisk</param>
|
|
/// <returns>Successful operation</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>Get similars for particular film</summary>
|
|
/// <param name="id">film id from kinopoisk</param>
|
|
/// <returns>Successful operation</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("Wrong or empty access token", status_, responseText_, headers_, null);
|
|
}
|
|
else
|
|
if (status_ == 429)
|
|
{
|
|
string responseText_ = ( response_.Content == null ) ? string.Empty : await response_.Content.ReadAsStringAsync().ConfigureAwait(false);
|
|
throw new ApiException("Too Many Requests. Limit 10 req/sec", 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>Get digital releases</summary>
|
|
/// <param name="year">releases will be shown for this year</param>
|
|
/// <param name="month">releases will be shown for this month</param>
|
|
/// <param name="page">page</param>
|
|
/// <returns>Successful operation</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>Get digital releases</summary>
|
|
/// <param name="year">releases will be shown for this year</param>
|
|
/// <param name="month">releases will be shown for this month</param>
|
|
/// <param name="page">page</param>
|
|
/// <returns>Successful operation</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("Wrong or empty access token", status_, responseText_, headers_, null);
|
|
}
|
|
else
|
|
if (status_ == 404)
|
|
{
|
|
string responseText_ = ( response_.Content == null ) ? string.Empty : await response_.Content.ReadAsStringAsync().ConfigureAwait(false);
|
|
throw new ApiException("Films are not found", status_, responseText_, headers_, null);
|
|
}
|
|
else
|
|
if (status_ == 429)
|
|
{
|
|
string responseText_ = ( response_.Content == null ) ? string.Empty : await response_.Content.ReadAsStringAsync().ConfigureAwait(false);
|
|
throw new ApiException("Too Many Requests. Limit 10 req/sec", 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>Get list of reviews by kinopoisk film id</summary>
|
|
/// <param name="filmId">film id from kinopoisk</param>
|
|
/// <param name="page">page number. Max value is 999</param>
|
|
/// <returns>Successful operation</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>Get list of reviews by kinopoisk film id</summary>
|
|
/// <param name="filmId">film id from kinopoisk</param>
|
|
/// <param name="page">page number. Max value is 999</param>
|
|
/// <returns>Successful operation</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("Wrong or empty access token", status_, responseText_, headers_, null);
|
|
}
|
|
else
|
|
if (status_ == 404)
|
|
{
|
|
string responseText_ = ( response_.Content == null ) ? string.Empty : await response_.Content.ReadAsStringAsync().ConfigureAwait(false);
|
|
throw new ApiException("Reviews are not found", status_, responseText_, headers_, null);
|
|
}
|
|
else
|
|
if (status_ == 429)
|
|
{
|
|
string responseText_ = ( response_.Content == null ) ? string.Empty : await response_.Content.ReadAsStringAsync().ConfigureAwait(false);
|
|
throw new ApiException("Too Many Requests. Limit 10 req/sec", 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>Get review details by kinopoisk review id</summary>
|
|
/// <param name="reviewId">review id from kinopoisk</param>
|
|
/// <returns>Successful operation</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>Get review details by kinopoisk review id</summary>
|
|
/// <param name="reviewId">review id from kinopoisk</param>
|
|
/// <returns>Successful operation</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("Wrong or empty access token", status_, responseText_, headers_, null);
|
|
}
|
|
else
|
|
if (status_ == 404)
|
|
{
|
|
string responseText_ = ( response_.Content == null ) ? string.Empty : await response_.Content.ReadAsStringAsync().ConfigureAwait(false);
|
|
throw new ApiException("Review is not found", status_, responseText_, headers_, null);
|
|
}
|
|
else
|
|
if (status_ == 429)
|
|
{
|
|
string responseText_ = ( response_.Content == null ) ? string.Empty : await response_.Content.ReadAsStringAsync().ConfigureAwait(false);
|
|
throw new ApiException("Too Many Requests. Limit 10 req/sec", 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>Get staff by kinopoisk film id</summary>
|
|
/// <param name="filmId">film id from kinopoisk</param>
|
|
/// <returns>Successful operation</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>Get staff by kinopoisk film id</summary>
|
|
/// <param name="filmId">film id from kinopoisk</param>
|
|
/// <returns>Successful operation</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("Wrong or empty access token", status_, responseText_, headers_, null);
|
|
}
|
|
else
|
|
if (status_ == 404)
|
|
{
|
|
string responseText_ = ( response_.Content == null ) ? string.Empty : await response_.Content.ReadAsStringAsync().ConfigureAwait(false);
|
|
throw new ApiException("Staff is not found", status_, responseText_, headers_, null);
|
|
}
|
|
else
|
|
if (status_ == 429)
|
|
{
|
|
string responseText_ = ( response_.Content == null ) ? string.Empty : await response_.Content.ReadAsStringAsync().ConfigureAwait(false);
|
|
throw new ApiException("Too Many Requests. Limit 10 req/sec", 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>Get person data by kinopoisk person id</summary>
|
|
/// <param name="id">person id from kinopoisk</param>
|
|
/// <returns>Successful operation</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>Get person data by kinopoisk person id</summary>
|
|
/// <param name="id">person id from kinopoisk</param>
|
|
/// <returns>Successful operation</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("Wrong or empty access token", status_, responseText_, headers_, null);
|
|
}
|
|
else
|
|
if (status_ == 404)
|
|
{
|
|
string responseText_ = ( response_.Content == null ) ? string.Empty : await response_.Content.ReadAsStringAsync().ConfigureAwait(false);
|
|
throw new ApiException("Staff is not found", status_, responseText_, headers_, null);
|
|
}
|
|
else
|
|
if (status_ == 429)
|
|
{
|
|
string responseText_ = ( response_.Content == null ) ? string.Empty : await response_.Content.ReadAsStringAsync().ConfigureAwait(false);
|
|
throw new ApiException("Too Many Requests. Limit 10 req/sec", 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>Get sequels and prequels for particular film</summary>
|
|
/// <param name="id">film id from kinopoisk</param>
|
|
/// <returns>Successful operation</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>Get sequels and prequels for particular film</summary>
|
|
/// <param name="id">film id from kinopoisk</param>
|
|
/// <returns>Successful operation</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("Wrong or empty access token", status_, responseText_, headers_, null);
|
|
}
|
|
else
|
|
if (status_ == 404)
|
|
{
|
|
string responseText_ = ( response_.Content == null ) ? string.Empty : await response_.Content.ReadAsStringAsync().ConfigureAwait(false);
|
|
throw new ApiException("Film is not found", status_, responseText_, headers_, null);
|
|
}
|
|
else
|
|
if (status_ == 429)
|
|
{
|
|
string responseText_ = ( response_.Content == null ) ? string.Empty : await response_.Content.ReadAsStringAsync().ConfigureAwait(false);
|
|
throw new ApiException("Too Many Requests. Limit 10 req/sec", 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("data", Required = Newtonsoft.Json.Required.Always)]
|
|
[System.ComponentModel.DataAnnotations.Required]
|
|
public CommonFilmData Data { get; set; } = new CommonFilmData();
|
|
|
|
[Newtonsoft.Json.JsonProperty("rating", Required = Newtonsoft.Json.Required.Always)]
|
|
[System.ComponentModel.DataAnnotations.Required]
|
|
public Rating Rating { get; set; } = new Rating();
|
|
|
|
[Newtonsoft.Json.JsonProperty("budget", Required = Newtonsoft.Json.Required.Always)]
|
|
[System.ComponentModel.DataAnnotations.Required]
|
|
public Budget Budget { get; set; } = new Budget();
|
|
|
|
[Newtonsoft.Json.JsonProperty("review", Required = Newtonsoft.Json.Required.Always)]
|
|
[System.ComponentModel.DataAnnotations.Required]
|
|
public Review Review { get; set; } = new Review();
|
|
|
|
[Newtonsoft.Json.JsonProperty("externalId", Required = Newtonsoft.Json.Required.Always)]
|
|
[System.ComponentModel.DataAnnotations.Required]
|
|
public ExternalId ExternalId { get; set; } = new ExternalId();
|
|
|
|
[Newtonsoft.Json.JsonProperty("images", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)]
|
|
public Images Images { 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("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 CommonFilmData
|
|
{
|
|
[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("webUrl", Required = Newtonsoft.Json.Required.Always)]
|
|
[System.ComponentModel.DataAnnotations.Required(AllowEmptyStrings = true)]
|
|
public string WebUrl { 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("year", Required = Newtonsoft.Json.Required.Always)]
|
|
[System.ComponentModel.DataAnnotations.Required(AllowEmptyStrings = true)]
|
|
public string Year { get; set; }
|
|
|
|
[Newtonsoft.Json.JsonProperty("filmLength", Required = Newtonsoft.Json.Required.Always)]
|
|
[System.ComponentModel.DataAnnotations.Required(AllowEmptyStrings = true)]
|
|
public string 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("type", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)]
|
|
[Newtonsoft.Json.JsonConverter(typeof(Newtonsoft.Json.Converters.StringEnumConverter))]
|
|
public CommonFilmDataType 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)]
|
|
public int RatingAgeLimits { get; set; }
|
|
|
|
[Newtonsoft.Json.JsonProperty("premiereRu", Required = Newtonsoft.Json.Required.Always)]
|
|
[System.ComponentModel.DataAnnotations.Required(AllowEmptyStrings = true)]
|
|
public string PremiereRu { get; set; }
|
|
|
|
[Newtonsoft.Json.JsonProperty("distributors", Required = Newtonsoft.Json.Required.Always)]
|
|
[System.ComponentModel.DataAnnotations.Required(AllowEmptyStrings = true)]
|
|
public string Distributors { get; set; }
|
|
|
|
[Newtonsoft.Json.JsonProperty("premiereWorld", Required = Newtonsoft.Json.Required.Always)]
|
|
[System.ComponentModel.DataAnnotations.Required(AllowEmptyStrings = true)]
|
|
public string PremiereWorld { get; set; }
|
|
|
|
[Newtonsoft.Json.JsonProperty("premiereDigital", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)]
|
|
public string PremiereDigital { get; set; }
|
|
|
|
[Newtonsoft.Json.JsonProperty("premiereWorldCountry", Required = Newtonsoft.Json.Required.Always)]
|
|
[System.ComponentModel.DataAnnotations.Required(AllowEmptyStrings = true)]
|
|
public string PremiereWorldCountry { get; set; }
|
|
|
|
[Newtonsoft.Json.JsonProperty("premiereDvd", Required = Newtonsoft.Json.Required.Always)]
|
|
[System.ComponentModel.DataAnnotations.Required(AllowEmptyStrings = true)]
|
|
public string PremiereDvd { get; set; }
|
|
|
|
[Newtonsoft.Json.JsonProperty("premiereBluRay", Required = Newtonsoft.Json.Required.Always)]
|
|
[System.ComponentModel.DataAnnotations.Required(AllowEmptyStrings = true)]
|
|
public string PremiereBluRay { get; set; }
|
|
|
|
[Newtonsoft.Json.JsonProperty("distributorRelease", Required = Newtonsoft.Json.Required.Always)]
|
|
[System.ComponentModel.DataAnnotations.Required(AllowEmptyStrings = true)]
|
|
public string DistributorRelease { 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("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("seasons", Required = Newtonsoft.Json.Required.Always)]
|
|
[System.ComponentModel.DataAnnotations.Required]
|
|
public System.Collections.Generic.ICollection<Season> Seasons { 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 Rating
|
|
{
|
|
[Newtonsoft.Json.JsonProperty("rating", Required = Newtonsoft.Json.Required.Always)]
|
|
public double Rating1 { get; set; }
|
|
|
|
[Newtonsoft.Json.JsonProperty("ratingVoteCount", Required = Newtonsoft.Json.Required.Always)]
|
|
public int RatingVoteCount { 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)]
|
|
[System.ComponentModel.DataAnnotations.Required(AllowEmptyStrings = true)]
|
|
public string 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.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)]
|
|
public string RatingAwait { get; set; }
|
|
|
|
[Newtonsoft.Json.JsonProperty("ratingAwaitCount", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)]
|
|
public int RatingAwaitCount { get; set; }
|
|
|
|
[Newtonsoft.Json.JsonProperty("ratingRfCritics", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)]
|
|
public string RatingRfCritics { get; set; }
|
|
|
|
[Newtonsoft.Json.JsonProperty("ratingRfCriticsVoteCount", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)]
|
|
public int RatingRfCriticsVoteCount { 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 Budget
|
|
{
|
|
[Newtonsoft.Json.JsonProperty("grossRu", Required = Newtonsoft.Json.Required.Always)]
|
|
public int GrossRu { get; set; }
|
|
|
|
[Newtonsoft.Json.JsonProperty("grossUsa", Required = Newtonsoft.Json.Required.Always)]
|
|
public int GrossUsa { get; set; }
|
|
|
|
[Newtonsoft.Json.JsonProperty("grossWorld", Required = Newtonsoft.Json.Required.Always)]
|
|
public int GrossWorld { get; set; }
|
|
|
|
[Newtonsoft.Json.JsonProperty("budget", Required = Newtonsoft.Json.Required.Always)]
|
|
[System.ComponentModel.DataAnnotations.Required(AllowEmptyStrings = true)]
|
|
public string Budget1 { get; set; }
|
|
|
|
[Newtonsoft.Json.JsonProperty("marketing", Required = Newtonsoft.Json.Required.Always)]
|
|
public int Marketing { 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 Review
|
|
{
|
|
[Newtonsoft.Json.JsonProperty("reviewsCount", Required = Newtonsoft.Json.Required.Always)]
|
|
public int ReviewsCount { get; set; }
|
|
|
|
[Newtonsoft.Json.JsonProperty("ratingGoodReview", Required = Newtonsoft.Json.Required.Always)]
|
|
[System.ComponentModel.DataAnnotations.Required(AllowEmptyStrings = true)]
|
|
public string RatingGoodReview { get; set; }
|
|
|
|
[Newtonsoft.Json.JsonProperty("ratingGoodReviewVoteCount", Required = Newtonsoft.Json.Required.Always)]
|
|
public int RatingGoodReviewVoteCount { 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 ExternalId
|
|
{
|
|
[Newtonsoft.Json.JsonProperty("imdbId", Required = Newtonsoft.Json.Required.Always)]
|
|
[System.ComponentModel.DataAnnotations.Required(AllowEmptyStrings = true)]
|
|
public string ImdbId { 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("trailers", Required = Newtonsoft.Json.Required.Always)]
|
|
[System.ComponentModel.DataAnnotations.Required]
|
|
public System.Collections.Generic.ICollection<VideoResponse_trailers> Trailers { get; set; } = new System.Collections.ObjectModel.Collection<VideoResponse_trailers>();
|
|
|
|
[Newtonsoft.Json.JsonProperty("teasers", Required = Newtonsoft.Json.Required.Always)]
|
|
[System.ComponentModel.DataAnnotations.Required]
|
|
public System.Collections.Generic.ICollection<VideoResponse_teasers> Teasers { get; set; } = new System.Collections.ObjectModel.Collection<VideoResponse_teasers>();
|
|
|
|
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 FilmStudioResponse
|
|
{
|
|
[Newtonsoft.Json.JsonProperty("production", Required = Newtonsoft.Json.Required.Always)]
|
|
[System.ComponentModel.DataAnnotations.Required(AllowEmptyStrings = true)]
|
|
public string Production { get; set; }
|
|
|
|
[Newtonsoft.Json.JsonProperty("filming", Required = Newtonsoft.Json.Required.Always)]
|
|
[System.ComponentModel.DataAnnotations.Required(AllowEmptyStrings = true)]
|
|
public string Filming { get; set; }
|
|
|
|
[Newtonsoft.Json.JsonProperty("imageFormat", Required = Newtonsoft.Json.Required.Always)]
|
|
[System.ComponentModel.DataAnnotations.Required(AllowEmptyStrings = true)]
|
|
public string ImageFormat { get; set; }
|
|
|
|
[Newtonsoft.Json.JsonProperty("camera", Required = Newtonsoft.Json.Required.Always)]
|
|
[System.ComponentModel.DataAnnotations.Required(AllowEmptyStrings = true)]
|
|
public string Camera { get; set; }
|
|
|
|
[Newtonsoft.Json.JsonProperty("copyFormat", Required = Newtonsoft.Json.Required.Always)]
|
|
[System.ComponentModel.DataAnnotations.Required(AllowEmptyStrings = true)]
|
|
public string CopyFormat { get; set; }
|
|
|
|
[Newtonsoft.Json.JsonProperty("filmingFormat", Required = Newtonsoft.Json.Required.Always)]
|
|
[System.ComponentModel.DataAnnotations.Required(AllowEmptyStrings = true)]
|
|
public string FilmingFormat { get; set; }
|
|
|
|
[Newtonsoft.Json.JsonProperty("image", Required = Newtonsoft.Json.Required.Always)]
|
|
[System.ComponentModel.DataAnnotations.Required(AllowEmptyStrings = true)]
|
|
public string Image { get; set; }
|
|
|
|
[Newtonsoft.Json.JsonProperty("language", Required = Newtonsoft.Json.Required.Always)]
|
|
[System.ComponentModel.DataAnnotations.Required(AllowEmptyStrings = true)]
|
|
public string Language { get; set; }
|
|
|
|
[Newtonsoft.Json.JsonProperty("productionStudios", Required = Newtonsoft.Json.Required.Always)]
|
|
[System.ComponentModel.DataAnnotations.Required]
|
|
public System.Collections.Generic.ICollection<FilmStudioResponse_productionStudios> ProductionStudios { get; set; } = new System.Collections.ObjectModel.Collection<FilmStudioResponse_productionStudios>();
|
|
|
|
[Newtonsoft.Json.JsonProperty("specialEffectsStudios", Required = Newtonsoft.Json.Required.Always)]
|
|
[System.ComponentModel.DataAnnotations.Required]
|
|
public System.Collections.Generic.ICollection<FilmStudioResponse_specialEffectsStudios> SpecialEffectsStudios { get; set; } = new System.Collections.ObjectModel.Collection<FilmStudioResponse_specialEffectsStudios>();
|
|
|
|
[Newtonsoft.Json.JsonProperty("dubbingStudios", Required = Newtonsoft.Json.Required.Always)]
|
|
[System.ComponentModel.DataAnnotations.Required]
|
|
public System.Collections.Generic.ICollection<FilmStudioResponse_dubbingStudios> DubbingStudios { get; set; } = new System.Collections.ObjectModel.Collection<FilmStudioResponse_dubbingStudios>();
|
|
|
|
[Newtonsoft.Json.JsonProperty("rentStudios", Required = Newtonsoft.Json.Required.Always)]
|
|
[System.ComponentModel.DataAnnotations.Required]
|
|
public System.Collections.Generic.ICollection<FilmStudioResponse_rentStudios> RentStudios { get; set; } = new System.Collections.ObjectModel.Collection<FilmStudioResponse_rentStudios>();
|
|
|
|
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 Images
|
|
{
|
|
[Newtonsoft.Json.JsonProperty("posters", Required = Newtonsoft.Json.Required.Always)]
|
|
[System.ComponentModel.DataAnnotations.Required]
|
|
public System.Collections.Generic.ICollection<Images_posters> Posters { get; set; } = new System.Collections.ObjectModel.Collection<Images_posters>();
|
|
|
|
[Newtonsoft.Json.JsonProperty("backdrops", Required = Newtonsoft.Json.Required.Always)]
|
|
[System.ComponentModel.DataAnnotations.Required]
|
|
public System.Collections.Generic.ICollection<Images_posters> Backdrops { get; set; } = new System.Collections.ObjectModel.Collection<Images_posters>();
|
|
|
|
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("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_trailers
|
|
{
|
|
[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)]
|
|
public string Site { get; set; }
|
|
|
|
[Newtonsoft.Json.JsonProperty("size", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)]
|
|
public int Size { get; set; }
|
|
|
|
[Newtonsoft.Json.JsonProperty("type", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)]
|
|
public string Type { 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_teasers
|
|
{
|
|
[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)]
|
|
public string Site { get; set; }
|
|
|
|
[Newtonsoft.Json.JsonProperty("size", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)]
|
|
public int Size { get; set; }
|
|
|
|
[Newtonsoft.Json.JsonProperty("type", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)]
|
|
public string Type { 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 FilmStudioResponse_productionStudios
|
|
{
|
|
[Newtonsoft.Json.JsonProperty("name", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)]
|
|
public string Name { get; set; }
|
|
|
|
[Newtonsoft.Json.JsonProperty("notes", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)]
|
|
public string Notes { 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 FilmStudioResponse_specialEffectsStudios
|
|
{
|
|
[Newtonsoft.Json.JsonProperty("name", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)]
|
|
public string Name { get; set; }
|
|
|
|
[Newtonsoft.Json.JsonProperty("notes", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)]
|
|
public string Notes { 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 FilmStudioResponse_dubbingStudios
|
|
{
|
|
[Newtonsoft.Json.JsonProperty("name", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)]
|
|
public string Name { get; set; }
|
|
|
|
[Newtonsoft.Json.JsonProperty("notes", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)]
|
|
public string Notes { 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 FilmStudioResponse_rentStudios
|
|
{
|
|
[Newtonsoft.Json.JsonProperty("name", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)]
|
|
public string Name { get; set; }
|
|
|
|
[Newtonsoft.Json.JsonProperty("notes", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)]
|
|
public string Notes { 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 Images_posters
|
|
{
|
|
[Newtonsoft.Json.JsonProperty("language", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)]
|
|
public string Language { get; set; }
|
|
|
|
[Newtonsoft.Json.JsonProperty("url", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)]
|
|
public string Url { get; set; }
|
|
|
|
[Newtonsoft.Json.JsonProperty("height", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)]
|
|
public int Height { get; set; }
|
|
|
|
[Newtonsoft.Json.JsonProperty("width", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)]
|
|
public int Width { 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 Anonymous
|
|
{
|
|
[System.Runtime.Serialization.EnumMember(Value = @"BUDGET")]
|
|
BUDGET = 0,
|
|
|
|
[System.Runtime.Serialization.EnumMember(Value = @"RATING")]
|
|
RATING = 1,
|
|
|
|
[System.Runtime.Serialization.EnumMember(Value = @"REVIEW")]
|
|
REVIEW = 2,
|
|
|
|
[System.Runtime.Serialization.EnumMember(Value = @"POSTERS")]
|
|
POSTERS = 3,
|
|
|
|
}
|
|
|
|
[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 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 CommonFilmDataType
|
|
{
|
|
[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 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("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
|