/*
* 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 IProductApiApi : IApiAccessor
{
#region Synchronous Operations
///
///
///
///
///
///
/// Thrown when fails to make API call
///
/// (optional)
/// List<StringViewModel>
List ProductApiAutoCompleteProducts (string q, int? categoryId = null);
///
///
///
///
///
///
/// Thrown when fails to make API call
///
/// (optional)
/// ApiResponse of List<StringViewModel>
ApiResponse> ProductApiAutoCompleteProductsWithHttpInfo (string q, int? categoryId = null);
///
///
///
///
///
///
/// Thrown when fails to make API call
/// 检索词
/// 分类编号 (optional)
/// List<CategoryAutoCompleteViewModel>
List ProductApiAutoCompleteSystemCategories (string q, int? id = null);
///
///
///
///
///
///
/// Thrown when fails to make API call
/// 检索词
/// 分类编号 (optional)
/// ApiResponse of List<CategoryAutoCompleteViewModel>
ApiResponse> ProductApiAutoCompleteSystemCategoriesWithHttpInfo (string q, int? id = null);
///
///
///
///
///
///
/// Thrown when fails to make API call
/// List<CategorySimpleViewModel>
List ProductApiGetAllSystemCategory ();
///
///
///
///
///
///
/// Thrown when fails to make API call
/// ApiResponse of List<CategorySimpleViewModel>
ApiResponse> ProductApiGetAllSystemCategoryWithHttpInfo ();
///
///
///
///
///
///
/// Thrown when fails to make API call
///
/// List<ProductRecommendViewModel>
List ProductApiGetHotProductsAsync (int? top);
///
///
///
///
///
///
/// Thrown when fails to make API call
///
/// ApiResponse of List<ProductRecommendViewModel>
ApiResponse> ProductApiGetHotProductsAsyncWithHttpInfo (int? top);
///
///
///
///
///
///
/// Thrown when fails to make API call
///
/// List<ProductRecommendViewModel>
List ProductApiGetLatestProductsAsync (int? top);
///
///
///
///
///
///
/// Thrown when fails to make API call
///
/// ApiResponse of List<ProductRecommendViewModel>
ApiResponse> ProductApiGetLatestProductsAsyncWithHttpInfo (int? top);
///
///
///
///
///
///
/// Thrown when fails to make API call
///
/// CollectionItemIdsViewModel
CollectionItemIdsViewModel ProductApiGetProductAreCollected (List productIds);
///
///
///
///
///
///
/// Thrown when fails to make API call
///
/// ApiResponse of CollectionItemIdsViewModel
ApiResponse ProductApiGetProductAreCollectedWithHttpInfo (List productIds);
///
///
///
///
///
///
/// Thrown when fails to make API call
/// 产品编号
/// WapProductDetailViewModel
WapProductDetailViewModel ProductApiGetProductDetail (long? id);
///
///
///
///
///
///
/// Thrown when fails to make API call
/// 产品编号
/// ApiResponse of WapProductDetailViewModel
ApiResponse ProductApiGetProductDetailWithHttpInfo (long? id);
///
///
///
///
///
///
/// Thrown when fails to make API call
/// 帖子编号
/// ProductPrevAndNextViewModel
ProductPrevAndNextViewModel ProductApiGetProductRelated (long? id);
///
///
///
///
///
///
/// Thrown when fails to make API call
/// 帖子编号
/// ApiResponse of ProductPrevAndNextViewModel
ApiResponse ProductApiGetProductRelatedWithHttpInfo (long? id);
///
///
///
///
///
///
/// Thrown when fails to make API call
/// 产品编号
/// List<ProductBondViewModel>
List ProductApiGetSimilarProducts (long? id);
///
///
///
///
///
///
/// Thrown when fails to make API call
/// 产品编号
/// ApiResponse of List<ProductBondViewModel>
ApiResponse> ProductApiGetSimilarProductsWithHttpInfo (long? id);
///
///
///
///
///
///
/// Thrown when fails to make API call
///
/// (optional, default to 10)
/// (optional, default to 0)
/// List<ProductBondViewModel>
List ProductApiSearchProductBonds (string q, int? limit = null, int? offset = null);
///
///
///
///
///
///
/// Thrown when fails to make API call
///
/// (optional, default to 10)
/// (optional, default to 0)
/// ApiResponse of List<ProductBondViewModel>
ApiResponse> ProductApiSearchProductBondsWithHttpInfo (string q, int? limit = null, int? offset = null);
#endregion Synchronous Operations
#region Asynchronous Operations
///
///
///
///
///
///
/// Thrown when fails to make API call
///
/// (optional)
/// Task of List<StringViewModel>
System.Threading.Tasks.Task> ProductApiAutoCompleteProductsAsync (string q, int? categoryId = null);
///
///
///
///
///
///
/// Thrown when fails to make API call
///
/// (optional)
/// Task of ApiResponse (List<StringViewModel>)
System.Threading.Tasks.Task>> ProductApiAutoCompleteProductsAsyncWithHttpInfo (string q, int? categoryId = null);
///
///
///
///
///
///
/// Thrown when fails to make API call
/// 检索词
/// 分类编号 (optional)
/// Task of List<CategoryAutoCompleteViewModel>
System.Threading.Tasks.Task> ProductApiAutoCompleteSystemCategoriesAsync (string q, int? id = null);
///
///
///
///
///
///
/// Thrown when fails to make API call
/// 检索词
/// 分类编号 (optional)
/// Task of ApiResponse (List<CategoryAutoCompleteViewModel>)
System.Threading.Tasks.Task>> ProductApiAutoCompleteSystemCategoriesAsyncWithHttpInfo (string q, int? id = null);
///
///
///
///
///
///
/// Thrown when fails to make API call
/// Task of List<CategorySimpleViewModel>
System.Threading.Tasks.Task> ProductApiGetAllSystemCategoryAsync ();
///
///
///
///
///
///
/// Thrown when fails to make API call
/// Task of ApiResponse (List<CategorySimpleViewModel>)
System.Threading.Tasks.Task>> ProductApiGetAllSystemCategoryAsyncWithHttpInfo ();
///
///
///
///
///
///
/// Thrown when fails to make API call
///
/// Task of List<ProductRecommendViewModel>
System.Threading.Tasks.Task> ProductApiGetHotProductsAsyncAsync (int? top);
///
///
///
///
///
///
/// Thrown when fails to make API call
///
/// Task of ApiResponse (List<ProductRecommendViewModel>)
System.Threading.Tasks.Task>> ProductApiGetHotProductsAsyncAsyncWithHttpInfo (int? top);
///
///
///
///
///
///
/// Thrown when fails to make API call
///
/// Task of List<ProductRecommendViewModel>
System.Threading.Tasks.Task> ProductApiGetLatestProductsAsyncAsync (int? top);
///
///
///
///
///
///
/// Thrown when fails to make API call
///
/// Task of ApiResponse (List<ProductRecommendViewModel>)
System.Threading.Tasks.Task>> ProductApiGetLatestProductsAsyncAsyncWithHttpInfo (int? top);
///
///
///
///
///
///
/// Thrown when fails to make API call
///
/// Task of CollectionItemIdsViewModel
System.Threading.Tasks.Task ProductApiGetProductAreCollectedAsync (List productIds);
///
///
///
///
///
///
/// Thrown when fails to make API call
///
/// Task of ApiResponse (CollectionItemIdsViewModel)
System.Threading.Tasks.Task> ProductApiGetProductAreCollectedAsyncWithHttpInfo (List productIds);
///
///
///
///
///
///
/// Thrown when fails to make API call
/// 产品编号
/// Task of WapProductDetailViewModel
System.Threading.Tasks.Task ProductApiGetProductDetailAsync (long? id);
///
///
///
///
///
///
/// Thrown when fails to make API call
/// 产品编号
/// Task of ApiResponse (WapProductDetailViewModel)
System.Threading.Tasks.Task> ProductApiGetProductDetailAsyncWithHttpInfo (long? id);
///
///
///
///
///
///
/// Thrown when fails to make API call
/// 帖子编号
/// Task of ProductPrevAndNextViewModel
System.Threading.Tasks.Task ProductApiGetProductRelatedAsync (long? id);
///
///
///
///
///
///
/// Thrown when fails to make API call
/// 帖子编号
/// Task of ApiResponse (ProductPrevAndNextViewModel)
System.Threading.Tasks.Task> ProductApiGetProductRelatedAsyncWithHttpInfo (long? id);
///
///
///
///
///
///
/// Thrown when fails to make API call
/// 产品编号
/// Task of List<ProductBondViewModel>
System.Threading.Tasks.Task> ProductApiGetSimilarProductsAsync (long? id);
///
///
///
///
///
///
/// Thrown when fails to make API call
/// 产品编号
/// Task of ApiResponse (List<ProductBondViewModel>)
System.Threading.Tasks.Task>> ProductApiGetSimilarProductsAsyncWithHttpInfo (long? id);
///
///
///
///
///
///
/// Thrown when fails to make API call
///
/// (optional, default to 10)
/// (optional, default to 0)
/// Task of List<ProductBondViewModel>
System.Threading.Tasks.Task> ProductApiSearchProductBondsAsync (string q, int? limit = null, int? offset = null);
///
///
///
///
///
///
/// Thrown when fails to make API call
///
/// (optional, default to 10)
/// (optional, default to 0)
/// Task of ApiResponse (List<ProductBondViewModel>)
System.Threading.Tasks.Task>> ProductApiSearchProductBondsAsyncWithHttpInfo (string q, int? limit = null, int? offset = null);
#endregion Asynchronous Operations
}
///
/// Represents a collection of functions to interact with the API endpoints
///
public partial class ProductApiApi : IProductApiApi
{
private IO.Swagger.Client.ExceptionFactory _exceptionFactory = (name, response) => null;
///
/// Initializes a new instance of the class
/// using Configuration object
///
/// An instance of Configuration
///
public ProductApiApi(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
///
/// (optional)
/// List<StringViewModel>
public List ProductApiAutoCompleteProducts (string q, int? categoryId = null)
{
ApiResponse> localVarResponse = ProductApiAutoCompleteProductsWithHttpInfo(q, categoryId);
return localVarResponse.Data;
}
///
///
///
/// Thrown when fails to make API call
///
/// (optional)
/// ApiResponse of List<StringViewModel>
public ApiResponse< List > ProductApiAutoCompleteProductsWithHttpInfo (string q, int? categoryId = null)
{
// verify the required parameter 'q' is set
if (q == null)
throw new ApiException(400, "Missing required parameter 'q' when calling ProductApiApi->ProductApiAutoCompleteProducts");
string localVarPath = "/v1/products/_autoComplete";
Dictionary localVarQueryParams = new Dictionary();
Dictionary localVarHeaderParams = new Dictionary(Configuration.DefaultHeader);
Dictionary 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 (q != null) localVarQueryParams.Add("q", Configuration.ApiClient.ParameterToString(q)); // query parameter
if (categoryId != null) localVarQueryParams.Add("categoryId", Configuration.ApiClient.ParameterToString(categoryId)); // query parameter
// make the HTTP request
HttpResponseMessage localVarResponse = Configuration.ApiClient.CallApi(localVarPath,
"GET", localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams,
localVarHttpContentType);
int localVarStatusCode = (int) localVarResponse.StatusCode;
if (ExceptionFactory != null)
{
Exception exception = ExceptionFactory("ProductApiAutoCompleteProducts", localVarResponse);
if (exception != null) throw exception;
}
return new ApiResponse>(localVarStatusCode,
localVarResponse.Headers.ToDictionary(x => x.Key, x => x.Value.ToString()),
(List) Configuration.ApiClient.Deserialize(localVarResponse.Content.ReadAsStringAsync().Result, typeof(List)));
}
///
///
///
/// Thrown when fails to make API call
///
/// (optional)
/// Task of List<StringViewModel>
public async System.Threading.Tasks.Task> ProductApiAutoCompleteProductsAsync (string q, int? categoryId = null)
{
ApiResponse> localVarResponse = await ProductApiAutoCompleteProductsAsyncWithHttpInfo(q, categoryId);
return localVarResponse.Data;
}
///
///
///
/// Thrown when fails to make API call
///
/// (optional)
/// Task of ApiResponse (List<StringViewModel>)
public async System.Threading.Tasks.Task>> ProductApiAutoCompleteProductsAsyncWithHttpInfo (string q, int? categoryId = null)
{
// verify the required parameter 'q' is set
if (q == null)
throw new ApiException(400, "Missing required parameter 'q' when calling ProductApiApi->ProductApiAutoCompleteProducts");
string localVarPath = "/v1/products/_autoComplete";
Dictionary localVarQueryParams = new Dictionary();
Dictionary localVarHeaderParams = new Dictionary(Configuration.DefaultHeader);
Dictionary 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 (q != null) localVarQueryParams.Add("q", Configuration.ApiClient.ParameterToString(q)); // query parameter
if (categoryId != null) localVarQueryParams.Add("categoryId", Configuration.ApiClient.ParameterToString(categoryId)); // query parameter
// make the HTTP request
HttpResponseMessage localVarResponse = await Configuration.ApiClient.CallApiAsync(localVarPath,
"GET", localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams,
localVarHttpContentType);
int localVarStatusCode = (int) localVarResponse.StatusCode;
if (ExceptionFactory != null)
{
Exception exception = ExceptionFactory("ProductApiAutoCompleteProducts", localVarResponse);
if (exception != null) throw exception;
}
return new ApiResponse>(localVarStatusCode,
localVarResponse.Headers.ToDictionary(x => x.Key, x => x.Value.ToString()),
(List) Configuration.ApiClient.Deserialize(await localVarResponse.Content.ReadAsStringAsync(), typeof(List)));
}
///
///
///
/// Thrown when fails to make API call
/// 检索词
/// 分类编号 (optional)
/// List<CategoryAutoCompleteViewModel>
public List ProductApiAutoCompleteSystemCategories (string q, int? id = null)
{
ApiResponse> localVarResponse = ProductApiAutoCompleteSystemCategoriesWithHttpInfo(q, id);
return localVarResponse.Data;
}
///
///
///
/// Thrown when fails to make API call
/// 检索词
/// 分类编号 (optional)
/// ApiResponse of List<CategoryAutoCompleteViewModel>
public ApiResponse< List > ProductApiAutoCompleteSystemCategoriesWithHttpInfo (string q, int? id = null)
{
// verify the required parameter 'q' is set
if (q == null)
throw new ApiException(400, "Missing required parameter 'q' when calling ProductApiApi->ProductApiAutoCompleteSystemCategories");
string localVarPath = "/v1/products/_AutoCompleteSystemCategories";
Dictionary localVarQueryParams = new Dictionary();
Dictionary localVarHeaderParams = new Dictionary(Configuration.DefaultHeader);
Dictionary 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 (q != null) localVarQueryParams.Add("q", Configuration.ApiClient.ParameterToString(q)); // query parameter
if (id != null) localVarQueryParams.Add("id", Configuration.ApiClient.ParameterToString(id)); // query parameter
// make the HTTP request
HttpResponseMessage localVarResponse = Configuration.ApiClient.CallApi(localVarPath,
"GET", localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams,
localVarHttpContentType);
int localVarStatusCode = (int) localVarResponse.StatusCode;
if (ExceptionFactory != null)
{
Exception exception = ExceptionFactory("ProductApiAutoCompleteSystemCategories", localVarResponse);
if (exception != null) throw exception;
}
return new ApiResponse>(localVarStatusCode,
localVarResponse.Headers.ToDictionary(x => x.Key, x => x.Value.ToString()),
(List) Configuration.ApiClient.Deserialize(localVarResponse.Content.ReadAsStringAsync().Result, typeof(List)));
}
///
///
///
/// Thrown when fails to make API call
/// 检索词
/// 分类编号 (optional)
/// Task of List<CategoryAutoCompleteViewModel>
public async System.Threading.Tasks.Task> ProductApiAutoCompleteSystemCategoriesAsync (string q, int? id = null)
{
ApiResponse> localVarResponse = await ProductApiAutoCompleteSystemCategoriesAsyncWithHttpInfo(q, id);
return localVarResponse.Data;
}
///
///
///
/// Thrown when fails to make API call
/// 检索词
/// 分类编号 (optional)
/// Task of ApiResponse (List<CategoryAutoCompleteViewModel>)
public async System.Threading.Tasks.Task>> ProductApiAutoCompleteSystemCategoriesAsyncWithHttpInfo (string q, int? id = null)
{
// verify the required parameter 'q' is set
if (q == null)
throw new ApiException(400, "Missing required parameter 'q' when calling ProductApiApi->ProductApiAutoCompleteSystemCategories");
string localVarPath = "/v1/products/_AutoCompleteSystemCategories";
Dictionary localVarQueryParams = new Dictionary();
Dictionary localVarHeaderParams = new Dictionary(Configuration.DefaultHeader);
Dictionary 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 (q != null) localVarQueryParams.Add("q", Configuration.ApiClient.ParameterToString(q)); // query parameter
if (id != null) localVarQueryParams.Add("id", Configuration.ApiClient.ParameterToString(id)); // query parameter
// make the HTTP request
HttpResponseMessage localVarResponse = await Configuration.ApiClient.CallApiAsync(localVarPath,
"GET", localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams,
localVarHttpContentType);
int localVarStatusCode = (int) localVarResponse.StatusCode;
if (ExceptionFactory != null)
{
Exception exception = ExceptionFactory("ProductApiAutoCompleteSystemCategories", localVarResponse);
if (exception != null) throw exception;
}
return new ApiResponse>(localVarStatusCode,
localVarResponse.Headers.ToDictionary(x => x.Key, x => x.Value.ToString()),
(List) Configuration.ApiClient.Deserialize(await localVarResponse.Content.ReadAsStringAsync(), typeof(List)));
}
///
///
///
/// Thrown when fails to make API call
/// List<CategorySimpleViewModel>
public List ProductApiGetAllSystemCategory ()
{
ApiResponse> localVarResponse = ProductApiGetAllSystemCategoryWithHttpInfo();
return localVarResponse.Data;
}
///
///
///
/// Thrown when fails to make API call
/// ApiResponse of List<CategorySimpleViewModel>
public ApiResponse< List > ProductApiGetAllSystemCategoryWithHttpInfo ()
{
string localVarPath = "/v1/allsystemcategories";
Dictionary localVarQueryParams = new Dictionary();
Dictionary localVarHeaderParams = new Dictionary(Configuration.DefaultHeader);
Dictionary 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);
// make the HTTP request
HttpResponseMessage localVarResponse = Configuration.ApiClient.CallApi(localVarPath,
"GET", localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams,
localVarHttpContentType);
int localVarStatusCode = (int) localVarResponse.StatusCode;
if (ExceptionFactory != null)
{
Exception exception = ExceptionFactory("ProductApiGetAllSystemCategory", localVarResponse);
if (exception != null) throw exception;
}
return new ApiResponse>(localVarStatusCode,
localVarResponse.Headers.ToDictionary(x => x.Key, x => x.Value.ToString()),
(List) Configuration.ApiClient.Deserialize(localVarResponse.Content.ReadAsStringAsync().Result, typeof(List)));
}
///
///
///
/// Thrown when fails to make API call
/// Task of List<CategorySimpleViewModel>
public async System.Threading.Tasks.Task> ProductApiGetAllSystemCategoryAsync ()
{
ApiResponse> localVarResponse = await ProductApiGetAllSystemCategoryAsyncWithHttpInfo();
return localVarResponse.Data;
}
///
///
///
/// Thrown when fails to make API call
/// Task of ApiResponse (List<CategorySimpleViewModel>)
public async System.Threading.Tasks.Task>> ProductApiGetAllSystemCategoryAsyncWithHttpInfo ()
{
string localVarPath = "/v1/allsystemcategories";
Dictionary localVarQueryParams = new Dictionary();
Dictionary localVarHeaderParams = new Dictionary(Configuration.DefaultHeader);
Dictionary 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);
// make the HTTP request
HttpResponseMessage localVarResponse = await Configuration.ApiClient.CallApiAsync(localVarPath,
"GET", localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams,
localVarHttpContentType);
int localVarStatusCode = (int) localVarResponse.StatusCode;
if (ExceptionFactory != null)
{
Exception exception = ExceptionFactory("ProductApiGetAllSystemCategory", localVarResponse);
if (exception != null) throw exception;
}
return new ApiResponse>(localVarStatusCode,
localVarResponse.Headers.ToDictionary(x => x.Key, x => x.Value.ToString()),
(List) Configuration.ApiClient.Deserialize(await localVarResponse.Content.ReadAsStringAsync(), typeof(List)));
}
///
///
///
/// Thrown when fails to make API call
///
/// List<ProductRecommendViewModel>
public List ProductApiGetHotProductsAsync (int? top)
{
ApiResponse> localVarResponse = ProductApiGetHotProductsAsyncWithHttpInfo(top);
return localVarResponse.Data;
}
///
///
///
/// Thrown when fails to make API call
///
/// ApiResponse of List<ProductRecommendViewModel>
public ApiResponse< List > ProductApiGetHotProductsAsyncWithHttpInfo (int? top)
{
// verify the required parameter 'top' is set
if (top == null)
throw new ApiException(400, "Missing required parameter 'top' when calling ProductApiApi->ProductApiGetHotProductsAsync");
string localVarPath = "/v1/products/hotProducts";
Dictionary localVarQueryParams = new Dictionary();
Dictionary localVarHeaderParams = new Dictionary(Configuration.DefaultHeader);
Dictionary 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 (top != null) localVarQueryParams.Add("top", Configuration.ApiClient.ParameterToString(top)); // query parameter
// make the HTTP request
HttpResponseMessage localVarResponse = Configuration.ApiClient.CallApi(localVarPath,
"GET", localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams,
localVarHttpContentType);
int localVarStatusCode = (int) localVarResponse.StatusCode;
if (ExceptionFactory != null)
{
Exception exception = ExceptionFactory("ProductApiGetHotProductsAsync", localVarResponse);
if (exception != null) throw exception;
}
return new ApiResponse>(localVarStatusCode,
localVarResponse.Headers.ToDictionary(x => x.Key, x => x.Value.ToString()),
(List) Configuration.ApiClient.Deserialize(localVarResponse.Content.ReadAsStringAsync().Result, typeof(List)));
}
///
///
///
/// Thrown when fails to make API call
///
/// Task of List<ProductRecommendViewModel>
public async System.Threading.Tasks.Task> ProductApiGetHotProductsAsyncAsync (int? top)
{
ApiResponse> localVarResponse = await ProductApiGetHotProductsAsyncAsyncWithHttpInfo(top);
return localVarResponse.Data;
}
///
///
///
/// Thrown when fails to make API call
///
/// Task of ApiResponse (List<ProductRecommendViewModel>)
public async System.Threading.Tasks.Task>> ProductApiGetHotProductsAsyncAsyncWithHttpInfo (int? top)
{
// verify the required parameter 'top' is set
if (top == null)
throw new ApiException(400, "Missing required parameter 'top' when calling ProductApiApi->ProductApiGetHotProductsAsync");
string localVarPath = "/v1/products/hotProducts";
Dictionary localVarQueryParams = new Dictionary();
Dictionary localVarHeaderParams = new Dictionary(Configuration.DefaultHeader);
Dictionary 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 (top != null) localVarQueryParams.Add("top", Configuration.ApiClient.ParameterToString(top)); // query parameter
// make the HTTP request
HttpResponseMessage localVarResponse = await Configuration.ApiClient.CallApiAsync(localVarPath,
"GET", localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams,
localVarHttpContentType);
int localVarStatusCode = (int) localVarResponse.StatusCode;
if (ExceptionFactory != null)
{
Exception exception = ExceptionFactory("ProductApiGetHotProductsAsync", localVarResponse);
if (exception != null) throw exception;
}
return new ApiResponse>(localVarStatusCode,
localVarResponse.Headers.ToDictionary(x => x.Key, x => x.Value.ToString()),
(List) Configuration.ApiClient.Deserialize(await localVarResponse.Content.ReadAsStringAsync(), typeof(List)));
}
///
///
///
/// Thrown when fails to make API call
///
/// List<ProductRecommendViewModel>
public List ProductApiGetLatestProductsAsync (int? top)
{
ApiResponse> localVarResponse = ProductApiGetLatestProductsAsyncWithHttpInfo(top);
return localVarResponse.Data;
}
///
///
///
/// Thrown when fails to make API call
///
/// ApiResponse of List<ProductRecommendViewModel>
public ApiResponse< List > ProductApiGetLatestProductsAsyncWithHttpInfo (int? top)
{
// verify the required parameter 'top' is set
if (top == null)
throw new ApiException(400, "Missing required parameter 'top' when calling ProductApiApi->ProductApiGetLatestProductsAsync");
string localVarPath = "/v1/products/latestProducts";
Dictionary localVarQueryParams = new Dictionary();
Dictionary localVarHeaderParams = new Dictionary(Configuration.DefaultHeader);
Dictionary 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 (top != null) localVarQueryParams.Add("top", Configuration.ApiClient.ParameterToString(top)); // query parameter
// make the HTTP request
HttpResponseMessage localVarResponse = Configuration.ApiClient.CallApi(localVarPath,
"GET", localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams,
localVarHttpContentType);
int localVarStatusCode = (int) localVarResponse.StatusCode;
if (ExceptionFactory != null)
{
Exception exception = ExceptionFactory("ProductApiGetLatestProductsAsync", localVarResponse);
if (exception != null) throw exception;
}
return new ApiResponse>(localVarStatusCode,
localVarResponse.Headers.ToDictionary(x => x.Key, x => x.Value.ToString()),
(List) Configuration.ApiClient.Deserialize(localVarResponse.Content.ReadAsStringAsync().Result, typeof(List)));
}
///
///
///
/// Thrown when fails to make API call
///
/// Task of List<ProductRecommendViewModel>
public async System.Threading.Tasks.Task> ProductApiGetLatestProductsAsyncAsync (int? top)
{
ApiResponse> localVarResponse = await ProductApiGetLatestProductsAsyncAsyncWithHttpInfo(top);
return localVarResponse.Data;
}
///
///
///
/// Thrown when fails to make API call
///
/// Task of ApiResponse (List<ProductRecommendViewModel>)
public async System.Threading.Tasks.Task>> ProductApiGetLatestProductsAsyncAsyncWithHttpInfo (int? top)
{
// verify the required parameter 'top' is set
if (top == null)
throw new ApiException(400, "Missing required parameter 'top' when calling ProductApiApi->ProductApiGetLatestProductsAsync");
string localVarPath = "/v1/products/latestProducts";
Dictionary localVarQueryParams = new Dictionary();
Dictionary localVarHeaderParams = new Dictionary(Configuration.DefaultHeader);
Dictionary 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 (top != null) localVarQueryParams.Add("top", Configuration.ApiClient.ParameterToString(top)); // query parameter
// make the HTTP request
HttpResponseMessage localVarResponse = await Configuration.ApiClient.CallApiAsync(localVarPath,
"GET", localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams,
localVarHttpContentType);
int localVarStatusCode = (int) localVarResponse.StatusCode;
if (ExceptionFactory != null)
{
Exception exception = ExceptionFactory("ProductApiGetLatestProductsAsync", localVarResponse);
if (exception != null) throw exception;
}
return new ApiResponse>(localVarStatusCode,
localVarResponse.Headers.ToDictionary(x => x.Key, x => x.Value.ToString()),
(List) Configuration.ApiClient.Deserialize(await localVarResponse.Content.ReadAsStringAsync(), typeof(List)));
}
///
///
///
/// Thrown when fails to make API call
///
/// CollectionItemIdsViewModel
public CollectionItemIdsViewModel ProductApiGetProductAreCollected (List productIds)
{
ApiResponse localVarResponse = ProductApiGetProductAreCollectedWithHttpInfo(productIds);
return localVarResponse.Data;
}
///
///
///
/// Thrown when fails to make API call
///
/// ApiResponse of CollectionItemIdsViewModel
public ApiResponse< CollectionItemIdsViewModel > ProductApiGetProductAreCollectedWithHttpInfo (List productIds)
{
// verify the required parameter 'productIds' is set
if (productIds == null)
throw new ApiException(400, "Missing required parameter 'productIds' when calling ProductApiApi->ProductApiGetProductAreCollected");
string localVarPath = "/v1/products/_arecollected";
Dictionary localVarQueryParams = new Dictionary();
Dictionary localVarHeaderParams = new Dictionary(Configuration.DefaultHeader);
Dictionary 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[] {
"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);
localVarPostBody = Configuration.ApiClient.Serialize(productIds); // http body (model) parameter
// make the HTTP request
HttpResponseMessage localVarResponse = Configuration.ApiClient.CallApi(localVarPath,
"POST", localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams,
localVarHttpContentType);
int localVarStatusCode = (int) localVarResponse.StatusCode;
if (ExceptionFactory != null)
{
Exception exception = ExceptionFactory("ProductApiGetProductAreCollected", localVarResponse);
if (exception != null) throw exception;
}
return new ApiResponse(localVarStatusCode,
localVarResponse.Headers.ToDictionary(x => x.Key, x => x.Value.ToString()),
(CollectionItemIdsViewModel) Configuration.ApiClient.Deserialize(localVarResponse.Content.ReadAsStringAsync().Result, typeof(CollectionItemIdsViewModel)));
}
///
///
///
/// Thrown when fails to make API call
///
/// Task of CollectionItemIdsViewModel
public async System.Threading.Tasks.Task ProductApiGetProductAreCollectedAsync (List productIds)
{
ApiResponse localVarResponse = await ProductApiGetProductAreCollectedAsyncWithHttpInfo(productIds);
return localVarResponse.Data;
}
///
///
///
/// Thrown when fails to make API call
///
/// Task of ApiResponse (CollectionItemIdsViewModel)
public async System.Threading.Tasks.Task> ProductApiGetProductAreCollectedAsyncWithHttpInfo (List productIds)
{
// verify the required parameter 'productIds' is set
if (productIds == null)
throw new ApiException(400, "Missing required parameter 'productIds' when calling ProductApiApi->ProductApiGetProductAreCollected");
string localVarPath = "/v1/products/_arecollected";
Dictionary localVarQueryParams = new Dictionary();
Dictionary localVarHeaderParams = new Dictionary(Configuration.DefaultHeader);
Dictionary 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[] {
"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);
localVarPostBody = Configuration.ApiClient.Serialize(productIds); // http body (model) parameter
// make the HTTP request
HttpResponseMessage localVarResponse = await Configuration.ApiClient.CallApiAsync(localVarPath,
"POST", localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams,
localVarHttpContentType);
int localVarStatusCode = (int) localVarResponse.StatusCode;
if (ExceptionFactory != null)
{
Exception exception = ExceptionFactory("ProductApiGetProductAreCollected", localVarResponse);
if (exception != null) throw exception;
}
return new ApiResponse(localVarStatusCode,
localVarResponse.Headers.ToDictionary(x => x.Key, x => x.Value.ToString()),
(CollectionItemIdsViewModel) Configuration.ApiClient.Deserialize(await localVarResponse.Content.ReadAsStringAsync(), typeof(CollectionItemIdsViewModel)));
}
///
///
///
/// Thrown when fails to make API call
/// 产品编号
/// WapProductDetailViewModel
public WapProductDetailViewModel ProductApiGetProductDetail (long? id)
{
ApiResponse localVarResponse = ProductApiGetProductDetailWithHttpInfo(id);
return localVarResponse.Data;
}
///
///
///
/// Thrown when fails to make API call
/// 产品编号
/// ApiResponse of WapProductDetailViewModel
public ApiResponse< WapProductDetailViewModel > ProductApiGetProductDetailWithHttpInfo (long? id)
{
// verify the required parameter 'id' is set
if (id == null)
throw new ApiException(400, "Missing required parameter 'id' when calling ProductApiApi->ProductApiGetProductDetail");
string localVarPath = "/v1/products/{id}";
Dictionary localVarQueryParams = new Dictionary();
Dictionary localVarHeaderParams = new Dictionary(Configuration.DefaultHeader);
Dictionary 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);
// make the HTTP request
HttpResponseMessage localVarResponse = Configuration.ApiClient.CallApi(localVarPath,
"GET", localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams,
localVarHttpContentType);
int localVarStatusCode = (int) localVarResponse.StatusCode;
if (ExceptionFactory != null)
{
Exception exception = ExceptionFactory("ProductApiGetProductDetail", localVarResponse);
if (exception != null) throw exception;
}
return new ApiResponse(localVarStatusCode,
localVarResponse.Headers.ToDictionary(x => x.Key, x => x.Value.ToString()),
(WapProductDetailViewModel) Configuration.ApiClient.Deserialize(localVarResponse.Content.ReadAsStringAsync().Result, typeof(WapProductDetailViewModel)));
}
///
///
///
/// Thrown when fails to make API call
/// 产品编号
/// Task of WapProductDetailViewModel
public async System.Threading.Tasks.Task ProductApiGetProductDetailAsync (long? id)
{
ApiResponse localVarResponse = await ProductApiGetProductDetailAsyncWithHttpInfo(id);
return localVarResponse.Data;
}
///
///
///
/// Thrown when fails to make API call
/// 产品编号
/// Task of ApiResponse (WapProductDetailViewModel)
public async System.Threading.Tasks.Task> ProductApiGetProductDetailAsyncWithHttpInfo (long? id)
{
// verify the required parameter 'id' is set
if (id == null)
throw new ApiException(400, "Missing required parameter 'id' when calling ProductApiApi->ProductApiGetProductDetail");
string localVarPath = "/v1/products/{id}";
Dictionary localVarQueryParams = new Dictionary();
Dictionary localVarHeaderParams = new Dictionary(Configuration.DefaultHeader);
Dictionary 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);
// make the HTTP request
HttpResponseMessage localVarResponse = await Configuration.ApiClient.CallApiAsync(localVarPath,
"GET", localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams,
localVarHttpContentType);
int localVarStatusCode = (int) localVarResponse.StatusCode;
if (ExceptionFactory != null)
{
Exception exception = ExceptionFactory("ProductApiGetProductDetail", localVarResponse);
if (exception != null) throw exception;
}
return new ApiResponse(localVarStatusCode,
localVarResponse.Headers.ToDictionary(x => x.Key, x => x.Value.ToString()),
(WapProductDetailViewModel) Configuration.ApiClient.Deserialize(await localVarResponse.Content.ReadAsStringAsync(), typeof(WapProductDetailViewModel)));
}
///
///
///
/// Thrown when fails to make API call
/// 帖子编号
/// ProductPrevAndNextViewModel
public ProductPrevAndNextViewModel ProductApiGetProductRelated (long? id)
{
ApiResponse localVarResponse = ProductApiGetProductRelatedWithHttpInfo(id);
return localVarResponse.Data;
}
///
///
///
/// Thrown when fails to make API call
/// 帖子编号
/// ApiResponse of ProductPrevAndNextViewModel
public ApiResponse< ProductPrevAndNextViewModel > ProductApiGetProductRelatedWithHttpInfo (long? id)
{
// verify the required parameter 'id' is set
if (id == null)
throw new ApiException(400, "Missing required parameter 'id' when calling ProductApiApi->ProductApiGetProductRelated");
string localVarPath = "/v1/products/{id}/related";
Dictionary localVarQueryParams = new Dictionary();
Dictionary localVarHeaderParams = new Dictionary(Configuration.DefaultHeader);
Dictionary 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);
// make the HTTP request
HttpResponseMessage localVarResponse = Configuration.ApiClient.CallApi(localVarPath,
"GET", localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams,
localVarHttpContentType);
int localVarStatusCode = (int) localVarResponse.StatusCode;
if (ExceptionFactory != null)
{
Exception exception = ExceptionFactory("ProductApiGetProductRelated", localVarResponse);
if (exception != null) throw exception;
}
return new ApiResponse(localVarStatusCode,
localVarResponse.Headers.ToDictionary(x => x.Key, x => x.Value.ToString()),
(ProductPrevAndNextViewModel) Configuration.ApiClient.Deserialize(localVarResponse.Content.ReadAsStringAsync().Result, typeof(ProductPrevAndNextViewModel)));
}
///
///
///
/// Thrown when fails to make API call
/// 帖子编号
/// Task of ProductPrevAndNextViewModel
public async System.Threading.Tasks.Task ProductApiGetProductRelatedAsync (long? id)
{
ApiResponse localVarResponse = await ProductApiGetProductRelatedAsyncWithHttpInfo(id);
return localVarResponse.Data;
}
///
///
///
/// Thrown when fails to make API call
/// 帖子编号
/// Task of ApiResponse (ProductPrevAndNextViewModel)
public async System.Threading.Tasks.Task> ProductApiGetProductRelatedAsyncWithHttpInfo (long? id)
{
// verify the required parameter 'id' is set
if (id == null)
throw new ApiException(400, "Missing required parameter 'id' when calling ProductApiApi->ProductApiGetProductRelated");
string localVarPath = "/v1/products/{id}/related";
Dictionary localVarQueryParams = new Dictionary();
Dictionary localVarHeaderParams = new Dictionary(Configuration.DefaultHeader);
Dictionary 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);
// make the HTTP request
HttpResponseMessage localVarResponse = await Configuration.ApiClient.CallApiAsync(localVarPath,
"GET", localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams,
localVarHttpContentType);
int localVarStatusCode = (int) localVarResponse.StatusCode;
if (ExceptionFactory != null)
{
Exception exception = ExceptionFactory("ProductApiGetProductRelated", localVarResponse);
if (exception != null) throw exception;
}
return new ApiResponse(localVarStatusCode,
localVarResponse.Headers.ToDictionary(x => x.Key, x => x.Value.ToString()),
(ProductPrevAndNextViewModel) Configuration.ApiClient.Deserialize(await localVarResponse.Content.ReadAsStringAsync(), typeof(ProductPrevAndNextViewModel)));
}
///
///
///
/// Thrown when fails to make API call
/// 产品编号
/// List<ProductBondViewModel>
public List ProductApiGetSimilarProducts (long? id)
{
ApiResponse> localVarResponse = ProductApiGetSimilarProductsWithHttpInfo(id);
return localVarResponse.Data;
}
///
///
///
/// Thrown when fails to make API call
/// 产品编号
/// ApiResponse of List<ProductBondViewModel>
public ApiResponse< List > ProductApiGetSimilarProductsWithHttpInfo (long? id)
{
// verify the required parameter 'id' is set
if (id == null)
throw new ApiException(400, "Missing required parameter 'id' when calling ProductApiApi->ProductApiGetSimilarProducts");
string localVarPath = "/v1/products/{id}/similar";
Dictionary localVarQueryParams = new Dictionary();
Dictionary localVarHeaderParams = new Dictionary(Configuration.DefaultHeader);
Dictionary 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);
// make the HTTP request
HttpResponseMessage localVarResponse = Configuration.ApiClient.CallApi(localVarPath,
"GET", localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams,
localVarHttpContentType);
int localVarStatusCode = (int) localVarResponse.StatusCode;
if (ExceptionFactory != null)
{
Exception exception = ExceptionFactory("ProductApiGetSimilarProducts", localVarResponse);
if (exception != null) throw exception;
}
return new ApiResponse>(localVarStatusCode,
localVarResponse.Headers.ToDictionary(x => x.Key, x => x.Value.ToString()),
(List) Configuration.ApiClient.Deserialize(localVarResponse.Content.ReadAsStringAsync().Result, typeof(List)));
}
///
///
///
/// Thrown when fails to make API call
/// 产品编号
/// Task of List<ProductBondViewModel>
public async System.Threading.Tasks.Task> ProductApiGetSimilarProductsAsync (long? id)
{
ApiResponse> localVarResponse = await ProductApiGetSimilarProductsAsyncWithHttpInfo(id);
return localVarResponse.Data;
}
///
///
///
/// Thrown when fails to make API call
/// 产品编号
/// Task of ApiResponse (List<ProductBondViewModel>)
public async System.Threading.Tasks.Task>> ProductApiGetSimilarProductsAsyncWithHttpInfo (long? id)
{
// verify the required parameter 'id' is set
if (id == null)
throw new ApiException(400, "Missing required parameter 'id' when calling ProductApiApi->ProductApiGetSimilarProducts");
string localVarPath = "/v1/products/{id}/similar";
Dictionary localVarQueryParams = new Dictionary();
Dictionary localVarHeaderParams = new Dictionary(Configuration.DefaultHeader);
Dictionary 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);
// make the HTTP request
HttpResponseMessage localVarResponse = await Configuration.ApiClient.CallApiAsync(localVarPath,
"GET", localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams,
localVarHttpContentType);
int localVarStatusCode = (int) localVarResponse.StatusCode;
if (ExceptionFactory != null)
{
Exception exception = ExceptionFactory("ProductApiGetSimilarProducts", localVarResponse);
if (exception != null) throw exception;
}
return new ApiResponse>(localVarStatusCode,
localVarResponse.Headers.ToDictionary(x => x.Key, x => x.Value.ToString()),
(List) Configuration.ApiClient.Deserialize(await localVarResponse.Content.ReadAsStringAsync(), typeof(List)));
}
///
///
///
/// Thrown when fails to make API call
///
/// (optional, default to 10)
/// (optional, default to 0)
/// List<ProductBondViewModel>
public List ProductApiSearchProductBonds (string q, int? limit = null, int? offset = null)
{
ApiResponse> localVarResponse = ProductApiSearchProductBondsWithHttpInfo(q, limit, offset);
return localVarResponse.Data;
}
///
///
///
/// Thrown when fails to make API call
///
/// (optional, default to 10)
/// (optional, default to 0)
/// ApiResponse of List<ProductBondViewModel>
public ApiResponse< List > ProductApiSearchProductBondsWithHttpInfo (string q, int? limit = null, int? offset = null)
{
// verify the required parameter 'q' is set
if (q == null)
throw new ApiException(400, "Missing required parameter 'q' when calling ProductApiApi->ProductApiSearchProductBonds");
string localVarPath = "/v1/products/_search";
Dictionary localVarQueryParams = new Dictionary();
Dictionary localVarHeaderParams = new Dictionary(Configuration.DefaultHeader);
Dictionary 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 (q != null) localVarQueryParams.Add("q", Configuration.ApiClient.ParameterToString(q)); // query parameter
if (limit != null) localVarQueryParams.Add("limit", Configuration.ApiClient.ParameterToString(limit)); // query parameter
if (offset != null) localVarQueryParams.Add("offset", Configuration.ApiClient.ParameterToString(offset)); // query parameter
// make the HTTP request
HttpResponseMessage localVarResponse = Configuration.ApiClient.CallApi(localVarPath,
"GET", localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams,
localVarHttpContentType);
int localVarStatusCode = (int) localVarResponse.StatusCode;
if (ExceptionFactory != null)
{
Exception exception = ExceptionFactory("ProductApiSearchProductBonds", localVarResponse);
if (exception != null) throw exception;
}
return new ApiResponse>(localVarStatusCode,
localVarResponse.Headers.ToDictionary(x => x.Key, x => x.Value.ToString()),
(List) Configuration.ApiClient.Deserialize(localVarResponse.Content.ReadAsStringAsync().Result, typeof(List