|
4 | 4 |
|
5 | 5 | namespace Cake.AppVeyor |
6 | 6 | { |
| 7 | + /// <summary> |
| 8 | + /// Provides the API methods that can be called against AppVeyor via the <cref>AppVeyorClient</cref>. |
| 9 | + /// </summary> |
7 | 10 | public interface IAppVeyorApi |
8 | 11 | { |
| 12 | + /// <summary> |
| 13 | + /// Clear the cache for a given AppVeyor project. |
| 14 | + /// </summary> |
| 15 | + /// <param name="accountName">The AppVeyor account name.</param> |
| 16 | + /// <param name="projectSlug">The slug for the project.</param> |
| 17 | + /// <returns>A <see cref="Task"/> representing the asynchronous operation.</returns> |
9 | 18 | [Delete("/api/projects/{accountName}/{projectSlug}/buildcache")] |
10 | 19 | Task ClearCache(string accountName, string projectSlug); |
11 | 20 |
|
| 21 | + /// <summary> |
| 22 | + /// Gets a list of projects from AppVeyor. |
| 23 | + /// </summary> |
| 24 | + /// <returns>A <see cref="Task"/> representing the asynchronous operation with a list of AppVeyor projects.</returns> |
12 | 25 | [Get("/api/projects")] |
13 | 26 | Task<List<AppVeyorProject>> GetProjects(); |
14 | 27 |
|
| 28 | + /// <summary> |
| 29 | + /// Gets the history for a given project from AppVeyor. |
| 30 | + /// </summary> |
| 31 | + /// <param name="accountName">The AppVeyor account name.</param> |
| 32 | + /// <param name="projectSlug">The slug for the project.</param> |
| 33 | + /// <param name="recordsPerPage">The numbers of records to return in a page of results.</param> |
| 34 | + /// <param name="startBuildId">The ID for the build to start with.</param> |
| 35 | + /// <param name="branch">The name of the branch to use for the request.</param> |
| 36 | + /// <returns>A <see cref="Task"/> representing the asynchronous operation with the project history.</returns> |
15 | 37 | [Get("/api/projects/{accountName}/{projectSlug}/history")] |
16 | 38 | Task<AppVeyorProjectHistory> GetProjectHistory(string accountName, string projectSlug, [AliasAs("recordsNumber")] int recordsPerPage, int? startBuildId = null, string branch = null); |
17 | 39 |
|
| 40 | + /// <summary> |
| 41 | + /// Gets the latest build for a given project. |
| 42 | + /// </summary> |
| 43 | + /// <param name="accountName">The AppVeyor account name.</param> |
| 44 | + /// <param name="projectSlug">The slug for the project.</param> |
| 45 | + /// <returns>A <see cref="Task"/> representing the asynchronous operation with the last build for the project.</returns> |
18 | 46 | [Get("/api/projects/{accountName}/{projectSlug}")] |
19 | 47 | Task<AppVeyorProjectBuild> GetProjectLastBuild(string accountName, string projectSlug); |
20 | 48 |
|
| 49 | + /// <summary> |
| 50 | + /// Gets the latest build for a given project based on branch name. |
| 51 | + /// </summary> |
| 52 | + /// <param name="accountName">The AppVeyor account name.</param> |
| 53 | + /// <param name="projectSlug">The slug for the project.</param> |
| 54 | + /// <param name="branchName">The name of the branch to use for the request.</param> |
| 55 | + /// <returns>A <see cref="Task"/> representing the asynchronous operation with the last build for a branch for the project.</returns> |
21 | 56 | [Get("/api/projects/{accountName}/{projectSlug}/branch/{branchName}")] |
22 | 57 | Task<AppVeyorProjectBuild> GetProjectLastBranchBuild(string accountName, string projectSlug, string branchName); |
23 | 58 |
|
| 59 | + /// <summary> |
| 60 | + /// Gets a specific AppVeyor build based on buil version number. |
| 61 | + /// </summary> |
| 62 | + /// <param name="accountName">The AppVeyor account name.</param> |
| 63 | + /// <param name="projectSlug">The slug for the project.</param> |
| 64 | + /// <param name="buildVersion">The build version number.</param> |
| 65 | + /// <returns>A <see cref="Task"/> representing the asynchronous operation with the build for the specified version for the project.</returns> |
24 | 66 | [Get("/api/projects/{accountName}/{projectSlug}/build/{buildVersion}")] |
25 | 67 | Task<AppVeyorProjectBuild> GetProjectBuildByVersion(string accountName, string projectSlug, string buildVersion); |
26 | 68 |
|
| 69 | + /// <summary> |
| 70 | + /// Get the deployments for a given project. |
| 71 | + /// </summary> |
| 72 | + /// <param name="accountName">The AppVeyor account name.</param> |
| 73 | + /// <param name="projectSlug">The slug for the project.</param> |
| 74 | + /// <returns>A <see cref="Task"/> representing the asynchronous operation with a lst of deployments for the project.</returns> |
27 | 75 | [Get("/api/projects/{accountName}/{projectSlug}/deployments")] |
28 | 76 | Task<AppVeyorProjectDeployments> GetProjectDeployments(string accountName, string projectSlug); |
29 | 77 |
|
| 78 | + /// <summary> |
| 79 | + /// Starts a build. |
| 80 | + /// </summary> |
| 81 | + /// <param name="buildRequest">An instance of <cref>AppVeyorBuildRequestLatestCommit</cref> identifying which build to start.</param> |
| 82 | + /// <returns>A <see cref="Task"/> representing the asynchronous operation with the build.</returns> |
30 | 83 | [Post("/api/builds")] |
31 | 84 | Task<AppVeyorBuild> StartBuildLatestCommit([Body] AppVeyorBuildRequestLatestCommit buildRequest); |
32 | 85 |
|
| 86 | + /// <summary> |
| 87 | + /// Starts a build for a given commit. |
| 88 | + /// </summary> |
| 89 | + /// <param name="buildRequest">An instance of <cref>AppVeyorBuildRequestSpecificCommit</cref> identifying which build to start.</param> |
| 90 | + /// <returns>A <see cref="Task"/> representing the asynchronous operation with the build.</returns> |
33 | 91 | [Post("/api/builds")] |
34 | 92 | Task<AppVeyorBuild> StartBuildSpecificCommit([Body] AppVeyorBuildRequestSpecificCommit buildRequest); |
35 | 93 |
|
| 94 | + /// <summary> |
| 95 | + /// Starts a build from a pull request. |
| 96 | + /// </summary> |
| 97 | + /// <param name="buildRequest">An instance of <cref>AppVeyorBuildRequestPullRequest</cref> identifying which build to start.</param> |
| 98 | + /// <returns>A <see cref="Task"/> representing the asynchronous operation with the build.</returns> |
36 | 99 | [Post("/api/builds")] |
37 | 100 | Task<AppVeyorBuild> StartBuildPullRequest([Body] AppVeyorBuildRequestPullRequest buildRequest); |
38 | 101 |
|
| 102 | + /// <summary> |
| 103 | + /// Cancels a build. |
| 104 | + /// </summary> |
| 105 | + /// <param name="accountName">The AppVeyor account name.</param> |
| 106 | + /// <param name="projectSlug">The slug for the project.</param> |
| 107 | + /// <param name="buildVersion">The build version number.</param> |
| 108 | + /// <returns>A <see cref="Task"/> representing the asynchronous operation.</returns> |
39 | 109 | [Delete("/api/builds/{accountName}/{projectSlug}/{buildVersion}")] |
40 | 110 | Task CancelBuild(string accountName, string projectSlug, string buildVersion); |
41 | 111 |
|
| 112 | + /// <summary> |
| 113 | + /// Gets a single deployment. |
| 114 | + /// </summary> |
| 115 | + /// <param name="deploymentId">ID for the deployment to fetch.</param> |
| 116 | + /// <returns>A <see cref="Task"/> representing the asynchronous operation with the specified deployment.</returns> |
42 | 117 | [Get("/api/deployments/{deploymentId}")] |
43 | 118 | Task<AppVeyorProjectDeployment> GetDeployment(int deploymentId); |
44 | 119 |
|
| 120 | + /// <summary> |
| 121 | + /// Starts a deployment. |
| 122 | + /// </summary> |
| 123 | + /// <param name="startDeploymentRequest">An instance of <cref>AppVeyorStartDeploymentRequest</cref> identifying which deployment to start.</param> |
| 124 | + /// <returns>A <see cref="Task"/> representing the asynchronous operation with the deployment that was started.</returns> |
45 | 125 | [Post("/api/deployments")] |
46 | 126 | Task<AppVeyorDeployment> StartDeployment(AppVeyorStartDeploymentRequest startDeploymentRequest); |
47 | 127 |
|
| 128 | + /// <summary> |
| 129 | + /// Cancels a deployment. |
| 130 | + /// </summary> |
| 131 | + /// <param name="cancelDeploymentRequest">An instance of <cref>AppVeyorCancelDeploymentRequest</cref> identifying which deployment to cancel.</param> |
| 132 | + /// <returns>A <see cref="Task"/> representing the asynchronous operation.</returns> |
48 | 133 | [Put("/api/deployments/stop")] |
49 | 134 | Task CancelDeployment(AppVeyorCancelDeploymentRequest cancelDeploymentRequest); |
50 | 135 |
|
| 136 | + /// <summary> |
| 137 | + /// Gets all environemnts. |
| 138 | + /// </summary> |
| 139 | + /// <returns>A <see cref="Task"/> representing the asynchronous operation with the list of environment.</returns> |
51 | 140 | [Get("/api/environments")] |
52 | 141 | Task<List<AppVeyorEnvironment>> GetEnvironments(); |
53 | 142 |
|
| 143 | + /// <summary> |
| 144 | + /// Gets all deployments for a given environment. |
| 145 | + /// </summary> |
| 146 | + /// <param name="deploymentEnvironmentId">The ID of the deployment.</param> |
| 147 | + /// <returns>A <see cref="Task"/> representing the asynchronous operation with the deployment for the environment.</returns> |
54 | 148 | [Get("/api/environments/{deploymentEnvironmentId}/deployments")] |
55 | 149 | Task<AppVeyorEnvironmentDeployments> GetEnvironmentDeployments(int deploymentEnvironmentId); |
56 | 150 | } |
|
0 commit comments