Files
octokit.net/Octokit/Clients/IProjectsClient.cs
2019-10-30 13:51:20 -03:00

205 lines
10 KiB
C#

using System.Collections.Generic;
using System.Diagnostics.CodeAnalysis;
using System.Threading.Tasks;
namespace Octokit
{
/// <summary>
/// A client for GitHub's Repository Projects API.
/// </summary>
/// <remarks>
/// See the <a href="https://developer.github.com/v3/repos/projects/">Repository Projects API documentation</a> for more information.
/// </remarks>
public interface IProjectsClient
{
/// <summary>
/// Get all projects for this repository.
/// </summary>
/// <remarks>
/// See the <a href="https://developer.github.com/v3/projects/#list-repository-projects">API documentation</a> for more information.
/// </remarks>
/// <param name="owner">The owner of the repository</param>
/// <param name="name">The name of the repository</param>
Task<IReadOnlyList<Project>> GetAllForRepository(string owner, string name);
/// <summary>
/// Get all projects for this repository.
/// </summary>
/// <remarks>
/// See the <a href="https://developer.github.com/v3/projects/#list-repository-projects">API documentation</a> for more information.
/// </remarks>
/// <param name="owner">The owner of the repository</param>
/// <param name="name">The name of the repository</param>
/// <param name="request">Used to filter the list of projects returned</param>
Task<IReadOnlyList<Project>> GetAllForRepository(string owner, string name, ProjectRequest request);
/// <summary>
/// Get all projects for this repository.
/// </summary>
/// <remarks>
/// See the <a href="https://developer.github.com/v3/projects/#list-repository-projects">API documentation</a> for more information.
/// </remarks>
/// <param name="repositoryId">The Id of the repository</param>
Task<IReadOnlyList<Project>> GetAllForRepository(long repositoryId);
/// <summary>
/// Get all projects for this repository.
/// </summary>
/// <remarks>
/// See the <a href="https://developer.github.com/v3/projects/#list-repository-projects">API documentation</a> for more information.
/// </remarks>
/// <param name="repositoryId">The Id of the repository</param>
/// <param name="request">Used to filter the list of projects returned</param>
Task<IReadOnlyList<Project>> GetAllForRepository(long repositoryId, ProjectRequest request);
/// <summary>
/// Get all projects for this repository.
/// </summary>
/// <remarks>
/// See the <a href="https://developer.github.com/v3/projects/#list-repository-projects">API documentation</a> for more information.
/// </remarks>
/// <param name="owner">The owner of the repository</param>
/// <param name="name">The name of the repository</param>
/// <param name="options">Options for changing the API response</param>
Task<IReadOnlyList<Project>> GetAllForRepository(string owner, string name, ApiOptions options);
/// <summary>
/// Get all projects for this repository.
/// </summary>
/// <remarks>
/// See the <a href="https://developer.github.com/v3/projects/#list-repository-projects">API documentation</a> for more information.
/// </remarks>
/// <param name="owner">The owner of the repository</param>
/// <param name="name">The name of the repository</param>
/// <param name="request">Used to filter the list of projects returned</param>
/// <param name="options">Options for changing the API response</param>
Task<IReadOnlyList<Project>> GetAllForRepository(string owner, string name, ProjectRequest request, ApiOptions options);
/// <summary>
/// Get all projects for this repository.
/// </summary>
/// <remarks>
/// See the <a href="https://developer.github.com/v3/projects/#list-repository-projects">API documentation</a> for more information.
/// </remarks>
/// <param name="repositoryId">The Id of the repository</param>
/// <param name="options">Options for changing the API response</param>
Task<IReadOnlyList<Project>> GetAllForRepository(long repositoryId, ApiOptions options);
/// <summary>
/// Get all projects for this repository.
/// </summary>
/// <remarks>
/// See the <a href="https://developer.github.com/v3/projects/#list-repository-projects">API documentation</a> for more information.
/// </remarks>
/// <param name="repositoryId">The Id of the repository</param>
/// <param name="request">Used to filter the list of projects returned</param>
/// <param name="options">Options for changing the API response</param>
Task<IReadOnlyList<Project>> GetAllForRepository(long repositoryId, ProjectRequest request, ApiOptions options);
/// <summary>
/// Get all projects for the specified organization.
/// </summary>
/// <remarks>
/// See the <a href="https://developer.github.com/v3/projects/#list-organization-projects">API documentation</a> for more information.
/// </remarks>
/// <param name="organization">The name of the organization</param>
Task<IReadOnlyList<Project>> GetAllForOrganization(string organization);
/// <summary>
/// Get all projects for the specified organization.
/// </summary>
/// <remarks>
/// See the <a href="https://developer.github.com/v3/projects/#list-organization-projects">API documentation</a> for more information.
/// </remarks>
/// <param name="organization">The name of the organization</param>
/// <param name="request">Used to filter the list of projects returned</param>
Task<IReadOnlyList<Project>> GetAllForOrganization(string organization, ProjectRequest request);
/// <summary>
/// Get all projects for the specified organization.
/// </summary>
/// <remarks>
/// See the <a href="https://developer.github.com/v3/projects/#list-organization-projects">API documentation</a> for more information.
/// </remarks>
/// <param name="organization">The name of the organization</param>
/// <param name="options">Options for changing the API response</param>
Task<IReadOnlyList<Project>> GetAllForOrganization(string organization, ApiOptions options);
/// <summary>
/// Get all projects for the specified organization.
/// </summary>
/// <remarks>
/// See the <a href="https://developer.github.com/v3/projects/#list-organization-projects">API documentation</a> for more information.
/// </remarks>
/// <param name="organization">The name of the organization</param>
/// <param name="request">Used to filter the list of projects returned</param>
/// <param name="options">Options for changing the API response</param>
Task<IReadOnlyList<Project>> GetAllForOrganization(string organization, ProjectRequest request, ApiOptions options);
/// <summary>
/// Gets a single project for this repository.
/// </summary>
/// <remarks>
/// See the <a href="https://developer.github.com/v3/repos/projects/#get-a-project">API documentation</a> for more information.
/// </remarks>
/// <param name="id">The Id of the project</param>
[SuppressMessage("Microsoft.Naming", "CA1716:IdentifiersShouldNotMatchKeywords", MessageId = "Get")]
Task<Project> Get(int id);
/// <summary>
/// Creates a project for this repository.
/// </summary>
/// <remarks>
/// See the <a href="https://developer.github.com/v3/projects/#create-a-repository-project">API documentation</a> for more information.
/// </remarks>
/// <param name="repositoryId">The id of the repository</param>
/// <param name="newProject">The new project to create for this repository</param>
Task<Project> CreateForRepository(long repositoryId, NewProject newProject);
/// <summary>
/// Creates a project for the specified organization.
/// </summary>
/// <remarks>
/// See the <a href="https://developer.github.com/v3/projects/#create-an-organization-project">API documentation</a> for more information.
/// </remarks>
/// <param name="organization">The name of the organization</param>
/// <param name="newProject">The new project to create for this repository</param>
Task<Project> CreateForOrganization(string organization, NewProject newProject);
/// <summary>
/// Updates a project for this repository.
/// </summary>
/// <remarks>
/// See the <a href="https://developer.github.com/v3/repos/projects/#update-a-project">API documentation</a> for more information.
/// </remarks>
/// <param name="id">The Id of the project</param>
/// <param name="projectUpdate">The modified project</param>
Task<Project> Update(int id, ProjectUpdate projectUpdate);
/// <summary>
/// Deletes a project.
/// </summary>
/// <remarks>
/// See the <a href="https://developer.github.com/v3/repos/projects/#delete-a-project">API documentation</a> for more information.
/// </remarks>
/// <param name="id">The Id of the project</param>
Task<bool> Delete(int id);
/// <summary>
/// A client for GitHub's Project Cards API.
/// </summary>
/// <remarks>
/// See the <a href="https://developer.github.com/v3/repos/projects/cards/">Repository Projects API documentation</a> for more information.
/// </remarks>
IProjectCardsClient Card { get; }
/// <summary>
/// A client for GitHub's Project Columns API.
/// </summary>
/// <remarks>
/// See the <a href="https://developer.github.com/v3/repos/projects/columns/">Repository Projects API documentation</a> for more information.
/// </remarks>
IProjectColumnsClient Column { get; }
}
}