Skip to content

itofinity/Itofinity-Appveyor-Refit

Repository files navigation

Itofinity.Appveyor.Refit - the C# library for the AppVeyor REST API

AppVeyor is a hosted continuous integration service which runs on Microsoft Windows. The AppVeyor REST API provides a RESTful way to interact with the AppVeyor service. This includes managing projects, builds, deployments, and the teams that build them. Additional help and discussion of the AppVeyor REST API is available at http://help.appveyor.com/discussions This Swagger definition is an unofficial description of the AppVeyor REST API maintained at https://github.com/kevinoid/appveyor-swagger Please report any issues or suggestions for this Swagger definition at https://github.com/kevinoid/appveyor-swagger/issues/new #### API Conventions Fields which are missing from update operations (PUT requests) are typically reset to their default values. So although most fields are not technically required, they should usually be specified in practice.

This C# SDK is automatically generated by the Swagger Codegen project:

Frameworks supported

  • .NET Standard >= 2.0

Dependencies

  • Refit - 4.0.0-build.16 or later
  • NUnit - 3.7.1 or later

Installation

Generate the DLL using Visual Studio 2017 (15.3.0)

Then include the DLL (under the bin folder) in the C# project, and use the namespaces:

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

Getting Started

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

namespace Example
{
public class Example
{
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 BuildApi();
        var accountName = accountName_example;  // string | AppVeyor account name (`accountName` property of `UserAccount`)
        var projectSlug = projectSlug_example;  // string | Project Slug
        var buildVersion = buildVersion_example;  // string | Build Version (`version` property of `Build`)

try
{
    // Cancel build
apiInstance.CancelBuild(accountName, projectSlug, buildVersion);
}
catch (Exception e)
{
Debug.Print("Exception when calling BuildApi.CancelBuild: " + e.Message );
}
}
}
}

Documentation for API Endpoints

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

Class Method HTTP request Description
BuildApi CancelBuild Delete /builds/{accountName}/{projectSlug}/{buildVersion} Cancel build
BuildApi GetBuildArtifact Get /buildjobs/{jobId}/artifacts/{artifactFileName} Download build artifact
BuildApi GetBuildArtifacts Get /buildjobs/{jobId}/artifacts Get build artifacts
BuildApi GetBuildLog Get /buildjobs/{jobId}/log Download build log
BuildApi StartBuild Post /builds Start build of branch most recent commit
CollaboratorApi AddCollaborator Post /collaborators Add collaborator
CollaboratorApi DeleteCollaborator Delete /collaborators/{userId} Delete collaborator
CollaboratorApi GetCollaborator Get /collaborators/{userId} Get collaborator
CollaboratorApi GetCollaborators Get /collaborators Get collaborators
CollaboratorApi UpdateCollaborator Put /collaborators Update collaborator
DeploymentApi CancelDeployment Delete /deployments/stop Cancel deployment
DeploymentApi GetDeployment Get /deployments/{deploymentId} Get deployment
DeploymentApi StartDeployment Post /deployments Start deployment
EnvironmentApi AddEnvironment Post /environments Add environment
EnvironmentApi DeleteEnvironment Delete /environments/{deploymentEnvironmentId} Delete environment
EnvironmentApi GetEnvironmentDeployments Get /environments/{deploymentEnvironmentId}/deployments Get environment deployments
EnvironmentApi GetEnvironmentSettings Get /environments/{deploymentEnvironmentId}/settings Get environment settings
EnvironmentApi GetEnvironments Get /environments Get environments
EnvironmentApi UpdateEnvironment Put /environments Update environment
ProjectApi AddProject Post /projects Add project
ProjectApi DeleteProject Delete /projects/{accountName}/{projectSlug} Delete project
ProjectApi DeleteProjectBuildCache Delete /projects/{accountName}/{projectSlug}/buildcache Delete project build cache
ProjectApi EncryptValue Post /account/encrypt Encrypt a value for use in StoredValue.
ProjectApi GetProjectArtifact Get /projects/{accountName}/{projectSlug}/artifacts/{artifactFileName} Get last successful build artifact
ProjectApi GetProjectBranchStatusBadge Get /projects/status/{statusBadgeId}/branch/{buildBranch} Get project branch status badge image
ProjectApi GetProjectBuildByVersion Get /projects/{accountName}/{projectSlug}/build/{buildVersion} Get project build by version
ProjectApi GetProjectDeployments Get /projects/{accountName}/{projectSlug}/deployments Get project deployments
ProjectApi GetProjectEnvironmentVariables Get /projects/{accountName}/{projectSlug}/settings/environment-variables Get project environment variables
ProjectApi GetProjectHistory Get /projects/{accountName}/{projectSlug}/history Get project history
ProjectApi GetProjectLastBuild Get /projects/{accountName}/{projectSlug} Get project last build
ProjectApi GetProjectLastBuildBranch Get /projects/{accountName}/{projectSlug}/branch/{buildBranch} Get project last branch build
ProjectApi GetProjectSettings Get /projects/{accountName}/{projectSlug}/settings Get project settings
ProjectApi GetProjectSettingsYaml Get /projects/{accountName}/{projectSlug}/settings/yaml Get project settings in YAML
ProjectApi GetProjectStatusBadge Get /projects/status/{statusBadgeId} Get project status badge image
ProjectApi GetProjects Get /projects Get projects
ProjectApi GetPublicProjectStatusBadge Get /projects/status/{badgeRepoProvider}/{repoAccountName}/{repoSlug} Get status badge image for a project with a public repository
ProjectApi UpdateProject Put /projects Update project
ProjectApi UpdateProjectBuildNumber Put /projects/{accountName}/{projectSlug}/settings/build-number Update project build number
ProjectApi UpdateProjectEnvironmentVariables Put /projects/{accountName}/{projectSlug}/settings/environment-variables Update project environment variables
ProjectApi UpdateProjectSettingsYaml Put /projects/{accountName}/{projectSlug}/settings/yaml Update project settings in YAML
RoleApi AddRole Post /roles Add role
RoleApi DeleteRole Delete /roles/{roleId} Delete role
RoleApi GetRole Get /roles/{roleId} Get role
RoleApi GetRoles Get /roles Get roles
RoleApi UpdateRole Put /roles Update role
UserApi AddUser Post /users Add user
UserApi DeleteUser Delete /users/{userId} Delete user
UserApi GetUser Get /users/{userId} Get user
UserApi GetUsers Get /users Get users
UserApi UpdateUser Put /users Update user

