Skip to content

Latest commit

 

History

History
331 lines (248 loc) · 8.46 KB

UserApi.md

File metadata and controls

331 lines (248 loc) · 8.46 KB

Itofinity.Appveyor.Refit.Api.UserApi

All URIs are relative to https://ci.appveyor.com/api

Method HTTP request Description
AddUser Post /users Add user
DeleteUser Delete /users/{userId} Delete user
GetUser Get /users/{userId} Get user
GetUsers Get /users Get users
UpdateUser Put /users Update user

AddUser

void AddUser (UserAddition body)

Add user

Example

using System;
using System.Diagnostics;
using Itofinity.Appveyor.Refit.Api;
using Itofinity.Appveyor.Refit.Client;
using Itofinity.Appveyor.Refit.Model;

namespace Example
{
    public class AddUserExample
    {
        public void main()
        {
            
            // Configure API key authorization: apiToken
            Configuration.Default.ApiKey.Add("Authorization", "YOUR_API_KEY");
            // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
            // Configuration.Default.ApiKeyPrefix.Add("Authorization", "Bearer");

            var apiInstance = new UserApi();
            var body = new UserAddition(); // UserAddition | 

            try
            {
                // Add user
                apiInstance.AddUser(body);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling UserApi.AddUser: " + e.Message );
            }
        }
    }
}

Parameters

Name Type Description Notes
body UserAddition

Return type

void (empty response body)

Authorization

apiToken

HTTP request headers

  • Content-Type: application/json
  • Accept: application/json, application/xml

[Back to top] [Back to API list] [Back to Model list] [Back to README]

DeleteUser

void DeleteUser (int? userId)

Delete user

Example

using System;
using System.Diagnostics;
using Itofinity.Appveyor.Refit.Api;
using Itofinity.Appveyor.Refit.Client;
using Itofinity.Appveyor.Refit.Model;

namespace Example
{
    public class DeleteUserExample
    {
        public void main()
        {
            
            // Configure API key authorization: apiToken
            Configuration.Default.ApiKey.Add("Authorization", "YOUR_API_KEY");
            // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
            // Configuration.Default.ApiKeyPrefix.Add("Authorization", "Bearer");

            var apiInstance = new UserApi();
            var userId = 56;  // int? | User ID

            try
            {
                // Delete user
                apiInstance.DeleteUser(userId);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling UserApi.DeleteUser: " + e.Message );
            }
        }
    }
}

Parameters

Name Type Description Notes
userId int? User ID

Return type

void (empty response body)

Authorization

apiToken

HTTP request headers

  • Content-Type: application/json
  • Accept: application/json, application/xml

[Back to top] [Back to API list] [Back to Model list] [Back to README]

GetUser

UserAccountRolesResults GetUser (int? userId)

Get user

Example

using System;
using System.Diagnostics;
using Itofinity.Appveyor.Refit.Api;
using Itofinity.Appveyor.Refit.Client;
using Itofinity.Appveyor.Refit.Model;

namespace Example
{
    public class GetUserExample
    {
        public void main()
        {
            
            // Configure API key authorization: apiToken
            Configuration.Default.ApiKey.Add("Authorization", "YOUR_API_KEY");
            // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
            // Configuration.Default.ApiKeyPrefix.Add("Authorization", "Bearer");

            var apiInstance = new UserApi();
            var userId = 56;  // int? | User ID

            try
            {
                // Get user
                UserAccountRolesResults result = apiInstance.GetUser(userId);
                Debug.WriteLine(result);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling UserApi.GetUser: " + e.Message );
            }
        }
    }
}

Parameters

Name Type Description Notes
userId int? User ID

Return type

UserAccountRolesResults

Authorization

apiToken

HTTP request headers

  • Content-Type: application/json
  • Accept: application/json, application/xml

[Back to top] [Back to API list] [Back to Model list] [Back to README]

GetUsers

List GetUsers ()

Get users

Example

using System;
using System.Diagnostics;
using Itofinity.Appveyor.Refit.Api;
using Itofinity.Appveyor.Refit.Client;
using Itofinity.Appveyor.Refit.Model;

namespace Example
{
    public class GetUsersExample
    {
        public void main()
        {
            
            // Configure API key authorization: apiToken
            Configuration.Default.ApiKey.Add("Authorization", "YOUR_API_KEY");
            // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
            // Configuration.Default.ApiKeyPrefix.Add("Authorization", "Bearer");

            var apiInstance = new UserApi();

            try
            {
                // Get users
                List<UserAccount> result = apiInstance.GetUsers();
                Debug.WriteLine(result);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling UserApi.GetUsers: " + e.Message );
            }
        }
    }
}

Parameters

This endpoint does not need any parameter.

Return type

List

Authorization

apiToken

HTTP request headers

  • Content-Type: application/json
  • Accept: application/json, application/xml

[Back to top] [Back to API list] [Back to Model list] [Back to README]

UpdateUser

void UpdateUser (UserAccount body)

Update user

Example

using System;
using System.Diagnostics;
using Itofinity.Appveyor.Refit.Api;
using Itofinity.Appveyor.Refit.Client;
using Itofinity.Appveyor.Refit.Model;

namespace Example
{
    public class UpdateUserExample
    {
        public void main()
        {
            
            // Configure API key authorization: apiToken
            Configuration.Default.ApiKey.Add("Authorization", "YOUR_API_KEY");
            // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
            // Configuration.Default.ApiKeyPrefix.Add("Authorization", "Bearer");

            var apiInstance = new UserApi();
            var body = new UserAccount(); // UserAccount | 

            try
            {
                // Update user
                apiInstance.UpdateUser(body);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling UserApi.UpdateUser: " + e.Message );
            }
        }
    }
}

Parameters

Name Type Description Notes
body UserAccount

Return type

void (empty response body)

Authorization

apiToken

HTTP request headers

  • Content-Type: application/json
  • Accept: application/json, application/xml

[Back to top] [Back to API list] [Back to Model list] [Back to README]