From 8f44a22ca3ffff4590dd357cf4aa92ac75c335c4 Mon Sep 17 00:00:00 2001 From: Andre Rodrigues Date: Thu, 5 Dec 2013 17:24:52 +0000 Subject: [PATCH] Implement labels CRUD --- Octokit/Clients/IIssuesLabelsClient.cs | 56 ++++++++++++++++ Octokit/Clients/IssuesClient.cs | 2 + Octokit/Clients/IssuesLabelsClient.cs | 93 ++++++++++++++++++++++++++ Octokit/Helpers/ApiUrls.cs | 26 ++++++- Octokit/Models/Request/LabelUpdate.cs | 22 ++++++ Octokit/Models/Request/NewLabel.cs | 24 +++++++ Octokit/Models/Response/Label.cs | 11 +++ Octokit/Octokit-Mono.csproj | 4 ++ Octokit/Octokit-netcore45.csproj | 4 ++ Octokit/Octokit.csproj | 4 ++ 10 files changed, 244 insertions(+), 2 deletions(-) create mode 100644 Octokit/Clients/IIssuesLabelsClient.cs create mode 100644 Octokit/Clients/IssuesLabelsClient.cs create mode 100644 Octokit/Models/Request/LabelUpdate.cs create mode 100644 Octokit/Models/Request/NewLabel.cs diff --git a/Octokit/Clients/IIssuesLabelsClient.cs b/Octokit/Clients/IIssuesLabelsClient.cs new file mode 100644 index 00000000..c47fdea6 --- /dev/null +++ b/Octokit/Clients/IIssuesLabelsClient.cs @@ -0,0 +1,56 @@ +using System.Collections.Generic; +using System.Diagnostics.CodeAnalysis; +using System.Threading.Tasks; + +namespace Octokit +{ + public interface IIssuesLabelsClient + { + /// + /// Gets all labels for the repository. + /// + /// + /// http://developer.github.com/v3/repos/:owner/:repo/labels/:name + /// + /// + Task> GetForRepository(string owner, string repo); + + /// + /// Gets a single Label by name. + /// + /// + /// http://developer.github.com/v3/repos/:owner/:repo/labels/:name + /// + /// + [SuppressMessage("Microsoft.Naming", "CA1716:IdentifiersShouldNotMatchKeywords", MessageId = "Get", + Justification = "Method makes a network request")] + Task