Documentation for Models

 - [Model.AccessRightName](docs/AccessRightName.md)
 - [Model.AceAccessRight](docs/AceAccessRight.md)
 - [Model.AceAccessRightDefinition](docs/AceAccessRightDefinition.md)
 - [Model.Artifact](docs/Artifact.md)
 - [Model.ArtifactModel](docs/ArtifactModel.md)
 - [Model.ArtifactType](docs/ArtifactType.md)
 - [Model.BuildCloudName](docs/BuildCloudName.md)
 - [Model.BuildLookupModel](docs/BuildLookupModel.md)
 - [Model.BuildMessage](docs/BuildMessage.md)
 - [Model.BuildMessageCategory](docs/BuildMessageCategory.md)
 - [Model.BuildMode](docs/BuildMode.md)
 - [Model.BuildNotificationFrequency](docs/BuildNotificationFrequency.md)
 - [Model.BuildStartRequest](docs/BuildStartRequest.md)
 - [Model.BuildWorkerImage](docs/BuildWorkerImage.md)
 - [Model.BuildWorkerImageName](docs/BuildWorkerImageName.md)
 - [Model.CollaboratorAddition](docs/CollaboratorAddition.md)
 - [Model.CollaboratorUpdate](docs/CollaboratorUpdate.md)
 - [Model.DeployMode](docs/DeployMode.md)
 - [Model.DeploymentCancellation](docs/DeploymentCancellation.md)
 - [Model.DeploymentEnvironmentAddition](docs/DeploymentEnvironmentAddition.md)
 - [Model.DeploymentEnvironmentDeploymentsResults](docs/DeploymentEnvironmentDeploymentsResults.md)
 - [Model.DeploymentEnvironmentLookupModel](docs/DeploymentEnvironmentLookupModel.md)
 - [Model.DeploymentEnvironmentProject](docs/DeploymentEnvironmentProject.md)
 - [Model.DeploymentEnvironmentSettings](docs/DeploymentEnvironmentSettings.md)
 - [Model.DeploymentEnvironmentSettingsResults](docs/DeploymentEnvironmentSettingsResults.md)
 - [Model.DeploymentLookupModel](docs/DeploymentLookupModel.md)
 - [Model.DeploymentNotificationFrequency](docs/DeploymentNotificationFrequency.md)
 - [Model.DeploymentProvider](docs/DeploymentProvider.md)
 - [Model.DeploymentProviderType](docs/DeploymentProviderType.md)
 - [Model.DeploymentStartRequest](docs/DeploymentStartRequest.md)
 - [Model.EncryptRequest](docs/EncryptRequest.md)
 - [Model.Error](docs/Error.md)
 - [Model.GroupName](docs/GroupName.md)
 - [Model.GroupPermissions](docs/GroupPermissions.md)
 - [Model.HostEntry](docs/HostEntry.md)
 - [Model.HttpMethodRestricted](docs/HttpMethodRestricted.md)
 - [Model.MSBuildVerbosity](docs/MSBuildVerbosity.md)
 - [Model.NotificationProviderSettings](docs/NotificationProviderSettings.md)
 - [Model.NotificationProviderType](docs/NotificationProviderType.md)
 - [Model.NotificationSettings](docs/NotificationSettings.md)
 - [Model.NotificationSettingsType](docs/NotificationSettingsType.md)
 - [Model.OSServiceName](docs/OSServiceName.md)
 - [Model.OSType](docs/OSType.md)
 - [Model.PermissionName](docs/PermissionName.md)
 - [Model.PermissionState](docs/PermissionState.md)
 - [Model.PlatformName](docs/PlatformName.md)
 - [Model.ProjectAddition](docs/ProjectAddition.md)
 - [Model.ProjectBranchesMode](docs/ProjectBranchesMode.md)
 - [Model.ProjectBuildNumberUpdate](docs/ProjectBuildNumberUpdate.md)
 - [Model.ProjectBuildResults](docs/ProjectBuildResults.md)
 - [Model.ProjectConfiguration](docs/ProjectConfiguration.md)
 - [Model.ProjectConfigurationOperatingSystem](docs/ProjectConfigurationOperatingSystem.md)
 - [Model.ProjectConfigurationPlatform](docs/ProjectConfigurationPlatform.md)
 - [Model.ProjectConfigurationServices](docs/ProjectConfigurationServices.md)
 - [Model.ProjectConfigurationTestCategoriesMatrix](docs/ProjectConfigurationTestCategoriesMatrix.md)
 - [Model.ProjectDeployment](docs/ProjectDeployment.md)
 - [Model.ProjectDeploymentsResults](docs/ProjectDeploymentsResults.md)
 - [Model.ProjectHistory](docs/ProjectHistory.md)
 - [Model.ProjectLookupModel](docs/ProjectLookupModel.md)
 - [Model.ProjectSettingsResults](docs/ProjectSettingsResults.md)
 - [Model.RepositoryAuthenticationType](docs/RepositoryAuthenticationType.md)
 - [Model.RepositoryProvider](docs/RepositoryProvider.md)
 - [Model.RepositoryScm](docs/RepositoryScm.md)
 - [Model.RoleAce](docs/RoleAce.md)
 - [Model.RoleAddition](docs/RoleAddition.md)
 - [Model.Script](docs/Script.md)
 - [Model.ScriptLanguage](docs/ScriptLanguage.md)
 - [Model.SecurityDescriptor](docs/SecurityDescriptor.md)
 - [Model.Status](docs/Status.md)
 - [Model.StoredNameValue](docs/StoredNameValue.md)
 - [Model.StoredNameValueMatrix](docs/StoredNameValueMatrix.md)
 - [Model.StoredValue](docs/StoredValue.md)
 - [Model.StringValueObject](docs/StringValueObject.md)
 - [Model.TestMode](docs/TestMode.md)
 - [Model.Timestamped](docs/Timestamped.md)
 - [Model.UnknownType](docs/UnknownType.md)
 - [Model.UserAccountRolesResults](docs/UserAccountRolesResults.md)
 - [Model.UserAccountSettings](docs/UserAccountSettings.md)
 - [Model.UserAddition](docs/UserAddition.md)
 - [Model.Build](docs/Build.md)
 - [Model.Deployment](docs/Deployment.md)
 - [Model.DeploymentEnvironment](docs/DeploymentEnvironment.md)
 - [Model.EnvironmentDeploymentModel](docs/EnvironmentDeploymentModel.md)
 - [Model.Job](docs/Job.md)
 - [Model.NuGetFeed](docs/NuGetFeed.md)
 - [Model.Project](docs/Project.md)
 - [Model.ProjectDeploymentModel](docs/ProjectDeploymentModel.md)
 - [Model.Role](docs/Role.md)
 - [Model.UserAccount](docs/UserAccount.md)
 - [Model.BuildJob](docs/BuildJob.md)
 - [Model.DeploymentEnvironmentWithSettings](docs/DeploymentEnvironmentWithSettings.md)
 - [Model.DeploymentJob](docs/DeploymentJob.md)
 - [Model.ProjectWithConfiguration](docs/ProjectWithConfiguration.md)
 - [Model.RoleWithGroups](docs/RoleWithGroups.md)

Documentation for Authorization

<a name="apiToken"></a>
### apiToken

- **Type**: API key
- **API key parameter name**: Authorization
- **Location**: HTTP header