Files
octokit.net/Octokit/Clients/IDeploymentStatusClient.cs
T
Alexander Efremov 686486a205 added new overloads
2016-06-29 01:54:49 +07:00

94 lines
5.0 KiB
C#

using System.Collections.Generic;
using System.Threading.Tasks;
namespace Octokit
{
/// <summary>
/// A client for GitHub's Repository Deployment Statuses API.
/// Gets and creates Deployment Statuses.
/// </summary>
/// <remarks>
/// See the <a href="http://developer.github.com/v3/repos/deployments/">Repository Deployment Statuses API documentation</a> for more information.
/// </remarks>
public interface IDeploymentStatusClient
{
/// <summary>
/// Gets all the statuses for the given deployment. Any user with pull access to a repository can
/// view deployments.
/// </summary>
/// <remarks>
/// http://developer.github.com/v3/repos/deployments/#list-deployment-statuses
/// </remarks>
/// <param name="owner">The owner of the repository.</param>
/// <param name="name">The name of the repository.</param>
/// <param name="deploymentId">The id of the deployment.</param>
/// <returns>A <see cref="IReadOnlyList{DeploymentStatus}"/> of <see cref="DeploymentStatus"/>es for the given deployment.</returns>
Task<IReadOnlyList<DeploymentStatus>> GetAll(string owner, string name, int deploymentId);
/// <summary>
/// Gets all the statuses for the given deployment. Any user with pull access to a repository can
/// view deployments.
/// </summary>
/// <remarks>
/// http://developer.github.com/v3/repos/deployments/#list-deployment-statuses
/// </remarks>
/// <param name="repositoryId">The ID of the repository.</param>
/// <param name="deploymentId">The id of the deployment.</param>
/// <returns>A <see cref="IReadOnlyList{DeploymentStatus}"/> of <see cref="DeploymentStatus"/>es for the given deployment.</returns>
Task<IReadOnlyList<DeploymentStatus>> GetAll(int repositoryId, int deploymentId);
/// <summary>
/// Gets all the statuses for the given deployment. Any user with pull access to a repository can
/// view deployments.
/// </summary>
/// <remarks>
/// http://developer.github.com/v3/repos/deployments/#list-deployment-statuses
/// </remarks>
/// <param name="owner">The owner of the repository.</param>
/// <param name="name">The name of the repository.</param>
/// <param name="deploymentId">The id of the deployment.</param>
/// <param name="options">Options for changing the API response</param>
/// <returns>A <see cref="IReadOnlyList{DeploymentStatus}"/> of <see cref="DeploymentStatus"/>es for the given deployment.</returns>
Task<IReadOnlyList<DeploymentStatus>> GetAll(string owner, string name, int deploymentId, ApiOptions options);
/// <summary>
/// Gets all the statuses for the given deployment. Any user with pull access to a repository can
/// view deployments.
/// </summary>
/// <remarks>
/// http://developer.github.com/v3/repos/deployments/#list-deployment-statuses
/// </remarks>
/// <param name="repositoryId">The ID of the repository.</param>
/// <param name="deploymentId">The id of the deployment.</param>
/// <param name="options">Options for changing the API response</param>
/// <returns>A <see cref="IReadOnlyList{DeploymentStatus}"/> of <see cref="DeploymentStatus"/>es for the given deployment.</returns>
Task<IReadOnlyList<DeploymentStatus>> GetAll(int repositoryId, int deploymentId, ApiOptions options);
/// <summary>
/// Creates a new status for the given deployment. Users with push access can create deployment
/// statuses for a given deployment.
/// </summary>
/// <remarks>
/// http://developer.github.com/v3/repos/deployments/#create-a-deployment-status
/// </remarks>
/// <param name="owner">The owner of the repository.</param>
/// <param name="name">The name of the repository.</param>
/// <param name="deploymentId">The id of the deployment.</param>
/// <param name="newDeploymentStatus"></param>
/// <returns>A <see cref="DeploymentStatus"/> representing created deployment status.</returns>
Task<DeploymentStatus> Create(string owner, string name, int deploymentId, NewDeploymentStatus newDeploymentStatus);
/// <summary>
/// Creates a new status for the given deployment. Users with push access can create deployment
/// statuses for a given deployment.
/// </summary>
/// <remarks>
/// http://developer.github.com/v3/repos/deployments/#create-a-deployment-status
/// </remarks>
/// <param name="repositoryId">The ID of the repository.</param>
/// <param name="deploymentId">The id of the deployment.</param>
/// <param name="newDeploymentStatus"></param>
/// <returns>A <see cref="DeploymentStatus"/> representing created deployment status.</returns>
Task<DeploymentStatus> Create(int repositoryId, int deploymentId, NewDeploymentStatus newDeploymentStatus);
}
}