< Summary

Information
Class: /home/wethinkcode/student_work/csharp/GroupProject/super-cool-group/weshare-qa/GeneratedApiCode/src/Applications.WeShare.Swagger/Api/PeopleApi.cs
Assembly: Default
File(s): /home/wethinkcode/student_work/csharp/GroupProject/super-cool-group/weshare-qa/GeneratedApiCode/src/Applications.WeShare.Swagger/Api/PeopleApi.cs
Line coverage
42%
Covered lines: 106
Uncovered lines: 146
Coverable lines: 252
Total lines: 682
Line coverage: 42%
Branch coverage
36%
Covered branches: 22
Total branches: 60
Branch coverage: 36.6%
Method coverage

Feature is only available for sponsors

Upgrade to PRO version

File(s)

/home/wethinkcode/student_work/csharp/GroupProject/super-cool-group/weshare-qa/GeneratedApiCode/src/Applications.WeShare.Swagger/Api/PeopleApi.cs

#LineLine coverage
 1/*
 2 * WeShare API
 3 *
 4 * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
 5 *
 6 * The version of the OpenAPI document: 1.0
 7 * Generated by: https://github.com/openapitools/openapi-generator.git
 8 */
 9
 10
 11using System;
 12using System.Collections.Generic;
 13using System.Collections.ObjectModel;
 14using System.Linq;
 15using System.Net;
 16using System.Net.Mime;
 17using Applications.WeShare.Swagger.Client;
 18using Applications.WeShare.Swagger.Model;
 19
 20namespace Applications.WeShare.Swagger.Api
 21{
 22
 23    /// <summary>
 24    /// Represents a collection of functions to interact with the API endpoints
 25    /// </summary>
 26    public interface IPeopleApiSync : IApiAccessor
 27    {
 28        #region Synchronous Operations
 29        /// <summary>
 30        /// Find all people that use WeShare
 31        /// </summary>
 32        /// <exception cref="Applications.WeShare.Swagger.Client.ApiException">Thrown when fails to make API call</excep
 33        /// <param name="operationIndex">Index associated with the operation.</param>
 34        /// <returns>List&lt;Person&gt;</returns>
 35        List<Person> FindAllPeople(int operationIndex = 0);
 36
 37        /// <summary>
 38        /// Find all people that use WeShare
 39        /// </summary>
 40        /// <remarks>
 41        ///
 42        /// </remarks>
 43        /// <exception cref="Applications.WeShare.Swagger.Client.ApiException">Thrown when fails to make API call</excep
 44        /// <param name="operationIndex">Index associated with the operation.</param>
 45        /// <returns>ApiResponse of List&lt;Person&gt;</returns>
 46        ApiResponse<List<Person>> FindAllPeopleWithHttpInfo(int operationIndex = 0);
 47        /// <summary>
 48        /// Find a person by ID
 49        /// </summary>
 50        /// <exception cref="Applications.WeShare.Swagger.Client.ApiException">Thrown when fails to make API call</excep
 51        /// <param name="personId">The ID of the person</param>
 52        /// <param name="operationIndex">Index associated with the operation.</param>
 53        /// <returns>Person</returns>
 54        Person FindPersonById(int personId, int operationIndex = 0);
 55
 56        /// <summary>
 57        /// Find a person by ID
 58        /// </summary>
 59        /// <remarks>
 60        ///
 61        /// </remarks>
 62        /// <exception cref="Applications.WeShare.Swagger.Client.ApiException">Thrown when fails to make API call</excep
 63        /// <param name="personId">The ID of the person</param>
 64        /// <param name="operationIndex">Index associated with the operation.</param>
 65        /// <returns>ApiResponse of Person</returns>
 66        ApiResponse<Person> FindPersonByIdWithHttpInfo(int personId, int operationIndex = 0);
 67        /// <summary>
 68        /// Login to WeShare
 69        /// </summary>
 70        /// <exception cref="Applications.WeShare.Swagger.Client.ApiException">Thrown when fails to make API call</excep
 71        /// <param name="loginDTO"> (optional)</param>
 72        /// <param name="operationIndex">Index associated with the operation.</param>
 73        /// <returns>Person</returns>
 74        Person Login(LoginDTO loginDTO = default(LoginDTO), int operationIndex = 0);
 75
 76        /// <summary>
 77        /// Login to WeShare
 78        /// </summary>
 79        /// <remarks>
 80        ///
 81        /// </remarks>
 82        /// <exception cref="Applications.WeShare.Swagger.Client.ApiException">Thrown when fails to make API call</excep
 83        /// <param name="loginDTO"> (optional)</param>
 84        /// <param name="operationIndex">Index associated with the operation.</param>
 85        /// <returns>ApiResponse of Person</returns>
 86        ApiResponse<Person> LoginWithHttpInfo(LoginDTO loginDTO = default(LoginDTO), int operationIndex = 0);
 87        #endregion Synchronous Operations
 88    }
 89
 90    /// <summary>
 91    /// Represents a collection of functions to interact with the API endpoints
 92    /// </summary>
 93    public interface IPeopleApiAsync : IApiAccessor
 94    {
 95        #region Asynchronous Operations
 96        /// <summary>
 97        /// Find all people that use WeShare
 98        /// </summary>
 99        /// <remarks>
 100        ///
 101        /// </remarks>
 102        /// <exception cref="Applications.WeShare.Swagger.Client.ApiException">Thrown when fails to make API call</excep
 103        /// <param name="operationIndex">Index associated with the operation.</param>
 104        /// <param name="cancellationToken">Cancellation Token to cancel the request.</param>
 105        /// <returns>Task of List&lt;Person&gt;</returns>
 106        System.Threading.Tasks.Task<List<Person>> FindAllPeopleAsync(int operationIndex = 0, System.Threading.Cancellati
 107
 108        /// <summary>
 109        /// Find all people that use WeShare
 110        /// </summary>
 111        /// <remarks>
 112        ///
 113        /// </remarks>
 114        /// <exception cref="Applications.WeShare.Swagger.Client.ApiException">Thrown when fails to make API call</excep
 115        /// <param name="operationIndex">Index associated with the operation.</param>
 116        /// <param name="cancellationToken">Cancellation Token to cancel the request.</param>
 117        /// <returns>Task of ApiResponse (List&lt;Person&gt;)</returns>
 118        System.Threading.Tasks.Task<ApiResponse<List<Person>>> FindAllPeopleWithHttpInfoAsync(int operationIndex = 0, Sy
 119        /// <summary>
 120        /// Find a person by ID
 121        /// </summary>
 122        /// <remarks>
 123        ///
 124        /// </remarks>
 125        /// <exception cref="Applications.WeShare.Swagger.Client.ApiException">Thrown when fails to make API call</excep
 126        /// <param name="personId">The ID of the person</param>
 127        /// <param name="operationIndex">Index associated with the operation.</param>
 128        /// <param name="cancellationToken">Cancellation Token to cancel the request.</param>
 129        /// <returns>Task of Person</returns>
 130        System.Threading.Tasks.Task<Person> FindPersonByIdAsync(int personId, int operationIndex = 0, System.Threading.C
 131
 132        /// <summary>
 133        /// Find a person by ID
 134        /// </summary>
 135        /// <remarks>
 136        ///
 137        /// </remarks>
 138        /// <exception cref="Applications.WeShare.Swagger.Client.ApiException">Thrown when fails to make API call</excep
 139        /// <param name="personId">The ID of the person</param>
 140        /// <param name="operationIndex">Index associated with the operation.</param>
 141        /// <param name="cancellationToken">Cancellation Token to cancel the request.</param>
 142        /// <returns>Task of ApiResponse (Person)</returns>
 143        System.Threading.Tasks.Task<ApiResponse<Person>> FindPersonByIdWithHttpInfoAsync(int personId, int operationInde
 144        /// <summary>
 145        /// Login to WeShare
 146        /// </summary>
 147        /// <remarks>
 148        ///
 149        /// </remarks>
 150        /// <exception cref="Applications.WeShare.Swagger.Client.ApiException">Thrown when fails to make API call</excep
 151        /// <param name="loginDTO"> (optional)</param>
 152        /// <param name="operationIndex">Index associated with the operation.</param>
 153        /// <param name="cancellationToken">Cancellation Token to cancel the request.</param>
 154        /// <returns>Task of Person</returns>
 155        System.Threading.Tasks.Task<Person> LoginAsync(LoginDTO loginDTO = default(LoginDTO), int operationIndex = 0, Sy
 156
 157        /// <summary>
 158        /// Login to WeShare
 159        /// </summary>
 160        /// <remarks>
 161        ///
 162        /// </remarks>
 163        /// <exception cref="Applications.WeShare.Swagger.Client.ApiException">Thrown when fails to make API call</excep
 164        /// <param name="loginDTO"> (optional)</param>
 165        /// <param name="operationIndex">Index associated with the operation.</param>
 166        /// <param name="cancellationToken">Cancellation Token to cancel the request.</param>
 167        /// <returns>Task of ApiResponse (Person)</returns>
 168        System.Threading.Tasks.Task<ApiResponse<Person>> LoginWithHttpInfoAsync(LoginDTO loginDTO = default(LoginDTO), i
 169        #endregion Asynchronous Operations
 170    }
 171
 172    /// <summary>
 173    /// Represents a collection of functions to interact with the API endpoints
 174    /// </summary>
 175    public interface IPeopleApi : IPeopleApiSync, IPeopleApiAsync
 176    {
 177
 178    }
 179
 180    /// <summary>
 181    /// Represents a collection of functions to interact with the API endpoints
 182    /// </summary>
 183    public partial class PeopleApi : IPeopleApi
 184    {
 2185        private Applications.WeShare.Swagger.Client.ExceptionFactory _exceptionFactory = (name, response) => null;
 186
 187        /// <summary>
 188        /// Initializes a new instance of the <see cref="PeopleApi"/> class.
 189        /// </summary>
 190        /// <returns></returns>
 0191        public PeopleApi() : this((string)null)
 0192        {
 0193        }
 194
 195        /// <summary>
 196        /// Initializes a new instance of the <see cref="PeopleApi"/> class.
 197        /// </summary>
 198        /// <returns></returns>
 2199        public PeopleApi(string basePath)
 2200        {
 2201            this.Configuration = Applications.WeShare.Swagger.Client.Configuration.MergeConfigurations(
 2202                Applications.WeShare.Swagger.Client.GlobalConfiguration.Instance,
 2203                new Applications.WeShare.Swagger.Client.Configuration { BasePath = basePath }
 2204            );
 2205            this.Client = new Applications.WeShare.Swagger.Client.ApiClient(this.Configuration.BasePath);
 2206            this.AsynchronousClient = new Applications.WeShare.Swagger.Client.ApiClient(this.Configuration.BasePath);
 2207            this.ExceptionFactory = Applications.WeShare.Swagger.Client.Configuration.DefaultExceptionFactory;
 2208        }
 209
 210        /// <summary>
 211        /// Initializes a new instance of the <see cref="PeopleApi"/> class
 212        /// using Configuration object
 213        /// </summary>
 214        /// <param name="configuration">An instance of Configuration</param>
 215        /// <returns></returns>
 0216        public PeopleApi(Applications.WeShare.Swagger.Client.Configuration configuration)
 0217        {
 0218            if (configuration == null) throw new ArgumentNullException("configuration");
 219
 0220            this.Configuration = Applications.WeShare.Swagger.Client.Configuration.MergeConfigurations(
 0221                Applications.WeShare.Swagger.Client.GlobalConfiguration.Instance,
 0222                configuration
 0223            );
 0224            this.Client = new Applications.WeShare.Swagger.Client.ApiClient(this.Configuration.BasePath);
 0225            this.AsynchronousClient = new Applications.WeShare.Swagger.Client.ApiClient(this.Configuration.BasePath);
 0226            ExceptionFactory = Applications.WeShare.Swagger.Client.Configuration.DefaultExceptionFactory;
 0227        }
 228
 229        /// <summary>
 230        /// Initializes a new instance of the <see cref="PeopleApi"/> class
 231        /// using a Configuration object and client instance.
 232        /// </summary>
 233        /// <param name="client">The client interface for synchronous API access.</param>
 234        /// <param name="asyncClient">The client interface for asynchronous API access.</param>
 235        /// <param name="configuration">The configuration object.</param>
 0236        public PeopleApi(Applications.WeShare.Swagger.Client.ISynchronousClient client, Applications.WeShare.Swagger.Cli
 0237        {
 0238            if (client == null) throw new ArgumentNullException("client");
 0239            if (asyncClient == null) throw new ArgumentNullException("asyncClient");
 0240            if (configuration == null) throw new ArgumentNullException("configuration");
 241
 0242            this.Client = client;
 0243            this.AsynchronousClient = asyncClient;
 0244            this.Configuration = configuration;
 0245            this.ExceptionFactory = Applications.WeShare.Swagger.Client.Configuration.DefaultExceptionFactory;
 0246        }
 247
 248        /// <summary>
 249        /// The client for accessing this underlying API asynchronously.
 250        /// </summary>
 2251        public Applications.WeShare.Swagger.Client.IAsynchronousClient AsynchronousClient { get; set; }
 252
 253        /// <summary>
 254        /// The client for accessing this underlying API synchronously.
 255        /// </summary>
 8256        public Applications.WeShare.Swagger.Client.ISynchronousClient Client { get; set; }
 257
 258        /// <summary>
 259        /// Gets the base path of the API client.
 260        /// </summary>
 261        /// <value>The base path</value>
 262        public string GetBasePath()
 0263        {
 0264            return this.Configuration.BasePath;
 0265        }
 266
 267        /// <summary>
 268        /// Gets or sets the configuration object
 269        /// </summary>
 270        /// <value>An instance of the Configuration</value>
 12271        public Applications.WeShare.Swagger.Client.IReadableConfiguration Configuration { get; set; }
 272
 273        /// <summary>
 274        /// Provides a factory method hook for the creation of exceptions.
 275        /// </summary>
 276        public Applications.WeShare.Swagger.Client.ExceptionFactory ExceptionFactory
 277        {
 278            get
 12279            {
 12280                if (_exceptionFactory != null && _exceptionFactory.GetInvocationList().Length > 1)
 0281                {
 0282                    throw new InvalidOperationException("Multicast delegate for ExceptionFactory is unsupported.");
 283                }
 12284                return _exceptionFactory;
 12285            }
 6286            set { _exceptionFactory = value; }
 287        }
 288
 289        /// <summary>
 290        /// Find all people that use WeShare
 291        /// </summary>
 292        /// <exception cref="Applications.WeShare.Swagger.Client.ApiException">Thrown when fails to make API call</excep
 293        /// <param name="operationIndex">Index associated with the operation.</param>
 294        /// <returns>List&lt;Person&gt;</returns>
 295        public List<Person> FindAllPeople(int operationIndex = 0)
 1296        {
 1297            Applications.WeShare.Swagger.Client.ApiResponse<List<Person>> localVarResponse = FindAllPeopleWithHttpInfo()
 0298            return localVarResponse.Data;
 0299        }
 300
 301        /// <summary>
 302        /// Find all people that use WeShare
 303        /// </summary>
 304        /// <exception cref="Applications.WeShare.Swagger.Client.ApiException">Thrown when fails to make API call</excep
 305        /// <param name="operationIndex">Index associated with the operation.</param>
 306        /// <returns>ApiResponse of List&lt;Person&gt;</returns>
 307        public Applications.WeShare.Swagger.Client.ApiResponse<List<Person>> FindAllPeopleWithHttpInfo(int operationInde
 1308        {
 1309            Applications.WeShare.Swagger.Client.RequestOptions localVarRequestOptions = new Applications.WeShare.Swagger
 310
 1311            string[] _contentTypes = new string[] {
 1312            };
 313
 314            // to determine the Accept header
 1315            string[] _accepts = new string[] {
 1316                "application/json"
 1317            };
 318
 1319            var localVarContentType = Applications.WeShare.Swagger.Client.ClientUtils.SelectHeaderContentType(_contentTy
 1320            if (localVarContentType != null)
 0321            {
 0322                localVarRequestOptions.HeaderParameters.Add("Content-Type", localVarContentType);
 0323            }
 324
 1325            var localVarAccept = Applications.WeShare.Swagger.Client.ClientUtils.SelectHeaderAccept(_accepts);
 1326            if (localVarAccept != null)
 1327            {
 1328                localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept);
 1329            }
 330
 331
 1332            localVarRequestOptions.Operation = "PeopleApi.FindAllPeople";
 1333            localVarRequestOptions.OperationIndex = operationIndex;
 334
 335
 336            // make the HTTP request
 1337            var localVarResponse = this.Client.Get<List<Person>>("/people", localVarRequestOptions, this.Configuration);
 1338            if (this.ExceptionFactory != null)
 1339            {
 1340                Exception _exception = this.ExceptionFactory("FindAllPeople", localVarResponse);
 1341                if (_exception != null)
 1342                {
 1343                    throw _exception;
 344                }
 0345            }
 346
 0347            return localVarResponse;
 0348        }
 349
 350        /// <summary>
 351        /// Find all people that use WeShare
 352        /// </summary>
 353        /// <exception cref="Applications.WeShare.Swagger.Client.ApiException">Thrown when fails to make API call</excep
 354        /// <param name="operationIndex">Index associated with the operation.</param>
 355        /// <param name="cancellationToken">Cancellation Token to cancel the request.</param>
 356        /// <returns>Task of List&lt;Person&gt;</returns>
 357        public async System.Threading.Tasks.Task<List<Person>> FindAllPeopleAsync(int operationIndex = 0, System.Threadi
 0358        {
 0359            Applications.WeShare.Swagger.Client.ApiResponse<List<Person>> localVarResponse = await FindAllPeopleWithHttp
 0360            return localVarResponse.Data;
 0361        }
 362
 363        /// <summary>
 364        /// Find all people that use WeShare
 365        /// </summary>
 366        /// <exception cref="Applications.WeShare.Swagger.Client.ApiException">Thrown when fails to make API call</excep
 367        /// <param name="operationIndex">Index associated with the operation.</param>
 368        /// <param name="cancellationToken">Cancellation Token to cancel the request.</param>
 369        /// <returns>Task of ApiResponse (List&lt;Person&gt;)</returns>
 370        public async System.Threading.Tasks.Task<Applications.WeShare.Swagger.Client.ApiResponse<List<Person>>> FindAllP
 0371        {
 372
 0373            Applications.WeShare.Swagger.Client.RequestOptions localVarRequestOptions = new Applications.WeShare.Swagger
 374
 0375            string[] _contentTypes = new string[] {
 0376            };
 377
 378            // to determine the Accept header
 0379            string[] _accepts = new string[] {
 0380                "application/json"
 0381            };
 382
 0383            var localVarContentType = Applications.WeShare.Swagger.Client.ClientUtils.SelectHeaderContentType(_contentTy
 0384            if (localVarContentType != null)
 0385            {
 0386                localVarRequestOptions.HeaderParameters.Add("Content-Type", localVarContentType);
 0387            }
 388
 0389            var localVarAccept = Applications.WeShare.Swagger.Client.ClientUtils.SelectHeaderAccept(_accepts);
 0390            if (localVarAccept != null)
 0391            {
 0392                localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept);
 0393            }
 394
 395
 0396            localVarRequestOptions.Operation = "PeopleApi.FindAllPeople";
 0397            localVarRequestOptions.OperationIndex = operationIndex;
 398
 399
 400            // make the HTTP request
 0401            var localVarResponse = await this.AsynchronousClient.GetAsync<List<Person>>("/people", localVarRequestOption
 402
 0403            if (this.ExceptionFactory != null)
 0404            {
 0405                Exception _exception = this.ExceptionFactory("FindAllPeople", localVarResponse);
 0406                if (_exception != null)
 0407                {
 0408                    throw _exception;
 409                }
 0410            }
 411
 0412            return localVarResponse;
 0413        }
 414
 415        /// <summary>
 416        /// Find a person by ID
 417        /// </summary>
 418        /// <exception cref="Applications.WeShare.Swagger.Client.ApiException">Thrown when fails to make API call</excep
 419        /// <param name="personId">The ID of the person</param>
 420        /// <param name="operationIndex">Index associated with the operation.</param>
 421        /// <returns>Person</returns>
 422        public Person FindPersonById(int personId, int operationIndex = 0)
 3423        {
 3424            Applications.WeShare.Swagger.Client.ApiResponse<Person> localVarResponse = FindPersonByIdWithHttpInfo(person
 1425            return localVarResponse.Data;
 1426        }
 427
 428        /// <summary>
 429        /// Find a person by ID
 430        /// </summary>
 431        /// <exception cref="Applications.WeShare.Swagger.Client.ApiException">Thrown when fails to make API call</excep
 432        /// <param name="personId">The ID of the person</param>
 433        /// <param name="operationIndex">Index associated with the operation.</param>
 434        /// <returns>ApiResponse of Person</returns>
 435        public Applications.WeShare.Swagger.Client.ApiResponse<Person> FindPersonByIdWithHttpInfo(int personId, int oper
 3436        {
 3437            Applications.WeShare.Swagger.Client.RequestOptions localVarRequestOptions = new Applications.WeShare.Swagger
 438
 3439            string[] _contentTypes = new string[] {
 3440            };
 441
 442            // to determine the Accept header
 3443            string[] _accepts = new string[] {
 3444                "application/json"
 3445            };
 446
 3447            var localVarContentType = Applications.WeShare.Swagger.Client.ClientUtils.SelectHeaderContentType(_contentTy
 3448            if (localVarContentType != null)
 0449            {
 0450                localVarRequestOptions.HeaderParameters.Add("Content-Type", localVarContentType);
 0451            }
 452
 3453            var localVarAccept = Applications.WeShare.Swagger.Client.ClientUtils.SelectHeaderAccept(_accepts);
 3454            if (localVarAccept != null)
 3455            {
 3456                localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept);
 3457            }
 458
 3459            localVarRequestOptions.PathParameters.Add("personId", Applications.WeShare.Swagger.Client.ClientUtils.Parame
 460
 3461            localVarRequestOptions.Operation = "PeopleApi.FindPersonById";
 3462            localVarRequestOptions.OperationIndex = operationIndex;
 463
 464
 465            // make the HTTP request
 3466            var localVarResponse = this.Client.Get<Person>("/api/people/{personId}", localVarRequestOptions, this.Config
 3467            if (this.ExceptionFactory != null)
 3468            {
 3469                Exception _exception = this.ExceptionFactory("FindPersonById", localVarResponse);
 3470                if (_exception != null)
 2471                {
 2472                    throw _exception;
 473                }
 1474            }
 475
 1476            return localVarResponse;
 1477        }
 478
 479        /// <summary>
 480        /// Find a person by ID
 481        /// </summary>
 482        /// <exception cref="Applications.WeShare.Swagger.Client.ApiException">Thrown when fails to make API call</excep
 483        /// <param name="personId">The ID of the person</param>
 484        /// <param name="operationIndex">Index associated with the operation.</param>
 485        /// <param name="cancellationToken">Cancellation Token to cancel the request.</param>
 486        /// <returns>Task of Person</returns>
 487        public async System.Threading.Tasks.Task<Person> FindPersonByIdAsync(int personId, int operationIndex = 0, Syste
 0488        {
 0489            Applications.WeShare.Swagger.Client.ApiResponse<Person> localVarResponse = await FindPersonByIdWithHttpInfoA
 0490            return localVarResponse.Data;
 0491        }
 492
 493        /// <summary>
 494        /// Find a person by ID
 495        /// </summary>
 496        /// <exception cref="Applications.WeShare.Swagger.Client.ApiException">Thrown when fails to make API call</excep
 497        /// <param name="personId">The ID of the person</param>
 498        /// <param name="operationIndex">Index associated with the operation.</param>
 499        /// <param name="cancellationToken">Cancellation Token to cancel the request.</param>
 500        /// <returns>Task of ApiResponse (Person)</returns>
 501        public async System.Threading.Tasks.Task<Applications.WeShare.Swagger.Client.ApiResponse<Person>> FindPersonById
 0502        {
 503
 0504            Applications.WeShare.Swagger.Client.RequestOptions localVarRequestOptions = new Applications.WeShare.Swagger
 505
 0506            string[] _contentTypes = new string[] {
 0507            };
 508
 509            // to determine the Accept header
 0510            string[] _accepts = new string[] {
 0511                "application/json"
 0512            };
 513
 0514            var localVarContentType = Applications.WeShare.Swagger.Client.ClientUtils.SelectHeaderContentType(_contentTy
 0515            if (localVarContentType != null)
 0516            {
 0517                localVarRequestOptions.HeaderParameters.Add("Content-Type", localVarContentType);
 0518            }
 519
 0520            var localVarAccept = Applications.WeShare.Swagger.Client.ClientUtils.SelectHeaderAccept(_accepts);
 0521            if (localVarAccept != null)
 0522            {
 0523                localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept);
 0524            }
 525
 0526            localVarRequestOptions.PathParameters.Add("personId", Applications.WeShare.Swagger.Client.ClientUtils.Parame
 527
 0528            localVarRequestOptions.Operation = "PeopleApi.FindPersonById";
 0529            localVarRequestOptions.OperationIndex = operationIndex;
 530
 531
 532            // make the HTTP request
 0533            var localVarResponse = await this.AsynchronousClient.GetAsync<Person>("/api/people/{personId}", localVarRequ
 534
 0535            if (this.ExceptionFactory != null)
 0536            {
 0537                Exception _exception = this.ExceptionFactory("FindPersonById", localVarResponse);
 0538                if (_exception != null)
 0539                {
 0540                    throw _exception;
 541                }
 0542            }
 543
 0544            return localVarResponse;
 0545        }
 546
 547        /// <summary>
 548        /// Login to WeShare
 549        /// </summary>
 550        /// <exception cref="Applications.WeShare.Swagger.Client.ApiException">Thrown when fails to make API call</excep
 551        /// <param name="loginDTO"> (optional)</param>
 552        /// <param name="operationIndex">Index associated with the operation.</param>
 553        /// <returns>Person</returns>
 554        public Person Login(LoginDTO loginDTO = default(LoginDTO), int operationIndex = 0)
 0555        {
 0556            Applications.WeShare.Swagger.Client.ApiResponse<Person> localVarResponse = LoginWithHttpInfo(loginDTO);
 0557            return localVarResponse.Data;
 0558        }
 559
 560        /// <summary>
 561        /// Login to WeShare
 562        /// </summary>
 563        /// <exception cref="Applications.WeShare.Swagger.Client.ApiException">Thrown when fails to make API call</excep
 564        /// <param name="loginDTO"> (optional)</param>
 565        /// <param name="operationIndex">Index associated with the operation.</param>
 566        /// <returns>ApiResponse of Person</returns>
 567        public Applications.WeShare.Swagger.Client.ApiResponse<Person> LoginWithHttpInfo(LoginDTO loginDTO = default(Log
 2568        {
 2569            Applications.WeShare.Swagger.Client.RequestOptions localVarRequestOptions = new Applications.WeShare.Swagger
 570
 2571            string[] _contentTypes = new string[] {
 2572                "application/json"
 2573            };
 574
 575            // to determine the Accept header
 2576            string[] _accepts = new string[] {
 2577                "application/json"
 2578            };
 579
 2580            var localVarContentType = Applications.WeShare.Swagger.Client.ClientUtils.SelectHeaderContentType(_contentTy
 2581            if (localVarContentType != null)
 2582            {
 2583                localVarRequestOptions.HeaderParameters.Add("Content-Type", localVarContentType);
 2584            }
 585
 2586            var localVarAccept = Applications.WeShare.Swagger.Client.ClientUtils.SelectHeaderAccept(_accepts);
 2587            if (localVarAccept != null)
 2588            {
 2589                localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept);
 2590            }
 591
 2592            localVarRequestOptions.Data = loginDTO;
 593
 2594            localVarRequestOptions.Operation = "PeopleApi.Login";
 2595            localVarRequestOptions.OperationIndex = operationIndex;
 596
 597
 598            // make the HTTP request
 2599            var localVarResponse = this.Client.Post<Person>("/api/people", localVarRequestOptions, this.Configuration);
 2600            if (this.ExceptionFactory != null)
 2601            {
 2602                Exception _exception = this.ExceptionFactory("Login", localVarResponse);
 2603                if (_exception != null)
 1604                {
 1605                    throw _exception;
 606                }
 1607            }
 608
 1609            return localVarResponse;
 1610        }
 611
 612        /// <summary>
 613        /// Login to WeShare
 614        /// </summary>
 615        /// <exception cref="Applications.WeShare.Swagger.Client.ApiException">Thrown when fails to make API call</excep
 616        /// <param name="loginDTO"> (optional)</param>
 617        /// <param name="operationIndex">Index associated with the operation.</param>
 618        /// <param name="cancellationToken">Cancellation Token to cancel the request.</param>
 619        /// <returns>Task of Person</returns>
 620        public async System.Threading.Tasks.Task<Person> LoginAsync(LoginDTO loginDTO = default(LoginDTO), int operation
 0621        {
 0622            Applications.WeShare.Swagger.Client.ApiResponse<Person> localVarResponse = await LoginWithHttpInfoAsync(logi
 0623            return localVarResponse.Data;
 0624        }
 625
 626        /// <summary>
 627        /// Login to WeShare
 628        /// </summary>
 629        /// <exception cref="Applications.WeShare.Swagger.Client.ApiException">Thrown when fails to make API call</excep
 630        /// <param name="loginDTO"> (optional)</param>
 631        /// <param name="operationIndex">Index associated with the operation.</param>
 632        /// <param name="cancellationToken">Cancellation Token to cancel the request.</param>
 633        /// <returns>Task of ApiResponse (Person)</returns>
 634        public async System.Threading.Tasks.Task<Applications.WeShare.Swagger.Client.ApiResponse<Person>> LoginWithHttpI
 0635        {
 636
 0637            Applications.WeShare.Swagger.Client.RequestOptions localVarRequestOptions = new Applications.WeShare.Swagger
 638
 0639            string[] _contentTypes = new string[] {
 0640                "application/json"
 0641            };
 642
 643            // to determine the Accept header
 0644            string[] _accepts = new string[] {
 0645                "application/json"
 0646            };
 647
 0648            var localVarContentType = Applications.WeShare.Swagger.Client.ClientUtils.SelectHeaderContentType(_contentTy
 0649            if (localVarContentType != null)
 0650            {
 0651                localVarRequestOptions.HeaderParameters.Add("Content-Type", localVarContentType);
 0652            }
 653
 0654            var localVarAccept = Applications.WeShare.Swagger.Client.ClientUtils.SelectHeaderAccept(_accepts);
 0655            if (localVarAccept != null)
 0656            {
 0657                localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept);
 0658            }
 659
 0660            localVarRequestOptions.Data = loginDTO;
 661
 0662            localVarRequestOptions.Operation = "PeopleApi.Login";
 0663            localVarRequestOptions.OperationIndex = operationIndex;
 664
 665
 666            // make the HTTP request
 0667            var localVarResponse = await this.AsynchronousClient.PostAsync<Person>("/api/people", localVarRequestOptions
 668
 0669            if (this.ExceptionFactory != null)
 0670            {
 0671                Exception _exception = this.ExceptionFactory("Login", localVarResponse);
 0672                if (_exception != null)
 0673                {
 0674                    throw _exception;
 675                }
 0676            }
 677
 0678            return localVarResponse;
 0679        }
 680
 681    }
 682}

Methods/Properties

System.Void Applications.WeShare.Swagger.Api.PeopleApi::.ctor(System.String)
System.Void Applications.WeShare.Swagger.Api.PeopleApi::.ctor()
System.Void Applications.WeShare.Swagger.Api.PeopleApi::.ctor(Applications.WeShare.Swagger.Client.Configuration)
System.Void Applications.WeShare.Swagger.Api.PeopleApi::.ctor(Applications.WeShare.Swagger.Client.ISynchronousClient,Applications.WeShare.Swagger.Client.IAsynchronousClient,Applications.WeShare.Swagger.Client.IReadableConfiguration)
Applications.WeShare.Swagger.Client.IAsynchronousClient Applications.WeShare.Swagger.Api.PeopleApi::get_AsynchronousClient()
Applications.WeShare.Swagger.Client.ISynchronousClient Applications.WeShare.Swagger.Api.PeopleApi::get_Client()
System.String Applications.WeShare.Swagger.Api.PeopleApi::GetBasePath()
Applications.WeShare.Swagger.Client.IReadableConfiguration Applications.WeShare.Swagger.Api.PeopleApi::get_Configuration()
Applications.WeShare.Swagger.Client.ExceptionFactory Applications.WeShare.Swagger.Api.PeopleApi::get_ExceptionFactory()
System.Void Applications.WeShare.Swagger.Api.PeopleApi::set_ExceptionFactory(Applications.WeShare.Swagger.Client.ExceptionFactory)
System.Collections.Generic.List`1<Applications.WeShare.Swagger.Model.Person> Applications.WeShare.Swagger.Api.PeopleApi::FindAllPeople(System.Int32)
Applications.WeShare.Swagger.Client.ApiResponse`1<System.Collections.Generic.List`1<Applications.WeShare.Swagger.Model.Person>> Applications.WeShare.Swagger.Api.PeopleApi::FindAllPeopleWithHttpInfo(System.Int32)
System.Void Applications.WeShare.Swagger.Api.PeopleApi/<FindAllPeopleAsync>d__23::MoveNext()
System.Void Applications.WeShare.Swagger.Api.PeopleApi/<FindAllPeopleWithHttpInfoAsync>d__24::MoveNext()
Applications.WeShare.Swagger.Model.Person Applications.WeShare.Swagger.Api.PeopleApi::FindPersonById(System.Int32,System.Int32)
Applications.WeShare.Swagger.Client.ApiResponse`1<Applications.WeShare.Swagger.Model.Person> Applications.WeShare.Swagger.Api.PeopleApi::FindPersonByIdWithHttpInfo(System.Int32,System.Int32)
System.Void Applications.WeShare.Swagger.Api.PeopleApi/<FindPersonByIdAsync>d__27::MoveNext()
System.Void Applications.WeShare.Swagger.Api.PeopleApi/<FindPersonByIdWithHttpInfoAsync>d__28::MoveNext()
Applications.WeShare.Swagger.Model.Person Applications.WeShare.Swagger.Api.PeopleApi::Login(Applications.WeShare.Swagger.Model.LoginDTO,System.Int32)
Applications.WeShare.Swagger.Client.ApiResponse`1<Applications.WeShare.Swagger.Model.Person> Applications.WeShare.Swagger.Api.PeopleApi::LoginWithHttpInfo(Applications.WeShare.Swagger.Model.LoginDTO,System.Int32)
System.Void Applications.WeShare.Swagger.Api.PeopleApi/<LoginAsync>d__31::MoveNext()
System.Void Applications.WeShare.Swagger.Api.PeopleApi/<LoginWithHttpInfoAsync>d__32::MoveNext()