Skip to content

Latest commit

 

History

History
331 lines (248 loc) · 9.13 KB

File metadata and controls

331 lines (248 loc) · 9.13 KB

Itofinity.Appveyor.Refit.Api.CollaboratorApi

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

Method HTTP request Description
AddCollaborator Post /collaborators Add collaborator
DeleteCollaborator Delete /collaborators/{userId} Delete collaborator
GetCollaborator Get /collaborators/{userId} Get collaborator
GetCollaborators Get /collaborators Get collaborators
UpdateCollaborator Put /collaborators Update collaborator

AddCollaborator

void AddCollaborator (CollaboratorAddition body)

Add collaborator

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 AddCollaboratorExample
    {
        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 CollaboratorApi();
            var body = new CollaboratorAddition(); // CollaboratorAddition | 

            try
            {
                // Add collaborator
                apiInstance.AddCollaborator(body);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling CollaboratorApi.AddCollaborator: " + e.Message );
            }
        }
    }
}

Parameters

Name Type Description Notes
body CollaboratorAddition

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]

DeleteCollaborator

void DeleteCollaborator (int? userId)

Delete collaborator

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 DeleteCollaboratorExample
    {
        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 CollaboratorApi();
            var userId = 56;  // int? | User ID

            try
            {
                // Delete collaborator
                apiInstance.DeleteCollaborator(userId);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling CollaboratorApi.DeleteCollaborator: " + 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]

GetCollaborator

UserAccountRolesResults GetCollaborator (int? userId)

Get collaborator

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 GetCollaboratorExample
    {
        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 CollaboratorApi();
            var userId = 56;  // int? | User ID

            try
            {
                // Get collaborator
                UserAccountRolesResults result = apiInstance.GetCollaborator(userId);
                Debug.WriteLine(result);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling CollaboratorApi.GetCollaborator: " + 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]

GetCollaborators

List GetCollaborators ()

Get collaborators

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 GetCollaboratorsExample
    {
        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 CollaboratorApi();

            try
            {
                // Get collaborators
                List<UserAccount> result = apiInstance.GetCollaborators();
                Debug.WriteLine(result);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling CollaboratorApi.GetCollaborators: " + 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]

UpdateCollaborator

void UpdateCollaborator (CollaboratorUpdate body)

Update collaborator

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 UpdateCollaboratorExample
    {
        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 CollaboratorApi();
            var body = new CollaboratorUpdate(); // CollaboratorUpdate | 

            try
            {
                // Update collaborator
                apiInstance.UpdateCollaborator(body);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling CollaboratorApi.UpdateCollaborator: " + e.Message );
            }
        }
    }
}

Parameters

Name Type Description Notes
body CollaboratorUpdate

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]