using System.Collections.Generic; using System.Threading.Tasks; namespace Octokit { /// /// A client for GitHub's Issue Labels API. /// /// /// See the Issue Labels API documentation for more information. /// public class IssuesLabelsClient : ApiClient, IIssuesLabelsClient { public IssuesLabelsClient(IApiConnection apiConnection) : base(apiConnection) { } /// /// Gets all labels for the issue. /// /// /// See the API documentation for more information. /// /// The owner of the repository /// The name of the repository /// The number of the issue [ManualRoute("GET", "/repos/{owner}/{repo}/issues/{issue_number}/labels")] public Task> GetAllForIssue(string owner, string name, int number) { Ensure.ArgumentNotNullOrEmptyString(owner, nameof(owner)); Ensure.ArgumentNotNullOrEmptyString(name, nameof(name)); return GetAllForIssue(owner, name, number, ApiOptions.None); } /// /// Gets all labels for the issue. /// /// /// See the API documentation for more information. /// /// The Id of the repository /// The number of the issue [ManualRoute("GET", "/repositories/{id}/issues/{number}/labels")] public Task> GetAllForIssue(long repositoryId, int number) { return GetAllForIssue(repositoryId, number, ApiOptions.None); } /// /// Gets all labels for the issue. /// /// /// See the API documentation for more information. /// /// The owner of the repository /// The name of the repository /// The number of the issue /// Options for changing the API response [ManualRoute("GET", "/repos/{owner}/{repo}/issues/{issue_number}/labels")] public Task> GetAllForIssue(string owner, string name, int number, ApiOptions options) { Ensure.ArgumentNotNullOrEmptyString(owner, nameof(owner)); Ensure.ArgumentNotNullOrEmptyString(name, nameof(name)); Ensure.ArgumentNotNull(options, nameof(options)); return ApiConnection.GetAll