mirror of
https://github.com/zoriya/octokit.net.git
synced 2026-06-07 20:30:41 +00:00
add metadata to each client action (#2124)
This commit is contained in:
@@ -24,6 +24,7 @@ namespace Octokit
|
||||
/// See the <a href="https://developer.github.com/v3/repos/projects/#list-projects-cards">API documentation</a> for more information.
|
||||
/// </remarks>
|
||||
/// <param name="columnId">The id of the column</param>
|
||||
[ManualRoute("GET", "/projects/columns/{column_id}/cards")]
|
||||
public Task<IReadOnlyList<ProjectCard>> GetAll(int columnId)
|
||||
{
|
||||
return GetAll(columnId, ApiOptions.None);
|
||||
@@ -37,6 +38,7 @@ namespace Octokit
|
||||
/// </remarks>
|
||||
/// <param name="columnId">The id of the column</param>
|
||||
/// <param name="options">Options for changing the API response</param>
|
||||
[ManualRoute("GET", "/projects/columns/{column_id}/cards")]
|
||||
public Task<IReadOnlyList<ProjectCard>> GetAll(int columnId, ApiOptions options)
|
||||
{
|
||||
Ensure.ArgumentNotNull(options, nameof(options));
|
||||
@@ -52,6 +54,7 @@ namespace Octokit
|
||||
/// </remarks>
|
||||
/// <param name="columnId">The id of the column</param>
|
||||
/// <param name="request">Used to filter the list of project cards returned</param>
|
||||
[ManualRoute("GET", "/projects/columns/{column_id}/cards")]
|
||||
public Task<IReadOnlyList<ProjectCard>> GetAll(int columnId, ProjectCardRequest request)
|
||||
{
|
||||
Ensure.ArgumentNotNull(request, nameof(request));
|
||||
@@ -68,6 +71,7 @@ namespace Octokit
|
||||
/// <param name="columnId">The id of the column</param>
|
||||
/// <param name="request">Used to filter the list of project cards returned</param>
|
||||
/// <param name="options">Options for changing the API response</param>
|
||||
[ManualRoute("GET", "/projects/columns/{column_id}/cards")]
|
||||
public Task<IReadOnlyList<ProjectCard>> GetAll(int columnId, ProjectCardRequest request, ApiOptions options)
|
||||
{
|
||||
Ensure.ArgumentNotNull(request, nameof(request));
|
||||
@@ -83,6 +87,7 @@ namespace Octokit
|
||||
/// See the <a href="https://developer.github.com/v3/repos/projects/#get-a-project-card">API documentation</a> for more information.
|
||||
/// </remarks>
|
||||
/// <param name="id">The id of the card</param>
|
||||
[ManualRoute("GET", "/projects/columns/cards/{card_id}")]
|
||||
public Task<ProjectCard> Get(int id)
|
||||
{
|
||||
return ApiConnection.Get<ProjectCard>(ApiUrls.ProjectCard(id), null, AcceptHeaders.ProjectsApiPreview);
|
||||
@@ -96,6 +101,7 @@ namespace Octokit
|
||||
/// </remarks>
|
||||
/// <param name="columnId">The id of the column</param>
|
||||
/// <param name="newProjectCard">The card to create</param>
|
||||
[ManualRoute("POST", "/projects/columns/{column_id}/cards")]
|
||||
public Task<ProjectCard> Create(int columnId, NewProjectCard newProjectCard)
|
||||
{
|
||||
Ensure.ArgumentNotNull(newProjectCard, nameof(newProjectCard));
|
||||
@@ -111,6 +117,7 @@ namespace Octokit
|
||||
/// </remarks>
|
||||
/// <param name="id">The id of the card</param>
|
||||
/// <param name="projectCardUpdate">New values to update the card with</param>
|
||||
[ManualRoute("GET", "/projects/columns/cards/{card_id}")]
|
||||
public Task<ProjectCard> Update(int id, ProjectCardUpdate projectCardUpdate)
|
||||
{
|
||||
Ensure.ArgumentNotNull(projectCardUpdate, nameof(projectCardUpdate));
|
||||
@@ -125,6 +132,7 @@ namespace Octokit
|
||||
/// See the <a href="https://developer.github.com/v3/repos/projects/#delete-a-project-card">API documentation</a> for more information.
|
||||
/// </remarks>
|
||||
/// <param name="id">The id of the card</param>
|
||||
[ManualRoute("DELETE", "/projects/columns/cards/{card_id}")]
|
||||
public async Task<bool> Delete(int id)
|
||||
{
|
||||
var endpoint = ApiUrls.ProjectCard(id);
|
||||
@@ -148,6 +156,7 @@ namespace Octokit
|
||||
/// </remarks>
|
||||
/// <param name="id">The id of the card</param>
|
||||
/// <param name="position">The position to move the card</param>
|
||||
[ManualRoute("POST", "/projects/columns/cards/{card_id}/moves")]
|
||||
public async Task<bool> Move(int id, ProjectCardMove position)
|
||||
{
|
||||
Ensure.ArgumentNotNull(position, nameof(position));
|
||||
|
||||
Reference in New Issue
Block a user