/*
* FHT.Core.API 1.0
*
* ̨group.apiVersion:1.0
*
* OpenAPI spec version: v1
* Contact: fht@fht360.com
* Generated by: https://github.com/swagger-api/swagger-codegen.git
*/
using System;
using System.Collections.Generic;
using System.Collections.ObjectModel;
using System.Linq;
using System.Net.Http;
using IO.Swagger.Client;
using IO.Swagger.Model;
namespace IO.Swagger.Api
{
///
/// Represents a collection of functions to interact with the API endpoints
///
public interface IHistoryApiApi : IApiAccessor
{
#region Synchronous Operations
///
///
///
///
///
///
/// Thrown when fails to make API call
///
///
void HistoryApiBatchDeleteHistoryAsync (TimeStampsInputModel model);
///
///
///
///
///
///
/// Thrown when fails to make API call
///
/// ApiResponse of Object(void)
ApiResponse HistoryApiBatchDeleteHistoryAsyncWithHttpInfo (TimeStampsInputModel model);
///
///
///
///
///
///
/// Thrown when fails to make API call
///
///
///
/// NumberViewModel
NumberViewModel HistoryApiRecentVisitUnreadNumAsync (string ownerType, long? cursorCursor, int? cursorLimit);
///
///
///
///
///
///
/// Thrown when fails to make API call
///
///
///
/// ApiResponse of NumberViewModel
ApiResponse HistoryApiRecentVisitUnreadNumAsyncWithHttpInfo (string ownerType, long? cursorCursor, int? cursorLimit);
///
///
///
///
///
///
/// Thrown when fails to make API call
///
///
///
/// CursorPaginationResultRecentVisitDetailViewModel
CursorPaginationResultRecentVisitDetailViewModel HistoryApiRecentVisitsAsync (string ownerType, long? cursorCursor, int? cursorLimit);
///
///
///
///
///
///
/// Thrown when fails to make API call
///
///
///
/// ApiResponse of CursorPaginationResultRecentVisitDetailViewModel
ApiResponse HistoryApiRecentVisitsAsyncWithHttpInfo (string ownerType, long? cursorCursor, int? cursorLimit);
///
///
///
///
///
///
/// Thrown when fails to make API call
///
///
/// CursorPaginationResultGenericItemViewModelViewingHistoryExtraViewModel
CursorPaginationResultGenericItemViewModelViewingHistoryExtraViewModel HistoryApiViewingHistoryAsync (long? cursorCursor, int? cursorLimit);
///
///
///
///
///
///
/// Thrown when fails to make API call
///
///
/// ApiResponse of CursorPaginationResultGenericItemViewModelViewingHistoryExtraViewModel
ApiResponse HistoryApiViewingHistoryAsyncWithHttpInfo (long? cursorCursor, int? cursorLimit);
#endregion Synchronous Operations
#region Asynchronous Operations
///
///
///
///
///
///
/// Thrown when fails to make API call
///
/// Task of void
System.Threading.Tasks.Task HistoryApiBatchDeleteHistoryAsyncAsync (TimeStampsInputModel model);
///
///
///
///
///
///
/// Thrown when fails to make API call
///
/// Task of ApiResponse
System.Threading.Tasks.Task> HistoryApiBatchDeleteHistoryAsyncAsyncWithHttpInfo (TimeStampsInputModel model);
///
///
///
///
///
///
/// Thrown when fails to make API call
///
///
///
/// Task of NumberViewModel
System.Threading.Tasks.Task HistoryApiRecentVisitUnreadNumAsyncAsync (string ownerType, long? cursorCursor, int? cursorLimit);
///
///
///
///
///
///
/// Thrown when fails to make API call
///
///
///
/// Task of ApiResponse (NumberViewModel)
System.Threading.Tasks.Task> HistoryApiRecentVisitUnreadNumAsyncAsyncWithHttpInfo (string ownerType, long? cursorCursor, int? cursorLimit);
///
///
///
///
///
///
/// Thrown when fails to make API call
///
///
///
/// Task of CursorPaginationResultRecentVisitDetailViewModel
System.Threading.Tasks.Task HistoryApiRecentVisitsAsyncAsync (string ownerType, long? cursorCursor, int? cursorLimit);
///
///
///
///
///
///
/// Thrown when fails to make API call
///
///
///
/// Task of ApiResponse (CursorPaginationResultRecentVisitDetailViewModel)
System.Threading.Tasks.Task> HistoryApiRecentVisitsAsyncAsyncWithHttpInfo (string ownerType, long? cursorCursor, int? cursorLimit);
///
///
///
///
///
///
/// Thrown when fails to make API call
///
///
/// Task of CursorPaginationResultGenericItemViewModelViewingHistoryExtraViewModel
System.Threading.Tasks.Task HistoryApiViewingHistoryAsyncAsync (long? cursorCursor, int? cursorLimit);
///
///
///
///
///
///
/// Thrown when fails to make API call
///
///
/// Task of ApiResponse (CursorPaginationResultGenericItemViewModelViewingHistoryExtraViewModel)
System.Threading.Tasks.Task> HistoryApiViewingHistoryAsyncAsyncWithHttpInfo (long? cursorCursor, int? cursorLimit);
#endregion Asynchronous Operations
}
///
/// Represents a collection of functions to interact with the API endpoints
///
public partial class HistoryApiApi : IHistoryApiApi
{
private IO.Swagger.Client.ExceptionFactory _exceptionFactory = (name, response) => null;
///
/// Initializes a new instance of the class
/// using Configuration object
///
/// An instance of Configuration
///
public HistoryApiApi(Configuration configuration)
{
this.Configuration = configuration;
ExceptionFactory = IO.Swagger.Client.Configuration.DefaultExceptionFactory;
// ensure API client has configuration ready
if (Configuration.ApiClient.Configuration == null)
{
this.Configuration.ApiClient.Configuration = this.Configuration;
}
}
///
/// Gets or sets the configuration object
///
/// An instance of the Configuration
public Configuration Configuration {get; set;}
///
/// Provides a factory method hook for the creation of exceptions.
///
public IO.Swagger.Client.ExceptionFactory ExceptionFactory
{
get
{
if (_exceptionFactory != null && _exceptionFactory.GetInvocationList().Length > 1)
{
throw new InvalidOperationException("Multicast delegate for ExceptionFactory is unsupported.");
}
return _exceptionFactory;
}
set { _exceptionFactory = value; }
}
///
///
///
/// Thrown when fails to make API call
///
///
public void HistoryApiBatchDeleteHistoryAsync (TimeStampsInputModel model)
{
HistoryApiBatchDeleteHistoryAsyncWithHttpInfo(model);
}
///
///
///
/// Thrown when fails to make API call
///
/// ApiResponse of Object(void)
public ApiResponse HistoryApiBatchDeleteHistoryAsyncWithHttpInfo (TimeStampsInputModel model)
{
// verify the required parameter 'model' is set
if (model == null)
throw new ApiException(400, "Missing required parameter 'model' when calling HistoryApiApi->HistoryApiBatchDeleteHistoryAsync");
var localVarPath = "/v1/batchdeletehistories";
var localVarQueryParams = new Dictionary();
var localVarHeaderParams = new Dictionary(Configuration.DefaultHeader);
var localVarFormParams = new Dictionary();
string localVarPostBody = null;
// to determine the Content-Type header
String[] localVarHttpContentTypes = new String[] {
"application/vnd.fht360.enumAsString+json",
"application/vnd.fht360.preserveCircularReference+json",
"application/json",
"text/json",
"application/xml",
"text/xml",
"application/x-www-form-urlencoded"
};
String localVarHttpContentType = Configuration.ApiClient.SelectHeaderContentType(localVarHttpContentTypes);
// to determine the Accept header
String[] localVarHttpHeaderAccepts = new String[] {
};
String localVarHttpHeaderAccept = Configuration.ApiClient.SelectHeaderAccept(localVarHttpHeaderAccepts);
if (localVarHttpHeaderAccept != null)
localVarHeaderParams.Add("Accept", localVarHttpHeaderAccept);
localVarPostBody = Configuration.ApiClient.Serialize(model); // http body (model) parameter
// make the HTTP request
var localVarResponse = Configuration.ApiClient.CallApi(localVarPath,
"POST", localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams,
localVarHttpContentType);
int localVarStatusCode = (int) localVarResponse.StatusCode;
if (ExceptionFactory != null)
{
Exception exception = ExceptionFactory("HistoryApiBatchDeleteHistoryAsync", localVarResponse);
if (exception != null) throw exception;
}
return new ApiResponse(localVarStatusCode,
localVarResponse.Headers.ToDictionary(x => x.Key, x => x.Value.ToString()),
null);
}
///
///
///
/// Thrown when fails to make API call
///
/// Task of void
public async System.Threading.Tasks.Task HistoryApiBatchDeleteHistoryAsyncAsync (TimeStampsInputModel model)
{
await HistoryApiBatchDeleteHistoryAsyncAsyncWithHttpInfo(model);
}
///
///
///
/// Thrown when fails to make API call
///
/// Task of ApiResponse
public async System.Threading.Tasks.Task> HistoryApiBatchDeleteHistoryAsyncAsyncWithHttpInfo (TimeStampsInputModel model)
{
// verify the required parameter 'model' is set
if (model == null)
throw new ApiException(400, "Missing required parameter 'model' when calling HistoryApiApi->HistoryApiBatchDeleteHistoryAsync");
var localVarPath = "/v1/batchdeletehistories";
var localVarQueryParams = new Dictionary();
var localVarHeaderParams = new Dictionary(Configuration.DefaultHeader);
var localVarFormParams = new Dictionary();
string localVarPostBody = null;
// to determine the Content-Type header
String[] localVarHttpContentTypes = new String[] {
"application/vnd.fht360.enumAsString+json",
"application/vnd.fht360.preserveCircularReference+json",
"application/json",
"text/json",
"application/xml",
"text/xml",
"application/x-www-form-urlencoded"
};
String localVarHttpContentType = Configuration.ApiClient.SelectHeaderContentType(localVarHttpContentTypes);
// to determine the Accept header
String[] localVarHttpHeaderAccepts = new String[] {
};
String localVarHttpHeaderAccept = Configuration.ApiClient.SelectHeaderAccept(localVarHttpHeaderAccepts);
if (localVarHttpHeaderAccept != null)
localVarHeaderParams.Add("Accept", localVarHttpHeaderAccept);
localVarPostBody = Configuration.ApiClient.Serialize(model); // http body (model) parameter
// make the HTTP request
var localVarResponse = await Configuration.ApiClient.CallApiAsync(localVarPath,
"POST", localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams,
localVarHttpContentType);
int localVarStatusCode = (int) localVarResponse.StatusCode;
if (ExceptionFactory != null)
{
Exception exception = ExceptionFactory("HistoryApiBatchDeleteHistoryAsync", localVarResponse);
if (exception != null) throw exception;
}
return new ApiResponse(localVarStatusCode,
localVarResponse.Headers.ToDictionary(x => x.Key, x => x.Value.ToString()),
null);
}
///
///
///
/// Thrown when fails to make API call
///
///
///
/// NumberViewModel
public NumberViewModel HistoryApiRecentVisitUnreadNumAsync (string ownerType, long? cursorCursor, int? cursorLimit)
{
ApiResponse localVarResponse = HistoryApiRecentVisitUnreadNumAsyncWithHttpInfo(ownerType, cursorCursor, cursorLimit);
return localVarResponse.Data;
}
///
///
///
/// Thrown when fails to make API call
///
///
///
/// ApiResponse of NumberViewModel
public ApiResponse< NumberViewModel > HistoryApiRecentVisitUnreadNumAsyncWithHttpInfo (string ownerType, long? cursorCursor, int? cursorLimit)
{
// verify the required parameter 'ownerType' is set
if (ownerType == null)
throw new ApiException(400, "Missing required parameter 'ownerType' when calling HistoryApiApi->HistoryApiRecentVisitUnreadNumAsync");
// verify the required parameter 'cursorCursor' is set
if (cursorCursor == null)
throw new ApiException(400, "Missing required parameter 'cursorCursor' when calling HistoryApiApi->HistoryApiRecentVisitUnreadNumAsync");
// verify the required parameter 'cursorLimit' is set
if (cursorLimit == null)
throw new ApiException(400, "Missing required parameter 'cursorLimit' when calling HistoryApiApi->HistoryApiRecentVisitUnreadNumAsync");
var localVarPath = "/v1/recentvisitunreadnum";
var localVarQueryParams = new Dictionary();
var localVarHeaderParams = new Dictionary(Configuration.DefaultHeader);
var localVarFormParams = new Dictionary();
string localVarPostBody = null;
// to determine the Content-Type header
String[] localVarHttpContentTypes = new String[] {
};
String localVarHttpContentType = Configuration.ApiClient.SelectHeaderContentType(localVarHttpContentTypes);
// to determine the Accept header
String[] localVarHttpHeaderAccepts = new String[] {
"application/vnd.fht360.enumAsString+json",
"application/vnd.fht360.preserveCircularReference+json",
"application/json",
"text/json",
"application/xml",
"text/xml"
};
String localVarHttpHeaderAccept = Configuration.ApiClient.SelectHeaderAccept(localVarHttpHeaderAccepts);
if (localVarHttpHeaderAccept != null)
localVarHeaderParams.Add("Accept", localVarHttpHeaderAccept);
if (ownerType != null) localVarQueryParams.Add("ownerType", Configuration.ApiClient.ParameterToString(ownerType)); // query parameter
if (cursorCursor != null) localVarQueryParams.Add("cursor.cursor", Configuration.ApiClient.ParameterToString(cursorCursor)); // query parameter
if (cursorLimit != null) localVarQueryParams.Add("cursor.limit", Configuration.ApiClient.ParameterToString(cursorLimit)); // query parameter
// make the HTTP request
var localVarResponse = Configuration.ApiClient.CallApi(localVarPath,
"GET", localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams,
localVarHttpContentType);
int localVarStatusCode = (int) localVarResponse.StatusCode;
if (ExceptionFactory != null)
{
Exception exception = ExceptionFactory("HistoryApiRecentVisitUnreadNumAsync", localVarResponse);
if (exception != null) throw exception;
}
return new ApiResponse(localVarStatusCode,
localVarResponse.Headers.ToDictionary(x => x.Key, x => x.Value.ToString()),
(NumberViewModel) Configuration.ApiClient.Deserialize(localVarResponse.Content.ReadAsStringAsync().Result, typeof(NumberViewModel)));
}
///
///
///
/// Thrown when fails to make API call
///
///
///
/// Task of NumberViewModel
public async System.Threading.Tasks.Task HistoryApiRecentVisitUnreadNumAsyncAsync (string ownerType, long? cursorCursor, int? cursorLimit)
{
ApiResponse localVarResponse = await HistoryApiRecentVisitUnreadNumAsyncAsyncWithHttpInfo(ownerType, cursorCursor, cursorLimit);
return localVarResponse.Data;
}
///
///
///
/// Thrown when fails to make API call
///
///
///
/// Task of ApiResponse (NumberViewModel)
public async System.Threading.Tasks.Task> HistoryApiRecentVisitUnreadNumAsyncAsyncWithHttpInfo (string ownerType, long? cursorCursor, int? cursorLimit)
{
// verify the required parameter 'ownerType' is set
if (ownerType == null)
throw new ApiException(400, "Missing required parameter 'ownerType' when calling HistoryApiApi->HistoryApiRecentVisitUnreadNumAsync");
// verify the required parameter 'cursorCursor' is set
if (cursorCursor == null)
throw new ApiException(400, "Missing required parameter 'cursorCursor' when calling HistoryApiApi->HistoryApiRecentVisitUnreadNumAsync");
// verify the required parameter 'cursorLimit' is set
if (cursorLimit == null)
throw new ApiException(400, "Missing required parameter 'cursorLimit' when calling HistoryApiApi->HistoryApiRecentVisitUnreadNumAsync");
var localVarPath = "/v1/recentvisitunreadnum";
var localVarQueryParams = new Dictionary();
var localVarHeaderParams = new Dictionary(Configuration.DefaultHeader);
var localVarFormParams = new Dictionary();
string localVarPostBody = null;
// to determine the Content-Type header
String[] localVarHttpContentTypes = new String[] {
};
String localVarHttpContentType = Configuration.ApiClient.SelectHeaderContentType(localVarHttpContentTypes);
// to determine the Accept header
String[] localVarHttpHeaderAccepts = new String[] {
"application/vnd.fht360.enumAsString+json",
"application/vnd.fht360.preserveCircularReference+json",
"application/json",
"text/json",
"application/xml",
"text/xml"
};
String localVarHttpHeaderAccept = Configuration.ApiClient.SelectHeaderAccept(localVarHttpHeaderAccepts);
if (localVarHttpHeaderAccept != null)
localVarHeaderParams.Add("Accept", localVarHttpHeaderAccept);
if (ownerType != null) localVarQueryParams.Add("ownerType", Configuration.ApiClient.ParameterToString(ownerType)); // query parameter
if (cursorCursor != null) localVarQueryParams.Add("cursor.cursor", Configuration.ApiClient.ParameterToString(cursorCursor)); // query parameter
if (cursorLimit != null) localVarQueryParams.Add("cursor.limit", Configuration.ApiClient.ParameterToString(cursorLimit)); // query parameter
// make the HTTP request
var localVarResponse = await Configuration.ApiClient.CallApiAsync(localVarPath,
"GET", localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams,
localVarHttpContentType);
int localVarStatusCode = (int) localVarResponse.StatusCode;
if (ExceptionFactory != null)
{
Exception exception = ExceptionFactory("HistoryApiRecentVisitUnreadNumAsync", localVarResponse);
if (exception != null) throw exception;
}
return new ApiResponse(localVarStatusCode,
localVarResponse.Headers.ToDictionary(x => x.Key, x => x.Value.ToString()),
(NumberViewModel) Configuration.ApiClient.Deserialize(await localVarResponse.Content.ReadAsStringAsync(), typeof(NumberViewModel)));
}
///
///
///
/// Thrown when fails to make API call
///
///
///
/// CursorPaginationResultRecentVisitDetailViewModel
public CursorPaginationResultRecentVisitDetailViewModel HistoryApiRecentVisitsAsync (string ownerType, long? cursorCursor, int? cursorLimit)
{
ApiResponse localVarResponse = HistoryApiRecentVisitsAsyncWithHttpInfo(ownerType, cursorCursor, cursorLimit);
return localVarResponse.Data;
}
///
///
///
/// Thrown when fails to make API call
///
///
///
/// ApiResponse of CursorPaginationResultRecentVisitDetailViewModel
public ApiResponse< CursorPaginationResultRecentVisitDetailViewModel > HistoryApiRecentVisitsAsyncWithHttpInfo (string ownerType, long? cursorCursor, int? cursorLimit)
{
// verify the required parameter 'ownerType' is set
if (ownerType == null)
throw new ApiException(400, "Missing required parameter 'ownerType' when calling HistoryApiApi->HistoryApiRecentVisitsAsync");
// verify the required parameter 'cursorCursor' is set
if (cursorCursor == null)
throw new ApiException(400, "Missing required parameter 'cursorCursor' when calling HistoryApiApi->HistoryApiRecentVisitsAsync");
// verify the required parameter 'cursorLimit' is set
if (cursorLimit == null)
throw new ApiException(400, "Missing required parameter 'cursorLimit' when calling HistoryApiApi->HistoryApiRecentVisitsAsync");
var localVarPath = "/v1/recentVisits";
var localVarQueryParams = new Dictionary();
var localVarHeaderParams = new Dictionary(Configuration.DefaultHeader);
var localVarFormParams = new Dictionary();
string localVarPostBody = null;
// to determine the Content-Type header
String[] localVarHttpContentTypes = new String[] {
};
String localVarHttpContentType = Configuration.ApiClient.SelectHeaderContentType(localVarHttpContentTypes);
// to determine the Accept header
String[] localVarHttpHeaderAccepts = new String[] {
"application/vnd.fht360.enumAsString+json",
"application/vnd.fht360.preserveCircularReference+json",
"application/json",
"text/json",
"application/xml",
"text/xml"
};
String localVarHttpHeaderAccept = Configuration.ApiClient.SelectHeaderAccept(localVarHttpHeaderAccepts);
if (localVarHttpHeaderAccept != null)
localVarHeaderParams.Add("Accept", localVarHttpHeaderAccept);
if (ownerType != null) localVarQueryParams.Add("ownerType", Configuration.ApiClient.ParameterToString(ownerType)); // query parameter
if (cursorCursor != null) localVarQueryParams.Add("cursor.cursor", Configuration.ApiClient.ParameterToString(cursorCursor)); // query parameter
if (cursorLimit != null) localVarQueryParams.Add("cursor.limit", Configuration.ApiClient.ParameterToString(cursorLimit)); // query parameter
// make the HTTP request
var localVarResponse = Configuration.ApiClient.CallApi(localVarPath,
"GET", localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams,
localVarHttpContentType);
int localVarStatusCode = (int) localVarResponse.StatusCode;
if (ExceptionFactory != null)
{
Exception exception = ExceptionFactory("HistoryApiRecentVisitsAsync", localVarResponse);
if (exception != null) throw exception;
}
return new ApiResponse(localVarStatusCode,
localVarResponse.Headers.ToDictionary(x => x.Key, x => x.Value.ToString()),
(CursorPaginationResultRecentVisitDetailViewModel) Configuration.ApiClient.Deserialize(localVarResponse.Content.ReadAsStringAsync().Result, typeof(CursorPaginationResultRecentVisitDetailViewModel)));
}
///
///
///
/// Thrown when fails to make API call
///
///
///
/// Task of CursorPaginationResultRecentVisitDetailViewModel
public async System.Threading.Tasks.Task HistoryApiRecentVisitsAsyncAsync (string ownerType, long? cursorCursor, int? cursorLimit)
{
ApiResponse localVarResponse = await HistoryApiRecentVisitsAsyncAsyncWithHttpInfo(ownerType, cursorCursor, cursorLimit);
return localVarResponse.Data;
}
///
///
///
/// Thrown when fails to make API call
///
///
///
/// Task of ApiResponse (CursorPaginationResultRecentVisitDetailViewModel)
public async System.Threading.Tasks.Task> HistoryApiRecentVisitsAsyncAsyncWithHttpInfo (string ownerType, long? cursorCursor, int? cursorLimit)
{
// verify the required parameter 'ownerType' is set
if (ownerType == null)
throw new ApiException(400, "Missing required parameter 'ownerType' when calling HistoryApiApi->HistoryApiRecentVisitsAsync");
// verify the required parameter 'cursorCursor' is set
if (cursorCursor == null)
throw new ApiException(400, "Missing required parameter 'cursorCursor' when calling HistoryApiApi->HistoryApiRecentVisitsAsync");
// verify the required parameter 'cursorLimit' is set
if (cursorLimit == null)
throw new ApiException(400, "Missing required parameter 'cursorLimit' when calling HistoryApiApi->HistoryApiRecentVisitsAsync");
var localVarPath = "/v1/recentVisits";
var localVarQueryParams = new Dictionary();
var localVarHeaderParams = new Dictionary(Configuration.DefaultHeader);
var localVarFormParams = new Dictionary();
string localVarPostBody = null;
// to determine the Content-Type header
String[] localVarHttpContentTypes = new String[] {
};
String localVarHttpContentType = Configuration.ApiClient.SelectHeaderContentType(localVarHttpContentTypes);
// to determine the Accept header
String[] localVarHttpHeaderAccepts = new String[] {
"application/vnd.fht360.enumAsString+json",
"application/vnd.fht360.preserveCircularReference+json",
"application/json",
"text/json",
"application/xml",
"text/xml"
};
String localVarHttpHeaderAccept = Configuration.ApiClient.SelectHeaderAccept(localVarHttpHeaderAccepts);
if (localVarHttpHeaderAccept != null)
localVarHeaderParams.Add("Accept", localVarHttpHeaderAccept);
if (ownerType != null) localVarQueryParams.Add("ownerType", Configuration.ApiClient.ParameterToString(ownerType)); // query parameter
if (cursorCursor != null) localVarQueryParams.Add("cursor.cursor", Configuration.ApiClient.ParameterToString(cursorCursor)); // query parameter
if (cursorLimit != null) localVarQueryParams.Add("cursor.limit", Configuration.ApiClient.ParameterToString(cursorLimit)); // query parameter
// make the HTTP request
var localVarResponse = await Configuration.ApiClient.CallApiAsync(localVarPath,
"GET", localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams,
localVarHttpContentType);
int localVarStatusCode = (int) localVarResponse.StatusCode;
if (ExceptionFactory != null)
{
Exception exception = ExceptionFactory("HistoryApiRecentVisitsAsync", localVarResponse);
if (exception != null) throw exception;
}
return new ApiResponse(localVarStatusCode,
localVarResponse.Headers.ToDictionary(x => x.Key, x => x.Value.ToString()),
(CursorPaginationResultRecentVisitDetailViewModel) Configuration.ApiClient.Deserialize(await localVarResponse.Content.ReadAsStringAsync(), typeof(CursorPaginationResultRecentVisitDetailViewModel)));
}
///
///
///
/// Thrown when fails to make API call
///
///
/// CursorPaginationResultGenericItemViewModelViewingHistoryExtraViewModel
public CursorPaginationResultGenericItemViewModelViewingHistoryExtraViewModel HistoryApiViewingHistoryAsync (long? cursorCursor, int? cursorLimit)
{
ApiResponse localVarResponse = HistoryApiViewingHistoryAsyncWithHttpInfo(cursorCursor, cursorLimit);
return localVarResponse.Data;
}
///
///
///
/// Thrown when fails to make API call
///
///
/// ApiResponse of CursorPaginationResultGenericItemViewModelViewingHistoryExtraViewModel
public ApiResponse< CursorPaginationResultGenericItemViewModelViewingHistoryExtraViewModel > HistoryApiViewingHistoryAsyncWithHttpInfo (long? cursorCursor, int? cursorLimit)
{
// verify the required parameter 'cursorCursor' is set
if (cursorCursor == null)
throw new ApiException(400, "Missing required parameter 'cursorCursor' when calling HistoryApiApi->HistoryApiViewingHistoryAsync");
// verify the required parameter 'cursorLimit' is set
if (cursorLimit == null)
throw new ApiException(400, "Missing required parameter 'cursorLimit' when calling HistoryApiApi->HistoryApiViewingHistoryAsync");
var localVarPath = "/v1/viewingHistories";
var localVarQueryParams = new Dictionary();
var localVarHeaderParams = new Dictionary(Configuration.DefaultHeader);
var localVarFormParams = new Dictionary();
string localVarPostBody = null;
// to determine the Content-Type header
String[] localVarHttpContentTypes = new String[] {
};
String localVarHttpContentType = Configuration.ApiClient.SelectHeaderContentType(localVarHttpContentTypes);
// to determine the Accept header
String[] localVarHttpHeaderAccepts = new String[] {
"application/vnd.fht360.enumAsString+json",
"application/vnd.fht360.preserveCircularReference+json",
"application/json",
"text/json",
"application/xml",
"text/xml"
};
String localVarHttpHeaderAccept = Configuration.ApiClient.SelectHeaderAccept(localVarHttpHeaderAccepts);
if (localVarHttpHeaderAccept != null)
localVarHeaderParams.Add("Accept", localVarHttpHeaderAccept);
if (cursorCursor != null) localVarQueryParams.Add("cursor.cursor", Configuration.ApiClient.ParameterToString(cursorCursor)); // query parameter
if (cursorLimit != null) localVarQueryParams.Add("cursor.limit", Configuration.ApiClient.ParameterToString(cursorLimit)); // query parameter
// make the HTTP request
var localVarResponse = Configuration.ApiClient.CallApi(localVarPath,
"GET", localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams,
localVarHttpContentType);
int localVarStatusCode = (int) localVarResponse.StatusCode;
if (ExceptionFactory != null)
{
Exception exception = ExceptionFactory("HistoryApiViewingHistoryAsync", localVarResponse);
if (exception != null) throw exception;
}
return new ApiResponse(localVarStatusCode,
localVarResponse.Headers.ToDictionary(x => x.Key, x => x.Value.ToString()),
(CursorPaginationResultGenericItemViewModelViewingHistoryExtraViewModel) Configuration.ApiClient.Deserialize(localVarResponse.Content.ReadAsStringAsync().Result, typeof(CursorPaginationResultGenericItemViewModelViewingHistoryExtraViewModel)));
}
///
///
///
/// Thrown when fails to make API call
///
///
/// Task of CursorPaginationResultGenericItemViewModelViewingHistoryExtraViewModel
public async System.Threading.Tasks.Task HistoryApiViewingHistoryAsyncAsync (long? cursorCursor, int? cursorLimit)
{
ApiResponse localVarResponse = await HistoryApiViewingHistoryAsyncAsyncWithHttpInfo(cursorCursor, cursorLimit);
return localVarResponse.Data;
}
///
///
///
/// Thrown when fails to make API call
///
///
/// Task of ApiResponse (CursorPaginationResultGenericItemViewModelViewingHistoryExtraViewModel)
public async System.Threading.Tasks.Task> HistoryApiViewingHistoryAsyncAsyncWithHttpInfo (long? cursorCursor, int? cursorLimit)
{
// verify the required parameter 'cursorCursor' is set
if (cursorCursor == null)
throw new ApiException(400, "Missing required parameter 'cursorCursor' when calling HistoryApiApi->HistoryApiViewingHistoryAsync");
// verify the required parameter 'cursorLimit' is set
if (cursorLimit == null)
throw new ApiException(400, "Missing required parameter 'cursorLimit' when calling HistoryApiApi->HistoryApiViewingHistoryAsync");
var localVarPath = "/v1/viewingHistories";
var localVarQueryParams = new Dictionary();
var localVarHeaderParams = new Dictionary(Configuration.DefaultHeader);
var localVarFormParams = new Dictionary();
string localVarPostBody = null;
// to determine the Content-Type header
String[] localVarHttpContentTypes = new String[] {
};
String localVarHttpContentType = Configuration.ApiClient.SelectHeaderContentType(localVarHttpContentTypes);
// to determine the Accept header
String[] localVarHttpHeaderAccepts = new String[] {
"application/vnd.fht360.enumAsString+json",
"application/vnd.fht360.preserveCircularReference+json",
"application/json",
"text/json",
"application/xml",
"text/xml"
};
String localVarHttpHeaderAccept = Configuration.ApiClient.SelectHeaderAccept(localVarHttpHeaderAccepts);
if (localVarHttpHeaderAccept != null)
localVarHeaderParams.Add("Accept", localVarHttpHeaderAccept);
if (cursorCursor != null) localVarQueryParams.Add("cursor.cursor", Configuration.ApiClient.ParameterToString(cursorCursor)); // query parameter
if (cursorLimit != null) localVarQueryParams.Add("cursor.limit", Configuration.ApiClient.ParameterToString(cursorLimit)); // query parameter
// make the HTTP request
var localVarResponse = await Configuration.ApiClient.CallApiAsync(localVarPath,
"GET", localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams,
localVarHttpContentType);
int localVarStatusCode = (int) localVarResponse.StatusCode;
if (ExceptionFactory != null)
{
Exception exception = ExceptionFactory("HistoryApiViewingHistoryAsync", localVarResponse);
if (exception != null) throw exception;
}
return new ApiResponse(localVarStatusCode,
localVarResponse.Headers.ToDictionary(x => x.Key, x => x.Value.ToString()),
(CursorPaginationResultGenericItemViewModelViewingHistoryExtraViewModel) Configuration.ApiClient.Deserialize(await localVarResponse.Content.ReadAsStringAsync(), typeof(CursorPaginationResultGenericItemViewModelViewingHistoryExtraViewModel)));
}
}
}