/* * 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 IFriendApiApi : IApiAccessor { #region Synchronous Operations /// /// /// /// /// /// /// Thrown when fails to make API call /// 请求ID /// void FriendApiAccept (long? requestId); /// /// /// /// /// /// /// Thrown when fails to make API call /// 请求ID /// ApiResponse of Object(void) ApiResponse FriendApiAcceptWithHttpInfo (long? requestId); /// /// /// /// /// /// /// Thrown when fails to make API call /// /// CreatedViewModel CreatedViewModel FriendApiCreateRequest (FriendRequestInputModel friendRequestInputModel); /// /// /// /// /// /// /// Thrown when fails to make API call /// /// ApiResponse of CreatedViewModel ApiResponse FriendApiCreateRequestWithHttpInfo (FriendRequestInputModel friendRequestInputModel); /// /// /// /// /// /// /// Thrown when fails to make API call /// 好友的用户ID /// void FriendApiDelete (int? friendId); /// /// /// /// /// /// /// Thrown when fails to make API call /// 好友的用户ID /// ApiResponse of Object(void) ApiResponse FriendApiDeleteWithHttpInfo (int? friendId); /// /// /// /// /// /// /// Thrown when fails to make API call /// 请求Id /// IncomingFriendRequestViewModel IncomingFriendRequestViewModel FriendApiGetIncomingFriendRequest (long? requestId); /// /// /// /// /// /// /// Thrown when fails to make API call /// 请求Id /// ApiResponse of IncomingFriendRequestViewModel ApiResponse FriendApiGetIncomingFriendRequestWithHttpInfo (long? requestId); /// /// /// /// /// /// /// Thrown when fails to make API call /// (optional) /// InCompingFriendRequestUnreadCountViewModel InCompingFriendRequestUnreadCountViewModel FriendApiGetIncomingFriendRequestUnreadCount (long? fromFriendRequestId = null); /// /// /// /// /// /// /// Thrown when fails to make API call /// (optional) /// ApiResponse of InCompingFriendRequestUnreadCountViewModel ApiResponse FriendApiGetIncomingFriendRequestUnreadCountWithHttpInfo (long? fromFriendRequestId = null); /// /// /// /// /// /// /// Thrown when fails to make API call /// /// /// CursorPaginationResultIncomingFriendRequestViewModel CursorPaginationResultIncomingFriendRequestViewModel FriendApiGetIncomingFriendRequests (long? cursorCursor, int? cursorLimit); /// /// /// /// /// /// /// Thrown when fails to make API call /// /// /// ApiResponse of CursorPaginationResultIncomingFriendRequestViewModel ApiResponse FriendApiGetIncomingFriendRequestsWithHttpInfo (long? cursorCursor, int? cursorLimit); /// /// /// /// /// /// /// Thrown when fails to make API call /// 请求Id /// OutgoingFriendRequestViewModel OutgoingFriendRequestViewModel FriendApiGetOutgoingFriendRequest (long? requestId); /// /// /// /// /// /// /// Thrown when fails to make API call /// 请求Id /// ApiResponse of OutgoingFriendRequestViewModel ApiResponse FriendApiGetOutgoingFriendRequestWithHttpInfo (long? requestId); /// /// /// /// /// /// /// Thrown when fails to make API call /// /// /// CursorPaginationResultOutgoingFriendRequestViewModel CursorPaginationResultOutgoingFriendRequestViewModel FriendApiGetOutgoingFriendRequests (long? cursorCursor, int? cursorLimit); /// /// /// /// /// /// /// Thrown when fails to make API call /// /// /// ApiResponse of CursorPaginationResultOutgoingFriendRequestViewModel ApiResponse FriendApiGetOutgoingFriendRequestsWithHttpInfo (long? cursorCursor, int? cursorLimit); /// /// /// /// /// /// /// Thrown when fails to make API call /// 请求ID /// void FriendApiReject (long? requestId); /// /// /// /// /// /// /// Thrown when fails to make API call /// 请求ID /// ApiResponse of Object(void) ApiResponse FriendApiRejectWithHttpInfo (long? requestId); #endregion Synchronous Operations #region Asynchronous Operations /// /// /// /// /// /// /// Thrown when fails to make API call /// 请求ID /// Task of void System.Threading.Tasks.Task FriendApiAcceptAsync (long? requestId); /// /// /// /// /// /// /// Thrown when fails to make API call /// 请求ID /// Task of ApiResponse System.Threading.Tasks.Task> FriendApiAcceptAsyncWithHttpInfo (long? requestId); /// /// /// /// /// /// /// Thrown when fails to make API call /// /// Task of CreatedViewModel System.Threading.Tasks.Task FriendApiCreateRequestAsync (FriendRequestInputModel friendRequestInputModel); /// /// /// /// /// /// /// Thrown when fails to make API call /// /// Task of ApiResponse (CreatedViewModel) System.Threading.Tasks.Task> FriendApiCreateRequestAsyncWithHttpInfo (FriendRequestInputModel friendRequestInputModel); /// /// /// /// /// /// /// Thrown when fails to make API call /// 好友的用户ID /// Task of void System.Threading.Tasks.Task FriendApiDeleteAsync (int? friendId); /// /// /// /// /// /// /// Thrown when fails to make API call /// 好友的用户ID /// Task of ApiResponse System.Threading.Tasks.Task> FriendApiDeleteAsyncWithHttpInfo (int? friendId); /// /// /// /// /// /// /// Thrown when fails to make API call /// 请求Id /// Task of IncomingFriendRequestViewModel System.Threading.Tasks.Task FriendApiGetIncomingFriendRequestAsync (long? requestId); /// /// /// /// /// /// /// Thrown when fails to make API call /// 请求Id /// Task of ApiResponse (IncomingFriendRequestViewModel) System.Threading.Tasks.Task> FriendApiGetIncomingFriendRequestAsyncWithHttpInfo (long? requestId); /// /// /// /// /// /// /// Thrown when fails to make API call /// (optional) /// Task of InCompingFriendRequestUnreadCountViewModel System.Threading.Tasks.Task FriendApiGetIncomingFriendRequestUnreadCountAsync (long? fromFriendRequestId = null); /// /// /// /// /// /// /// Thrown when fails to make API call /// (optional) /// Task of ApiResponse (InCompingFriendRequestUnreadCountViewModel) System.Threading.Tasks.Task> FriendApiGetIncomingFriendRequestUnreadCountAsyncWithHttpInfo (long? fromFriendRequestId = null); /// /// /// /// /// /// /// Thrown when fails to make API call /// /// /// Task of CursorPaginationResultIncomingFriendRequestViewModel System.Threading.Tasks.Task FriendApiGetIncomingFriendRequestsAsync (long? cursorCursor, int? cursorLimit); /// /// /// /// /// /// /// Thrown when fails to make API call /// /// /// Task of ApiResponse (CursorPaginationResultIncomingFriendRequestViewModel) System.Threading.Tasks.Task> FriendApiGetIncomingFriendRequestsAsyncWithHttpInfo (long? cursorCursor, int? cursorLimit); /// /// /// /// /// /// /// Thrown when fails to make API call /// 请求Id /// Task of OutgoingFriendRequestViewModel System.Threading.Tasks.Task FriendApiGetOutgoingFriendRequestAsync (long? requestId); /// /// /// /// /// /// /// Thrown when fails to make API call /// 请求Id /// Task of ApiResponse (OutgoingFriendRequestViewModel) System.Threading.Tasks.Task> FriendApiGetOutgoingFriendRequestAsyncWithHttpInfo (long? requestId); /// /// /// /// /// /// /// Thrown when fails to make API call /// /// /// Task of CursorPaginationResultOutgoingFriendRequestViewModel System.Threading.Tasks.Task FriendApiGetOutgoingFriendRequestsAsync (long? cursorCursor, int? cursorLimit); /// /// /// /// /// /// /// Thrown when fails to make API call /// /// /// Task of ApiResponse (CursorPaginationResultOutgoingFriendRequestViewModel) System.Threading.Tasks.Task> FriendApiGetOutgoingFriendRequestsAsyncWithHttpInfo (long? cursorCursor, int? cursorLimit); /// /// /// /// /// /// /// Thrown when fails to make API call /// 请求ID /// Task of void System.Threading.Tasks.Task FriendApiRejectAsync (long? requestId); /// /// /// /// /// /// /// Thrown when fails to make API call /// 请求ID /// Task of ApiResponse System.Threading.Tasks.Task> FriendApiRejectAsyncWithHttpInfo (long? requestId); #endregion Asynchronous Operations } /// /// Represents a collection of functions to interact with the API endpoints /// public partial class FriendApiApi : IFriendApiApi { private IO.Swagger.Client.ExceptionFactory _exceptionFactory = (name, response) => null; /// /// Initializes a new instance of the class /// using Configuration object /// /// An instance of Configuration /// public FriendApiApi(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 /// 请求ID /// public void FriendApiAccept (long? requestId) { FriendApiAcceptWithHttpInfo(requestId); } /// /// /// /// Thrown when fails to make API call /// 请求ID /// ApiResponse of Object(void) public ApiResponse FriendApiAcceptWithHttpInfo (long? requestId) { // verify the required parameter 'requestId' is set if (requestId == null) throw new ApiException(400, "Missing required parameter 'requestId' when calling FriendApiApi->FriendApiAccept"); var localVarPath = "/v1/friends/_accept/{requestId}"; 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("FriendApiAccept", 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 /// 请求ID /// Task of void public async System.Threading.Tasks.Task FriendApiAcceptAsync (long? requestId) { await FriendApiAcceptAsyncWithHttpInfo(requestId); } /// /// /// /// Thrown when fails to make API call /// 请求ID /// Task of ApiResponse public async System.Threading.Tasks.Task> FriendApiAcceptAsyncWithHttpInfo (long? requestId) { // verify the required parameter 'requestId' is set if (requestId == null) throw new ApiException(400, "Missing required parameter 'requestId' when calling FriendApiApi->FriendApiAccept"); var localVarPath = "/v1/friends/_accept/{requestId}"; 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("FriendApiAccept", 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 /// /// CreatedViewModel public CreatedViewModel FriendApiCreateRequest (FriendRequestInputModel friendRequestInputModel) { ApiResponse localVarResponse = FriendApiCreateRequestWithHttpInfo(friendRequestInputModel); return localVarResponse.Data; } /// /// /// /// Thrown when fails to make API call /// /// ApiResponse of CreatedViewModel public ApiResponse< CreatedViewModel > FriendApiCreateRequestWithHttpInfo (FriendRequestInputModel friendRequestInputModel) { // verify the required parameter 'friendRequestInputModel' is set if (friendRequestInputModel == null) throw new ApiException(400, "Missing required parameter 'friendRequestInputModel' when calling FriendApiApi->FriendApiCreateRequest"); var localVarPath = "/v1/friends/_request"; 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(friendRequestInputModel); // 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("FriendApiCreateRequest", 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 FriendApiCreateRequestAsync (FriendRequestInputModel friendRequestInputModel) { ApiResponse localVarResponse = await FriendApiCreateRequestAsyncWithHttpInfo(friendRequestInputModel); return localVarResponse.Data; } /// /// /// /// Thrown when fails to make API call /// /// Task of ApiResponse (CreatedViewModel) public async System.Threading.Tasks.Task> FriendApiCreateRequestAsyncWithHttpInfo (FriendRequestInputModel friendRequestInputModel) { // verify the required parameter 'friendRequestInputModel' is set if (friendRequestInputModel == null) throw new ApiException(400, "Missing required parameter 'friendRequestInputModel' when calling FriendApiApi->FriendApiCreateRequest"); var localVarPath = "/v1/friends/_request"; 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(friendRequestInputModel); // 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("FriendApiCreateRequest", 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 /// 好友的用户ID /// public void FriendApiDelete (int? friendId) { FriendApiDeleteWithHttpInfo(friendId); } /// /// /// /// Thrown when fails to make API call /// 好友的用户ID /// ApiResponse of Object(void) public ApiResponse FriendApiDeleteWithHttpInfo (int? friendId) { // verify the required parameter 'friendId' is set if (friendId == null) throw new ApiException(400, "Missing required parameter 'friendId' when calling FriendApiApi->FriendApiDelete"); var localVarPath = "/v1/friends/_delete/{friendId}"; 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("FriendApiDelete", 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 /// 好友的用户ID /// Task of void public async System.Threading.Tasks.Task FriendApiDeleteAsync (int? friendId) { await FriendApiDeleteAsyncWithHttpInfo(friendId); } /// /// /// /// Thrown when fails to make API call /// 好友的用户ID /// Task of ApiResponse public async System.Threading.Tasks.Task> FriendApiDeleteAsyncWithHttpInfo (int? friendId) { // verify the required parameter 'friendId' is set if (friendId == null) throw new ApiException(400, "Missing required parameter 'friendId' when calling FriendApiApi->FriendApiDelete"); var localVarPath = "/v1/friends/_delete/{friendId}"; 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("FriendApiDelete", 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 /// 请求Id /// IncomingFriendRequestViewModel public IncomingFriendRequestViewModel FriendApiGetIncomingFriendRequest (long? requestId) { ApiResponse localVarResponse = FriendApiGetIncomingFriendRequestWithHttpInfo(requestId); return localVarResponse.Data; } /// /// /// /// Thrown when fails to make API call /// 请求Id /// ApiResponse of IncomingFriendRequestViewModel public ApiResponse< IncomingFriendRequestViewModel > FriendApiGetIncomingFriendRequestWithHttpInfo (long? requestId) { // verify the required parameter 'requestId' is set if (requestId == null) throw new ApiException(400, "Missing required parameter 'requestId' when calling FriendApiApi->FriendApiGetIncomingFriendRequest"); var localVarPath = "/v1/incomingFriendRequests/{requestId}"; 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("FriendApiGetIncomingFriendRequest", localVarResponse); if (exception != null) throw exception; } return new ApiResponse(localVarStatusCode, localVarResponse.Headers.ToDictionary(x => x.Key, x => x.Value.ToString()), (IncomingFriendRequestViewModel) Configuration.ApiClient.Deserialize(localVarResponse.Content.ReadAsStringAsync().Result, typeof(IncomingFriendRequestViewModel))); } /// /// /// /// Thrown when fails to make API call /// 请求Id /// Task of IncomingFriendRequestViewModel public async System.Threading.Tasks.Task FriendApiGetIncomingFriendRequestAsync (long? requestId) { ApiResponse localVarResponse = await FriendApiGetIncomingFriendRequestAsyncWithHttpInfo(requestId); return localVarResponse.Data; } /// /// /// /// Thrown when fails to make API call /// 请求Id /// Task of ApiResponse (IncomingFriendRequestViewModel) public async System.Threading.Tasks.Task> FriendApiGetIncomingFriendRequestAsyncWithHttpInfo (long? requestId) { // verify the required parameter 'requestId' is set if (requestId == null) throw new ApiException(400, "Missing required parameter 'requestId' when calling FriendApiApi->FriendApiGetIncomingFriendRequest"); var localVarPath = "/v1/incomingFriendRequests/{requestId}"; 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("FriendApiGetIncomingFriendRequest", localVarResponse); if (exception != null) throw exception; } return new ApiResponse(localVarStatusCode, localVarResponse.Headers.ToDictionary(x => x.Key, x => x.Value.ToString()), (IncomingFriendRequestViewModel) Configuration.ApiClient.Deserialize(await localVarResponse.Content.ReadAsStringAsync(), typeof(IncomingFriendRequestViewModel))); } /// /// /// /// Thrown when fails to make API call /// (optional) /// InCompingFriendRequestUnreadCountViewModel public InCompingFriendRequestUnreadCountViewModel FriendApiGetIncomingFriendRequestUnreadCount (long? fromFriendRequestId = null) { ApiResponse localVarResponse = FriendApiGetIncomingFriendRequestUnreadCountWithHttpInfo(fromFriendRequestId); return localVarResponse.Data; } /// /// /// /// Thrown when fails to make API call /// (optional) /// ApiResponse of InCompingFriendRequestUnreadCountViewModel public ApiResponse< InCompingFriendRequestUnreadCountViewModel > FriendApiGetIncomingFriendRequestUnreadCountWithHttpInfo (long? fromFriendRequestId = null) { var localVarPath = "/v1/incomingFriendRequest/unreadcount"; var localVarQueryParams = new Dictionary(); var localVarHeaderParams = new Dictionary(Configuration.DefaultHeader); var localVarFormParams = new Dictionary(); string localVarPostBody = null; // to determine the Content-Type header String[] localVarHttpContentTypes = new String[] { }; String localVarHttpContentType = Configuration.ApiClient.SelectHeaderContentType(localVarHttpContentTypes); // to determine the Accept header String[] localVarHttpHeaderAccepts = new String[] { "application/vnd.fht360.enumAsString+json", "application/vnd.fht360.preserveCircularReference+json", "application/json", "text/json", "application/xml", "text/xml" }; String localVarHttpHeaderAccept = Configuration.ApiClient.SelectHeaderAccept(localVarHttpHeaderAccepts); if (localVarHttpHeaderAccept != null) localVarHeaderParams.Add("Accept", localVarHttpHeaderAccept); if (fromFriendRequestId != null) localVarQueryParams.Add("fromFriendRequestId", Configuration.ApiClient.ParameterToString(fromFriendRequestId)); // query parameter // make the HTTP request var localVarResponse = Configuration.ApiClient.CallApi(localVarPath, "GET", localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarHttpContentType); int localVarStatusCode = (int) localVarResponse.StatusCode; if (ExceptionFactory != null) { Exception exception = ExceptionFactory("FriendApiGetIncomingFriendRequestUnreadCount", localVarResponse); if (exception != null) throw exception; } return new ApiResponse(localVarStatusCode, localVarResponse.Headers.ToDictionary(x => x.Key, x => x.Value.ToString()), (InCompingFriendRequestUnreadCountViewModel) Configuration.ApiClient.Deserialize(localVarResponse.Content.ReadAsStringAsync().Result, typeof(InCompingFriendRequestUnreadCountViewModel))); } /// /// /// /// Thrown when fails to make API call /// (optional) /// Task of InCompingFriendRequestUnreadCountViewModel public async System.Threading.Tasks.Task FriendApiGetIncomingFriendRequestUnreadCountAsync (long? fromFriendRequestId = null) { ApiResponse localVarResponse = await FriendApiGetIncomingFriendRequestUnreadCountAsyncWithHttpInfo(fromFriendRequestId); return localVarResponse.Data; } /// /// /// /// Thrown when fails to make API call /// (optional) /// Task of ApiResponse (InCompingFriendRequestUnreadCountViewModel) public async System.Threading.Tasks.Task> FriendApiGetIncomingFriendRequestUnreadCountAsyncWithHttpInfo (long? fromFriendRequestId = null) { var localVarPath = "/v1/incomingFriendRequest/unreadcount"; var localVarQueryParams = new Dictionary(); var localVarHeaderParams = new Dictionary(Configuration.DefaultHeader); var localVarFormParams = new Dictionary(); string localVarPostBody = null; // to determine the Content-Type header String[] localVarHttpContentTypes = new String[] { }; String localVarHttpContentType = Configuration.ApiClient.SelectHeaderContentType(localVarHttpContentTypes); // to determine the Accept header String[] localVarHttpHeaderAccepts = new String[] { "application/vnd.fht360.enumAsString+json", "application/vnd.fht360.preserveCircularReference+json", "application/json", "text/json", "application/xml", "text/xml" }; String localVarHttpHeaderAccept = Configuration.ApiClient.SelectHeaderAccept(localVarHttpHeaderAccepts); if (localVarHttpHeaderAccept != null) localVarHeaderParams.Add("Accept", localVarHttpHeaderAccept); if (fromFriendRequestId != null) localVarQueryParams.Add("fromFriendRequestId", Configuration.ApiClient.ParameterToString(fromFriendRequestId)); // query parameter // make the HTTP request var localVarResponse = await Configuration.ApiClient.CallApiAsync(localVarPath, "GET", localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarHttpContentType); int localVarStatusCode = (int) localVarResponse.StatusCode; if (ExceptionFactory != null) { Exception exception = ExceptionFactory("FriendApiGetIncomingFriendRequestUnreadCount", localVarResponse); if (exception != null) throw exception; } return new ApiResponse(localVarStatusCode, localVarResponse.Headers.ToDictionary(x => x.Key, x => x.Value.ToString()), (InCompingFriendRequestUnreadCountViewModel) Configuration.ApiClient.Deserialize(await localVarResponse.Content.ReadAsStringAsync(), typeof(InCompingFriendRequestUnreadCountViewModel))); } /// /// /// /// Thrown when fails to make API call /// /// /// CursorPaginationResultIncomingFriendRequestViewModel public CursorPaginationResultIncomingFriendRequestViewModel FriendApiGetIncomingFriendRequests (long? cursorCursor, int? cursorLimit) { ApiResponse localVarResponse = FriendApiGetIncomingFriendRequestsWithHttpInfo(cursorCursor, cursorLimit); return localVarResponse.Data; } /// /// /// /// Thrown when fails to make API call /// /// /// ApiResponse of CursorPaginationResultIncomingFriendRequestViewModel public ApiResponse< CursorPaginationResultIncomingFriendRequestViewModel > FriendApiGetIncomingFriendRequestsWithHttpInfo (long? cursorCursor, int? cursorLimit) { // verify the required parameter 'cursorCursor' is set if (cursorCursor == null) throw new ApiException(400, "Missing required parameter 'cursorCursor' when calling FriendApiApi->FriendApiGetIncomingFriendRequests"); // verify the required parameter 'cursorLimit' is set if (cursorLimit == null) throw new ApiException(400, "Missing required parameter 'cursorLimit' when calling FriendApiApi->FriendApiGetIncomingFriendRequests"); var localVarPath = "/v1/incomingFriendRequests"; var localVarQueryParams = new Dictionary(); var localVarHeaderParams = new Dictionary(Configuration.DefaultHeader); var localVarFormParams = new Dictionary(); string localVarPostBody = null; // to determine the Content-Type header String[] localVarHttpContentTypes = new String[] { }; String localVarHttpContentType = Configuration.ApiClient.SelectHeaderContentType(localVarHttpContentTypes); // to determine the Accept header String[] localVarHttpHeaderAccepts = new String[] { "application/vnd.fht360.enumAsString+json", "application/vnd.fht360.preserveCircularReference+json", "application/json", "text/json", "application/xml", "text/xml" }; String localVarHttpHeaderAccept = Configuration.ApiClient.SelectHeaderAccept(localVarHttpHeaderAccepts); if (localVarHttpHeaderAccept != null) localVarHeaderParams.Add("Accept", localVarHttpHeaderAccept); if (cursorCursor != null) localVarQueryParams.Add("cursor.cursor", Configuration.ApiClient.ParameterToString(cursorCursor)); // query parameter if (cursorLimit != null) localVarQueryParams.Add("cursor.limit", Configuration.ApiClient.ParameterToString(cursorLimit)); // query parameter // make the HTTP request var localVarResponse = Configuration.ApiClient.CallApi(localVarPath, "GET", localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarHttpContentType); int localVarStatusCode = (int) localVarResponse.StatusCode; if (ExceptionFactory != null) { Exception exception = ExceptionFactory("FriendApiGetIncomingFriendRequests", localVarResponse); if (exception != null) throw exception; } return new ApiResponse(localVarStatusCode, localVarResponse.Headers.ToDictionary(x => x.Key, x => x.Value.ToString()), (CursorPaginationResultIncomingFriendRequestViewModel) Configuration.ApiClient.Deserialize(localVarResponse.Content.ReadAsStringAsync().Result, typeof(CursorPaginationResultIncomingFriendRequestViewModel))); } /// /// /// /// Thrown when fails to make API call /// /// /// Task of CursorPaginationResultIncomingFriendRequestViewModel public async System.Threading.Tasks.Task FriendApiGetIncomingFriendRequestsAsync (long? cursorCursor, int? cursorLimit) { ApiResponse localVarResponse = await FriendApiGetIncomingFriendRequestsAsyncWithHttpInfo(cursorCursor, cursorLimit); return localVarResponse.Data; } /// /// /// /// Thrown when fails to make API call /// /// /// Task of ApiResponse (CursorPaginationResultIncomingFriendRequestViewModel) public async System.Threading.Tasks.Task> FriendApiGetIncomingFriendRequestsAsyncWithHttpInfo (long? cursorCursor, int? cursorLimit) { // verify the required parameter 'cursorCursor' is set if (cursorCursor == null) throw new ApiException(400, "Missing required parameter 'cursorCursor' when calling FriendApiApi->FriendApiGetIncomingFriendRequests"); // verify the required parameter 'cursorLimit' is set if (cursorLimit == null) throw new ApiException(400, "Missing required parameter 'cursorLimit' when calling FriendApiApi->FriendApiGetIncomingFriendRequests"); var localVarPath = "/v1/incomingFriendRequests"; var localVarQueryParams = new Dictionary(); var localVarHeaderParams = new Dictionary(Configuration.DefaultHeader); var localVarFormParams = new Dictionary(); string localVarPostBody = null; // to determine the Content-Type header String[] localVarHttpContentTypes = new String[] { }; String localVarHttpContentType = Configuration.ApiClient.SelectHeaderContentType(localVarHttpContentTypes); // to determine the Accept header String[] localVarHttpHeaderAccepts = new String[] { "application/vnd.fht360.enumAsString+json", "application/vnd.fht360.preserveCircularReference+json", "application/json", "text/json", "application/xml", "text/xml" }; String localVarHttpHeaderAccept = Configuration.ApiClient.SelectHeaderAccept(localVarHttpHeaderAccepts); if (localVarHttpHeaderAccept != null) localVarHeaderParams.Add("Accept", localVarHttpHeaderAccept); if (cursorCursor != null) localVarQueryParams.Add("cursor.cursor", Configuration.ApiClient.ParameterToString(cursorCursor)); // query parameter if (cursorLimit != null) localVarQueryParams.Add("cursor.limit", Configuration.ApiClient.ParameterToString(cursorLimit)); // query parameter // make the HTTP request var localVarResponse = await Configuration.ApiClient.CallApiAsync(localVarPath, "GET", localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarHttpContentType); int localVarStatusCode = (int) localVarResponse.StatusCode; if (ExceptionFactory != null) { Exception exception = ExceptionFactory("FriendApiGetIncomingFriendRequests", localVarResponse); if (exception != null) throw exception; } return new ApiResponse(localVarStatusCode, localVarResponse.Headers.ToDictionary(x => x.Key, x => x.Value.ToString()), (CursorPaginationResultIncomingFriendRequestViewModel) Configuration.ApiClient.Deserialize(await localVarResponse.Content.ReadAsStringAsync(), typeof(CursorPaginationResultIncomingFriendRequestViewModel))); } /// /// /// /// Thrown when fails to make API call /// 请求Id /// OutgoingFriendRequestViewModel public OutgoingFriendRequestViewModel FriendApiGetOutgoingFriendRequest (long? requestId) { ApiResponse localVarResponse = FriendApiGetOutgoingFriendRequestWithHttpInfo(requestId); return localVarResponse.Data; } /// /// /// /// Thrown when fails to make API call /// 请求Id /// ApiResponse of OutgoingFriendRequestViewModel public ApiResponse< OutgoingFriendRequestViewModel > FriendApiGetOutgoingFriendRequestWithHttpInfo (long? requestId) { // verify the required parameter 'requestId' is set if (requestId == null) throw new ApiException(400, "Missing required parameter 'requestId' when calling FriendApiApi->FriendApiGetOutgoingFriendRequest"); var localVarPath = "/v1/outgoingFriendRequests/{requestId}"; 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("FriendApiGetOutgoingFriendRequest", localVarResponse); if (exception != null) throw exception; } return new ApiResponse(localVarStatusCode, localVarResponse.Headers.ToDictionary(x => x.Key, x => x.Value.ToString()), (OutgoingFriendRequestViewModel) Configuration.ApiClient.Deserialize(localVarResponse.Content.ReadAsStringAsync().Result, typeof(OutgoingFriendRequestViewModel))); } /// /// /// /// Thrown when fails to make API call /// 请求Id /// Task of OutgoingFriendRequestViewModel public async System.Threading.Tasks.Task FriendApiGetOutgoingFriendRequestAsync (long? requestId) { ApiResponse localVarResponse = await FriendApiGetOutgoingFriendRequestAsyncWithHttpInfo(requestId); return localVarResponse.Data; } /// /// /// /// Thrown when fails to make API call /// 请求Id /// Task of ApiResponse (OutgoingFriendRequestViewModel) public async System.Threading.Tasks.Task> FriendApiGetOutgoingFriendRequestAsyncWithHttpInfo (long? requestId) { // verify the required parameter 'requestId' is set if (requestId == null) throw new ApiException(400, "Missing required parameter 'requestId' when calling FriendApiApi->FriendApiGetOutgoingFriendRequest"); var localVarPath = "/v1/outgoingFriendRequests/{requestId}"; 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("FriendApiGetOutgoingFriendRequest", localVarResponse); if (exception != null) throw exception; } return new ApiResponse(localVarStatusCode, localVarResponse.Headers.ToDictionary(x => x.Key, x => x.Value.ToString()), (OutgoingFriendRequestViewModel) Configuration.ApiClient.Deserialize(await localVarResponse.Content.ReadAsStringAsync(), typeof(OutgoingFriendRequestViewModel))); } /// /// /// /// Thrown when fails to make API call /// /// /// CursorPaginationResultOutgoingFriendRequestViewModel public CursorPaginationResultOutgoingFriendRequestViewModel FriendApiGetOutgoingFriendRequests (long? cursorCursor, int? cursorLimit) { ApiResponse localVarResponse = FriendApiGetOutgoingFriendRequestsWithHttpInfo(cursorCursor, cursorLimit); return localVarResponse.Data; } /// /// /// /// Thrown when fails to make API call /// /// /// ApiResponse of CursorPaginationResultOutgoingFriendRequestViewModel public ApiResponse< CursorPaginationResultOutgoingFriendRequestViewModel > FriendApiGetOutgoingFriendRequestsWithHttpInfo (long? cursorCursor, int? cursorLimit) { // verify the required parameter 'cursorCursor' is set if (cursorCursor == null) throw new ApiException(400, "Missing required parameter 'cursorCursor' when calling FriendApiApi->FriendApiGetOutgoingFriendRequests"); // verify the required parameter 'cursorLimit' is set if (cursorLimit == null) throw new ApiException(400, "Missing required parameter 'cursorLimit' when calling FriendApiApi->FriendApiGetOutgoingFriendRequests"); var localVarPath = "/v1/outgoingFriendRequests"; var localVarQueryParams = new Dictionary(); var localVarHeaderParams = new Dictionary(Configuration.DefaultHeader); var localVarFormParams = new Dictionary(); string localVarPostBody = null; // to determine the Content-Type header String[] localVarHttpContentTypes = new String[] { }; String localVarHttpContentType = Configuration.ApiClient.SelectHeaderContentType(localVarHttpContentTypes); // to determine the Accept header String[] localVarHttpHeaderAccepts = new String[] { "application/vnd.fht360.enumAsString+json", "application/vnd.fht360.preserveCircularReference+json", "application/json", "text/json", "application/xml", "text/xml" }; String localVarHttpHeaderAccept = Configuration.ApiClient.SelectHeaderAccept(localVarHttpHeaderAccepts); if (localVarHttpHeaderAccept != null) localVarHeaderParams.Add("Accept", localVarHttpHeaderAccept); if (cursorCursor != null) localVarQueryParams.Add("cursor.cursor", Configuration.ApiClient.ParameterToString(cursorCursor)); // query parameter if (cursorLimit != null) localVarQueryParams.Add("cursor.limit", Configuration.ApiClient.ParameterToString(cursorLimit)); // query parameter // make the HTTP request var localVarResponse = Configuration.ApiClient.CallApi(localVarPath, "GET", localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarHttpContentType); int localVarStatusCode = (int) localVarResponse.StatusCode; if (ExceptionFactory != null) { Exception exception = ExceptionFactory("FriendApiGetOutgoingFriendRequests", localVarResponse); if (exception != null) throw exception; } return new ApiResponse(localVarStatusCode, localVarResponse.Headers.ToDictionary(x => x.Key, x => x.Value.ToString()), (CursorPaginationResultOutgoingFriendRequestViewModel) Configuration.ApiClient.Deserialize(localVarResponse.Content.ReadAsStringAsync().Result, typeof(CursorPaginationResultOutgoingFriendRequestViewModel))); } /// /// /// /// Thrown when fails to make API call /// /// /// Task of CursorPaginationResultOutgoingFriendRequestViewModel public async System.Threading.Tasks.Task FriendApiGetOutgoingFriendRequestsAsync (long? cursorCursor, int? cursorLimit) { ApiResponse localVarResponse = await FriendApiGetOutgoingFriendRequestsAsyncWithHttpInfo(cursorCursor, cursorLimit); return localVarResponse.Data; } /// /// /// /// Thrown when fails to make API call /// /// /// Task of ApiResponse (CursorPaginationResultOutgoingFriendRequestViewModel) public async System.Threading.Tasks.Task> FriendApiGetOutgoingFriendRequestsAsyncWithHttpInfo (long? cursorCursor, int? cursorLimit) { // verify the required parameter 'cursorCursor' is set if (cursorCursor == null) throw new ApiException(400, "Missing required parameter 'cursorCursor' when calling FriendApiApi->FriendApiGetOutgoingFriendRequests"); // verify the required parameter 'cursorLimit' is set if (cursorLimit == null) throw new ApiException(400, "Missing required parameter 'cursorLimit' when calling FriendApiApi->FriendApiGetOutgoingFriendRequests"); var localVarPath = "/v1/outgoingFriendRequests"; var localVarQueryParams = new Dictionary(); var localVarHeaderParams = new Dictionary(Configuration.DefaultHeader); var localVarFormParams = new Dictionary(); string localVarPostBody = null; // to determine the Content-Type header String[] localVarHttpContentTypes = new String[] { }; String localVarHttpContentType = Configuration.ApiClient.SelectHeaderContentType(localVarHttpContentTypes); // to determine the Accept header String[] localVarHttpHeaderAccepts = new String[] { "application/vnd.fht360.enumAsString+json", "application/vnd.fht360.preserveCircularReference+json", "application/json", "text/json", "application/xml", "text/xml" }; String localVarHttpHeaderAccept = Configuration.ApiClient.SelectHeaderAccept(localVarHttpHeaderAccepts); if (localVarHttpHeaderAccept != null) localVarHeaderParams.Add("Accept", localVarHttpHeaderAccept); if (cursorCursor != null) localVarQueryParams.Add("cursor.cursor", Configuration.ApiClient.ParameterToString(cursorCursor)); // query parameter if (cursorLimit != null) localVarQueryParams.Add("cursor.limit", Configuration.ApiClient.ParameterToString(cursorLimit)); // query parameter // make the HTTP request var localVarResponse = await Configuration.ApiClient.CallApiAsync(localVarPath, "GET", localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarHttpContentType); int localVarStatusCode = (int) localVarResponse.StatusCode; if (ExceptionFactory != null) { Exception exception = ExceptionFactory("FriendApiGetOutgoingFriendRequests", localVarResponse); if (exception != null) throw exception; } return new ApiResponse(localVarStatusCode, localVarResponse.Headers.ToDictionary(x => x.Key, x => x.Value.ToString()), (CursorPaginationResultOutgoingFriendRequestViewModel) Configuration.ApiClient.Deserialize(await localVarResponse.Content.ReadAsStringAsync(), typeof(CursorPaginationResultOutgoingFriendRequestViewModel))); } /// /// /// /// Thrown when fails to make API call /// 请求ID /// public void FriendApiReject (long? requestId) { FriendApiRejectWithHttpInfo(requestId); } /// /// /// /// Thrown when fails to make API call /// 请求ID /// ApiResponse of Object(void) public ApiResponse FriendApiRejectWithHttpInfo (long? requestId) { // verify the required parameter 'requestId' is set if (requestId == null) throw new ApiException(400, "Missing required parameter 'requestId' when calling FriendApiApi->FriendApiReject"); var localVarPath = "/v1/friends/_reject/{requestId}"; 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("FriendApiReject", 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 /// 请求ID /// Task of void public async System.Threading.Tasks.Task FriendApiRejectAsync (long? requestId) { await FriendApiRejectAsyncWithHttpInfo(requestId); } /// /// /// /// Thrown when fails to make API call /// 请求ID /// Task of ApiResponse public async System.Threading.Tasks.Task> FriendApiRejectAsyncWithHttpInfo (long? requestId) { // verify the required parameter 'requestId' is set if (requestId == null) throw new ApiException(400, "Missing required parameter 'requestId' when calling FriendApiApi->FriendApiReject"); var localVarPath = "/v1/friends/_reject/{requestId}"; 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("FriendApiReject", localVarResponse); if (exception != null) throw exception; } return new ApiResponse(localVarStatusCode, localVarResponse.Headers.ToDictionary(x => x.Key, x => x.Value.ToString()), null); } } }