/*
* 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 IFriendGroupApiApi : IApiAccessor
{
#region Synchronous Operations
///
///
///
///
///
///
/// Thrown when fails to make API call
///
/// CreatedViewModel
CreatedViewModel FriendGroupApiCreateFriendGroup (CreateFriendGroupInputModel model);
///
///
///
///
///
///
/// Thrown when fails to make API call
///
/// ApiResponse of CreatedViewModel
ApiResponse FriendGroupApiCreateFriendGroupWithHttpInfo (CreateFriendGroupInputModel model);
///
///
///
///
///
///
/// Thrown when fails to make API call
///
///
void FriendGroupApiDeleteGroup (long? groupId);
///
///
///
///
///
///
/// Thrown when fails to make API call
///
/// ApiResponse of Object(void)
ApiResponse FriendGroupApiDeleteGroupWithHttpInfo (long? groupId);
///
///
///
///
///
///
/// Thrown when fails to make API call
/// List<FriendGroupSimpleViewModel>
List FriendGroupApiGetAllGroups ();
///
///
///
///
///
///
/// Thrown when fails to make API call
/// ApiResponse of List<FriendGroupSimpleViewModel>
ApiResponse> FriendGroupApiGetAllGroupsWithHttpInfo ();
///
///
///
///
///
///
/// Thrown when fails to make API call
/// 组ID
/// FriendGroupDetailViewModel
FriendGroupDetailViewModel FriendGroupApiGetGroupDetail (long? groupId);
///
///
///
///
///
///
/// Thrown when fails to make API call
/// 组ID
/// ApiResponse of FriendGroupDetailViewModel
ApiResponse FriendGroupApiGetGroupDetailWithHttpInfo (long? groupId);
///
///
///
///
///
///
/// Thrown when fails to make API call
///
/// List<UserFriendViewModel>
List FriendGroupApiGetGroupFriends (long? groupId);
///
///
///
///
///
///
/// Thrown when fails to make API call
///
/// ApiResponse of List<UserFriendViewModel>
ApiResponse> FriendGroupApiGetGroupFriendsWithHttpInfo (long? groupId);
///
///
///
///
///
///
/// Thrown when fails to make API call
///
///
///
void FriendGroupApiGroupingFriends (long? groupId, FriendGroupMemberInputModel members);
///
///
///
///
///
///
/// Thrown when fails to make API call
///
///
/// ApiResponse of Object(void)
ApiResponse FriendGroupApiGroupingFriendsWithHttpInfo (long? groupId, FriendGroupMemberInputModel members);
///
///
///
///
///
///
/// Thrown when fails to make API call
/// 好友编号
///
void FriendGroupApiUserBatchGrouping (FriendBatchGroupingInputModel model);
///
///
///
///
///
///
/// Thrown when fails to make API call
/// 好友编号
/// ApiResponse of Object(void)
ApiResponse FriendGroupApiUserBatchGroupingWithHttpInfo (FriendBatchGroupingInputModel model);
#endregion Synchronous Operations
#region Asynchronous Operations
///
///
///
///
///
///
/// Thrown when fails to make API call
///
/// Task of CreatedViewModel
System.Threading.Tasks.Task FriendGroupApiCreateFriendGroupAsync (CreateFriendGroupInputModel model);
///
///
///
///
///
///
/// Thrown when fails to make API call
///
/// Task of ApiResponse (CreatedViewModel)
System.Threading.Tasks.Task> FriendGroupApiCreateFriendGroupAsyncWithHttpInfo (CreateFriendGroupInputModel model);
///
///
///
///
///
///
/// Thrown when fails to make API call
///
/// Task of void
System.Threading.Tasks.Task FriendGroupApiDeleteGroupAsync (long? groupId);
///
///
///
///
///
///
/// Thrown when fails to make API call
///
/// Task of ApiResponse
System.Threading.Tasks.Task> FriendGroupApiDeleteGroupAsyncWithHttpInfo (long? groupId);
///
///
///
///
///
///
/// Thrown when fails to make API call
/// Task of List<FriendGroupSimpleViewModel>
System.Threading.Tasks.Task> FriendGroupApiGetAllGroupsAsync ();
///
///
///
///
///
///
/// Thrown when fails to make API call
/// Task of ApiResponse (List<FriendGroupSimpleViewModel>)
System.Threading.Tasks.Task>> FriendGroupApiGetAllGroupsAsyncWithHttpInfo ();
///
///
///
///
///
///
/// Thrown when fails to make API call
/// 组ID
/// Task of FriendGroupDetailViewModel
System.Threading.Tasks.Task FriendGroupApiGetGroupDetailAsync (long? groupId);
///
///
///
///
///
///
/// Thrown when fails to make API call
/// 组ID
/// Task of ApiResponse (FriendGroupDetailViewModel)
System.Threading.Tasks.Task> FriendGroupApiGetGroupDetailAsyncWithHttpInfo (long? groupId);
///
///
///
///
///
///
/// Thrown when fails to make API call
///
/// Task of List<UserFriendViewModel>
System.Threading.Tasks.Task> FriendGroupApiGetGroupFriendsAsync (long? groupId);
///
///
///
///
///
///
/// Thrown when fails to make API call
///
/// Task of ApiResponse (List<UserFriendViewModel>)
System.Threading.Tasks.Task>> FriendGroupApiGetGroupFriendsAsyncWithHttpInfo (long? groupId);
///
///
///
///
///
///
/// Thrown when fails to make API call
///
///
/// Task of void
System.Threading.Tasks.Task FriendGroupApiGroupingFriendsAsync (long? groupId, FriendGroupMemberInputModel members);
///
///
///
///
///
///
/// Thrown when fails to make API call
///
///
/// Task of ApiResponse
System.Threading.Tasks.Task> FriendGroupApiGroupingFriendsAsyncWithHttpInfo (long? groupId, FriendGroupMemberInputModel members);
///
///
///
///
///
///
/// Thrown when fails to make API call
/// 好友编号
/// Task of void
System.Threading.Tasks.Task FriendGroupApiUserBatchGroupingAsync (FriendBatchGroupingInputModel model);
///
///
///
///
///
///
/// Thrown when fails to make API call
/// 好友编号
/// Task of ApiResponse
System.Threading.Tasks.Task> FriendGroupApiUserBatchGroupingAsyncWithHttpInfo (FriendBatchGroupingInputModel model);
#endregion Asynchronous Operations
}
///
/// Represents a collection of functions to interact with the API endpoints
///
public partial class FriendGroupApiApi : IFriendGroupApiApi
{
private IO.Swagger.Client.ExceptionFactory _exceptionFactory = (name, response) => null;
///
/// Initializes a new instance of the class
/// using Configuration object
///
/// An instance of Configuration
///
public FriendGroupApiApi(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
///
/// CreatedViewModel
public CreatedViewModel FriendGroupApiCreateFriendGroup (CreateFriendGroupInputModel model)
{
ApiResponse localVarResponse = FriendGroupApiCreateFriendGroupWithHttpInfo(model);
return localVarResponse.Data;
}
///
///
///
/// Thrown when fails to make API call
///
/// ApiResponse of CreatedViewModel
public ApiResponse< CreatedViewModel > FriendGroupApiCreateFriendGroupWithHttpInfo (CreateFriendGroupInputModel model)
{
// verify the required parameter 'model' is set
if (model == null)
throw new ApiException(400, "Missing required parameter 'model' when calling FriendGroupApiApi->FriendGroupApiCreateFriendGroup");
var localVarPath = "/v1/friendGroups";
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[] {
"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(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("FriendGroupApiCreateFriendGroup", localVarResponse);
if (exception != null) throw exception;
}
return new ApiResponse(localVarStatusCode,
localVarResponse.Headers.ToDictionary(x => x.Key, x => x.Value.ToString()),
(CreatedViewModel) Configuration.ApiClient.Deserialize(localVarResponse.Content.ReadAsStringAsync().Result, typeof(CreatedViewModel)));
}
///
///
///
/// Thrown when fails to make API call
///
/// Task of CreatedViewModel
public async System.Threading.Tasks.Task FriendGroupApiCreateFriendGroupAsync (CreateFriendGroupInputModel model)
{
ApiResponse localVarResponse = await FriendGroupApiCreateFriendGroupAsyncWithHttpInfo(model);
return localVarResponse.Data;
}
///
///
///
/// Thrown when fails to make API call
///
/// Task of ApiResponse (CreatedViewModel)
public async System.Threading.Tasks.Task> FriendGroupApiCreateFriendGroupAsyncWithHttpInfo (CreateFriendGroupInputModel model)
{
// verify the required parameter 'model' is set
if (model == null)
throw new ApiException(400, "Missing required parameter 'model' when calling FriendGroupApiApi->FriendGroupApiCreateFriendGroup");
var localVarPath = "/v1/friendGroups";
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[] {
"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(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("FriendGroupApiCreateFriendGroup", localVarResponse);
if (exception != null) throw exception;
}
return new ApiResponse(localVarStatusCode,
localVarResponse.Headers.ToDictionary(x => x.Key, x => x.Value.ToString()),
(CreatedViewModel) Configuration.ApiClient.Deserialize(await localVarResponse.Content.ReadAsStringAsync(), typeof(CreatedViewModel)));
}
///
///
///
/// Thrown when fails to make API call
///
///
public void FriendGroupApiDeleteGroup (long? groupId)
{
FriendGroupApiDeleteGroupWithHttpInfo(groupId);
}
///
///
///
/// Thrown when fails to make API call
///
/// ApiResponse of Object(void)
public ApiResponse FriendGroupApiDeleteGroupWithHttpInfo (long? groupId)
{
// verify the required parameter 'groupId' is set
if (groupId == null)
throw new ApiException(400, "Missing required parameter 'groupId' when calling FriendGroupApiApi->FriendGroupApiDeleteGroup");
var localVarPath = "/v1/friendGroups/{groupId}/_delete";
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[] {
};
String localVarHttpHeaderAccept = Configuration.ApiClient.SelectHeaderAccept(localVarHttpHeaderAccepts);
if (localVarHttpHeaderAccept != null)
localVarHeaderParams.Add("Accept", localVarHttpHeaderAccept);
// 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("FriendGroupApiDeleteGroup", 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 FriendGroupApiDeleteGroupAsync (long? groupId)
{
await FriendGroupApiDeleteGroupAsyncWithHttpInfo(groupId);
}
///
///
///
/// Thrown when fails to make API call
///
/// Task of ApiResponse
public async System.Threading.Tasks.Task> FriendGroupApiDeleteGroupAsyncWithHttpInfo (long? groupId)
{
// verify the required parameter 'groupId' is set
if (groupId == null)
throw new ApiException(400, "Missing required parameter 'groupId' when calling FriendGroupApiApi->FriendGroupApiDeleteGroup");
var localVarPath = "/v1/friendGroups/{groupId}/_delete";
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[] {
};
String localVarHttpHeaderAccept = Configuration.ApiClient.SelectHeaderAccept(localVarHttpHeaderAccepts);
if (localVarHttpHeaderAccept != null)
localVarHeaderParams.Add("Accept", localVarHttpHeaderAccept);
// 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("FriendGroupApiDeleteGroup", 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
/// List<FriendGroupSimpleViewModel>
public List FriendGroupApiGetAllGroups ()
{
ApiResponse> localVarResponse = FriendGroupApiGetAllGroupsWithHttpInfo();
return localVarResponse.Data;
}
///
///
///
/// Thrown when fails to make API call
/// ApiResponse of List<FriendGroupSimpleViewModel>
public ApiResponse< List > FriendGroupApiGetAllGroupsWithHttpInfo ()
{
var localVarPath = "/v1/friendgroups";
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);
// 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("FriendGroupApiGetAllGroups", 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<FriendGroupSimpleViewModel>
public async System.Threading.Tasks.Task> FriendGroupApiGetAllGroupsAsync ()
{
ApiResponse> localVarResponse = await FriendGroupApiGetAllGroupsAsyncWithHttpInfo();
return localVarResponse.Data;
}
///
///
///
/// Thrown when fails to make API call
/// Task of ApiResponse (List<FriendGroupSimpleViewModel>)
public async System.Threading.Tasks.Task>> FriendGroupApiGetAllGroupsAsyncWithHttpInfo ()
{
var localVarPath = "/v1/friendgroups";
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);
// 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("FriendGroupApiGetAllGroups", 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
/// 组ID
/// FriendGroupDetailViewModel
public FriendGroupDetailViewModel FriendGroupApiGetGroupDetail (long? groupId)
{
ApiResponse localVarResponse = FriendGroupApiGetGroupDetailWithHttpInfo(groupId);
return localVarResponse.Data;
}
///
///
///
/// Thrown when fails to make API call
/// 组ID
/// ApiResponse of FriendGroupDetailViewModel
public ApiResponse< FriendGroupDetailViewModel > FriendGroupApiGetGroupDetailWithHttpInfo (long? groupId)
{
// verify the required parameter 'groupId' is set
if (groupId == null)
throw new ApiException(400, "Missing required parameter 'groupId' when calling FriendGroupApiApi->FriendGroupApiGetGroupDetail");
var localVarPath = "/v1/friendGroups/{groupId}";
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);
// 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("FriendGroupApiGetGroupDetail", localVarResponse);
if (exception != null) throw exception;
}
return new ApiResponse(localVarStatusCode,
localVarResponse.Headers.ToDictionary(x => x.Key, x => x.Value.ToString()),
(FriendGroupDetailViewModel) Configuration.ApiClient.Deserialize(localVarResponse.Content.ReadAsStringAsync().Result, typeof(FriendGroupDetailViewModel)));
}
///
///
///
/// Thrown when fails to make API call
/// 组ID
/// Task of FriendGroupDetailViewModel
public async System.Threading.Tasks.Task FriendGroupApiGetGroupDetailAsync (long? groupId)
{
ApiResponse localVarResponse = await FriendGroupApiGetGroupDetailAsyncWithHttpInfo(groupId);
return localVarResponse.Data;
}
///
///
///
/// Thrown when fails to make API call
/// 组ID
/// Task of ApiResponse (FriendGroupDetailViewModel)
public async System.Threading.Tasks.Task> FriendGroupApiGetGroupDetailAsyncWithHttpInfo (long? groupId)
{
// verify the required parameter 'groupId' is set
if (groupId == null)
throw new ApiException(400, "Missing required parameter 'groupId' when calling FriendGroupApiApi->FriendGroupApiGetGroupDetail");
var localVarPath = "/v1/friendGroups/{groupId}";
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);
// 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("FriendGroupApiGetGroupDetail", localVarResponse);
if (exception != null) throw exception;
}
return new ApiResponse(localVarStatusCode,
localVarResponse.Headers.ToDictionary(x => x.Key, x => x.Value.ToString()),
(FriendGroupDetailViewModel) Configuration.ApiClient.Deserialize(await localVarResponse.Content.ReadAsStringAsync(), typeof(FriendGroupDetailViewModel)));
}
///
///
///
/// Thrown when fails to make API call
///
/// List<UserFriendViewModel>
public List FriendGroupApiGetGroupFriends (long? groupId)
{
ApiResponse> localVarResponse = FriendGroupApiGetGroupFriendsWithHttpInfo(groupId);
return localVarResponse.Data;
}
///
///
///
/// Thrown when fails to make API call
///
/// ApiResponse of List<UserFriendViewModel>
public ApiResponse< List > FriendGroupApiGetGroupFriendsWithHttpInfo (long? groupId)
{
// verify the required parameter 'groupId' is set
if (groupId == null)
throw new ApiException(400, "Missing required parameter 'groupId' when calling FriendGroupApiApi->FriendGroupApiGetGroupFriends");
var localVarPath = "/v1/friendGroups/{groupId}/friends";
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);
// 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("FriendGroupApiGetGroupFriends", 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<UserFriendViewModel>
public async System.Threading.Tasks.Task> FriendGroupApiGetGroupFriendsAsync (long? groupId)
{
ApiResponse> localVarResponse = await FriendGroupApiGetGroupFriendsAsyncWithHttpInfo(groupId);
return localVarResponse.Data;
}
///
///
///
/// Thrown when fails to make API call
///
/// Task of ApiResponse (List<UserFriendViewModel>)
public async System.Threading.Tasks.Task>> FriendGroupApiGetGroupFriendsAsyncWithHttpInfo (long? groupId)
{
// verify the required parameter 'groupId' is set
if (groupId == null)
throw new ApiException(400, "Missing required parameter 'groupId' when calling FriendGroupApiApi->FriendGroupApiGetGroupFriends");
var localVarPath = "/v1/friendGroups/{groupId}/friends";
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);
// 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("FriendGroupApiGetGroupFriends", 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
///
///
///
public void FriendGroupApiGroupingFriends (long? groupId, FriendGroupMemberInputModel members)
{
FriendGroupApiGroupingFriendsWithHttpInfo(groupId, members);
}
///
///
///
/// Thrown when fails to make API call
///
///
/// ApiResponse of Object(void)
public ApiResponse FriendGroupApiGroupingFriendsWithHttpInfo (long? groupId, FriendGroupMemberInputModel members)
{
// verify the required parameter 'groupId' is set
if (groupId == null)
throw new ApiException(400, "Missing required parameter 'groupId' when calling FriendGroupApiApi->FriendGroupApiGroupingFriends");
// verify the required parameter 'members' is set
if (members == null)
throw new ApiException(400, "Missing required parameter 'members' when calling FriendGroupApiApi->FriendGroupApiGroupingFriends");
var localVarPath = "/v1/friendGroups/{groupId}/_modify";
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(members); // 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("FriendGroupApiGroupingFriends", 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 FriendGroupApiGroupingFriendsAsync (long? groupId, FriendGroupMemberInputModel members)
{
await FriendGroupApiGroupingFriendsAsyncWithHttpInfo(groupId, members);
}
///
///
///
/// Thrown when fails to make API call
///
///
/// Task of ApiResponse
public async System.Threading.Tasks.Task> FriendGroupApiGroupingFriendsAsyncWithHttpInfo (long? groupId, FriendGroupMemberInputModel members)
{
// verify the required parameter 'groupId' is set
if (groupId == null)
throw new ApiException(400, "Missing required parameter 'groupId' when calling FriendGroupApiApi->FriendGroupApiGroupingFriends");
// verify the required parameter 'members' is set
if (members == null)
throw new ApiException(400, "Missing required parameter 'members' when calling FriendGroupApiApi->FriendGroupApiGroupingFriends");
var localVarPath = "/v1/friendGroups/{groupId}/_modify";
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(members); // 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("FriendGroupApiGroupingFriends", 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
/// 好友编号
///
public void FriendGroupApiUserBatchGrouping (FriendBatchGroupingInputModel model)
{
FriendGroupApiUserBatchGroupingWithHttpInfo(model);
}
///
///
///
/// Thrown when fails to make API call
/// 好友编号
/// ApiResponse of Object(void)
public ApiResponse FriendGroupApiUserBatchGroupingWithHttpInfo (FriendBatchGroupingInputModel model)
{
// verify the required parameter 'model' is set
if (model == null)
throw new ApiException(400, "Missing required parameter 'model' when calling FriendGroupApiApi->FriendGroupApiUserBatchGrouping");
var localVarPath = "/v1/friendGroups/_batchgrouping";
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("FriendGroupApiUserBatchGrouping", 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 FriendGroupApiUserBatchGroupingAsync (FriendBatchGroupingInputModel model)
{
await FriendGroupApiUserBatchGroupingAsyncWithHttpInfo(model);
}
///
///
///
/// Thrown when fails to make API call
/// 好友编号
/// Task of ApiResponse
public async System.Threading.Tasks.Task> FriendGroupApiUserBatchGroupingAsyncWithHttpInfo (FriendBatchGroupingInputModel model)
{
// verify the required parameter 'model' is set
if (model == null)
throw new ApiException(400, "Missing required parameter 'model' when calling FriendGroupApiApi->FriendGroupApiUserBatchGrouping");
var localVarPath = "/v1/friendGroups/_batchgrouping";
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("FriendGroupApiUserBatchGrouping", localVarResponse);
if (exception != null) throw exception;
}
return new ApiResponse(localVarStatusCode,
localVarResponse.Headers.ToDictionary(x => x.Key, x => x.Value.ToString()),
null);
}
}
}