diff --git a/Octokit.Tests.Conventions/ClientRouteTests.cs b/Octokit.Tests.Conventions/ClientRouteTests.cs index 3ded0c28d8..d885332e1f 100644 --- a/Octokit.Tests.Conventions/ClientRouteTests.cs +++ b/Octokit.Tests.Conventions/ClientRouteTests.cs @@ -81,7 +81,6 @@ public static IEnumerable GetClientClasses() .Assembly .ExportedTypes .Where(TypeExtensions.IsClientClass) - .Where(t => t != typeof(StatisticsClient)) // This convention doesn't apply to this one type. .Where(t => t != typeof(GitHubClient)) .Select(type => new[] { type }); } diff --git a/Octokit/Clients/AssigneesClient.cs b/Octokit/Clients/AssigneesClient.cs index 62841500e1..f1a198831c 100644 --- a/Octokit/Clients/AssigneesClient.cs +++ b/Octokit/Clients/AssigneesClient.cs @@ -24,7 +24,7 @@ public AssigneesClient(IApiConnection apiConnection) : base(apiConnection) /// /// The owner of the repository /// The name of the repository - [ManualRoute("GET", "/repos/{owner}/{name}/assignees")] + [ManualRoute("GET", "/repos/{owner}/{repo}/assignees")] public Task> GetAllForRepository(string owner, string name) { Ensure.ArgumentNotNullOrEmptyString(owner, nameof(owner)); @@ -49,7 +49,7 @@ public Task> GetAllForRepository(long repositoryId) /// The owner of the repository /// The name of the repository /// The options to change API's response. - [ManualRoute("GET", "/repos/{owner}/{name}/assignees")] + [ManualRoute("GET", "/repos/{owner}/{repo}/assignees")] public Task> GetAllForRepository(string owner, string name, ApiOptions options) { Ensure.ArgumentNotNullOrEmptyString(owner, nameof(owner)); @@ -82,7 +82,7 @@ public Task> GetAllForRepository(long repositoryId, ApiOptio /// The owner of the repository /// The name of the repository /// Username of the prospective assignee - [ManualRoute("GET", "/repos/{owner}/{name}/assignees/{username}")] + [ManualRoute("GET", "/repos/{owner}/{repo}/assignees/{username}")] public async Task CheckAssignee(string owner, string name, string assignee) { Ensure.ArgumentNotNullOrEmptyString(owner, nameof(owner)); @@ -108,7 +108,7 @@ public async Task CheckAssignee(string owner, string name, string assignee /// The issue number /// List of names of assignees to add /// - [ManualRoute("POST", "/repos/{owner}/{name}/issues/{number}/assignees")] + [ManualRoute("POST", "/repos/{owner}/{repo}/issues/{number}/assignees")] public Task AddAssignees(string owner, string name, int number, AssigneesUpdate assignees) { Ensure.ArgumentNotNullOrEmptyString(owner, nameof(owner)); @@ -126,7 +126,7 @@ public Task AddAssignees(string owner, string name, int number, Assignees /// The issue number /// List of assignees to remove /// - [ManualRoute("DELETE", "/repos/{owner}/{name}/issues/{number}/assignees")] + [ManualRoute("DELETE", "/repos/{owner}/{repo}/issues/{number}/assignees")] public Task RemoveAssignees(string owner, string name, int number, AssigneesUpdate assignees) { Ensure.ArgumentNotNullOrEmptyString(owner, nameof(owner)); diff --git a/Octokit/Clients/AuthorizationsClient.cs b/Octokit/Clients/AuthorizationsClient.cs index 8252383909..d1be719133 100644 --- a/Octokit/Clients/AuthorizationsClient.cs +++ b/Octokit/Clients/AuthorizationsClient.cs @@ -345,7 +345,7 @@ public async Task GetOrCreateApplicationAuthentication /// Client Id of the OAuth application for the token /// The OAuth token to check /// The valid . - [ManualRoute("POST", "/applications/{id}/token")] + [ManualRoute("POST", "/applications/{client_id}/token")] public Task CheckApplicationAuthentication(string clientId, string accessToken) { Ensure.ArgumentNotNullOrEmptyString(clientId, nameof(clientId)); @@ -370,7 +370,7 @@ public Task CheckApplicationAuthentication(string clie /// ClientID of the OAuth application for the token /// The OAuth token to reset /// The valid with a new OAuth token - [ManualRoute("PATCH", "/applications/{id}/token")] + [ManualRoute("PATCH", "/applications/{client_id}/token")] public Task ResetApplicationAuthentication(string clientId, string accessToken) { Ensure.ArgumentNotNullOrEmptyString(clientId, nameof(clientId)); @@ -395,7 +395,7 @@ public Task ResetApplicationAuthentication(string clie /// ClientID of the OAuth application for the token /// The OAuth token to revoke /// A for the request's execution. - [ManualRoute("DELETE", "/applications/{id}/token")] + [ManualRoute("DELETE", "/applications/{client_id}/token")] public Task RevokeApplicationAuthentication(string clientId, string accessToken) { Ensure.ArgumentNotNullOrEmptyString(clientId, nameof(clientId)); diff --git a/Octokit/Clients/BlobsClient.cs b/Octokit/Clients/BlobsClient.cs index 0e1b8d1674..a4647063c9 100644 --- a/Octokit/Clients/BlobsClient.cs +++ b/Octokit/Clients/BlobsClient.cs @@ -28,7 +28,7 @@ public BlobsClient(IApiConnection apiConnection) /// The owner of the repository /// The name of the repository /// The SHA of the blob - [ManualRoute("GET", "/repos/{owner}/{name}/git/blobs/{file_sha}")] + [ManualRoute("GET", "/repos/{owner}/{repo}/git/blobs/{file_sha}")] public Task Get(string owner, string name, string reference) { Ensure.ArgumentNotNullOrEmptyString(owner, nameof(owner)); @@ -63,7 +63,7 @@ public Task Get(long repositoryId, string reference) /// The owner of the repository /// The name of the repository /// The new Blob - [ManualRoute("POST", "/repos/{owner}/{name}/git/blobs")] + [ManualRoute("POST", "/repos/{owner}/{repo}/git/blobs")] public Task Create(string owner, string name, NewBlob newBlob) { Ensure.ArgumentNotNullOrEmptyString(owner, nameof(owner)); diff --git a/Octokit/Clients/CheckRunsClient.cs b/Octokit/Clients/CheckRunsClient.cs index 6e4791f122..603a866b54 100644 --- a/Octokit/Clients/CheckRunsClient.cs +++ b/Octokit/Clients/CheckRunsClient.cs @@ -31,7 +31,7 @@ public CheckRunsClient(IApiConnection apiConnection) : base(apiConnection) /// The name of the repository /// Details of the Check Run to create [Preview("antiope")] - [ManualRoute("POST", "/repos/{owner}/{name}/check-runs")] + [ManualRoute("POST", "/repos/{owner}/{repo}/check-runs")] public Task Create(string owner, string name, NewCheckRun newCheckRun) { Ensure.ArgumentNotNullOrEmptyString(owner, nameof(owner)); @@ -69,7 +69,7 @@ public Task Create(long repositoryId, NewCheckRun newCheckRun) /// The Id of the check run /// The updates to the check run [Preview("antiope")] - [ManualRoute("PATCH", "/repos/{owner}/{name}/check-runs/{check_run_id}")] + [ManualRoute("PATCH", "/repos/{owner}/{repo}/check-runs/{check_run_id}")] public Task Update(string owner, string name, long checkRunId, CheckRunUpdate checkRunUpdate) { Ensure.ArgumentNotNullOrEmptyString(owner, nameof(owner)); @@ -106,7 +106,7 @@ public Task Update(long repositoryId, long checkRunId, CheckRunUpdate /// The owner of the repository /// The name of the repository /// The commit reference (can be a SHA, branch name, or a tag name) - [ManualRoute("GET", "repos/{owner}/{name}/commits/{sha}/check-runs")] + [ManualRoute("GET", "/repos/{owner}/{name}/commits/{commit_sha}/check-runs")] public Task GetAllForReference(string owner, string name, string reference) { Ensure.ArgumentNotNullOrEmptyString(owner, nameof(owner)); @@ -124,7 +124,7 @@ public Task GetAllForReference(string owner, string name, str /// /// The Id of the repository /// The commit reference (can be a SHA, branch name, or a tag name) - [ManualRoute("GET", "/repositories/{id}/commits/{sha}/check-runs")] + [ManualRoute("GET", "/repositories/{id}/commits/{commit_sha}/check-runs")] public Task GetAllForReference(long repositoryId, string reference) { Ensure.ArgumentNotNullOrEmptyString(reference, nameof(reference)); @@ -142,7 +142,7 @@ public Task GetAllForReference(long repositoryId, string refe /// The name of the repository /// The commit reference (can be a SHA, branch name, or a tag name) /// Details to filter the request, such as by check name - [ManualRoute("GET", "repos/{owner}/{name}/commits/{sha}/check-runs")] + [ManualRoute("GET", "/repos/{owner}/{name}/commits/{commit_sha}/check-runs")] public Task GetAllForReference(string owner, string name, string reference, CheckRunRequest checkRunRequest) { Ensure.ArgumentNotNullOrEmptyString(owner, nameof(owner)); @@ -162,7 +162,7 @@ public Task GetAllForReference(string owner, string name, str /// The Id of the repository /// The commit reference (can be a SHA, branch name, or a tag name) /// Details to filter the request, such as by check name - [ManualRoute("GET", "/repositories/{id}/commits/{sha}/check-runs")] + [ManualRoute("GET", "/repositories/{id}/commits/{commit_sha}/check-runs")] public Task GetAllForReference(long repositoryId, string reference, CheckRunRequest checkRunRequest) { Ensure.ArgumentNotNullOrEmptyString(reference, nameof(reference)); @@ -183,7 +183,7 @@ public Task GetAllForReference(long repositoryId, string refe /// Details to filter the request, such as by check name /// Options to change the API response [Preview("antiope")] - [ManualRoute("GET", "repos/{owner}/{name}/commits/{sha}/check-runs")] + [ManualRoute("GET", "/repos/{owner}/{name}/commits/{commit_sha}/check-runs")] public async Task GetAllForReference(string owner, string name, string reference, CheckRunRequest checkRunRequest, ApiOptions options) { Ensure.ArgumentNotNullOrEmptyString(owner, nameof(owner)); @@ -210,7 +210,7 @@ public async Task GetAllForReference(string owner, string nam /// Details to filter the request, such as by check name /// Options to change the API response [Preview("antiope")] - [ManualRoute("GET", "/repositories/{id}/commits/{sha}/check-runs")] + [ManualRoute("GET", "/repositories/{id}/commits/{commit_sha}/check-runs")] public async Task GetAllForReference(long repositoryId, string reference, CheckRunRequest checkRunRequest, ApiOptions options) { Ensure.ArgumentNotNullOrEmptyString(reference, nameof(reference)); @@ -233,7 +233,7 @@ public async Task GetAllForReference(long repositoryId, strin /// The owner of the repository /// The name of the repository /// The Id of the check suite - [ManualRoute("GET", "/repos/{owner}/{name}/check-suite/{check_suite_id}/check-runs")] + [ManualRoute("GET", "/repos/{owner}/{repo}/check-suite/{check_suite_id}/check-runs")] public Task GetAllForCheckSuite(string owner, string name, long checkSuiteId) { Ensure.ArgumentNotNullOrEmptyString(owner, nameof(owner)); @@ -266,7 +266,7 @@ public Task GetAllForCheckSuite(long repositoryId, long check /// The name of the repository /// The Id of the check suite /// Details to filter the request, such as by check name - [ManualRoute("GET", "/repos/{owner}/{name}/check-suite/{check_suite_id}/check-runs")] + [ManualRoute("GET", "/repos/{owner}/{repo}/check-suite/{check_suite_id}/check-runs")] public Task GetAllForCheckSuite(string owner, string name, long checkSuiteId, CheckRunRequest checkRunRequest) { Ensure.ArgumentNotNullOrEmptyString(owner, nameof(owner)); @@ -305,7 +305,7 @@ public Task GetAllForCheckSuite(long repositoryId, long check /// Details to filter the request, such as by check name /// Options to change the API response [Preview("antiope")] - [ManualRoute("GET", "/repos/{owner}/{name}/check-suite/{check_suite_id}/check-runs")] + [ManualRoute("GET", "/repos/{owner}/{repo}/check-suite/{check_suite_id}/check-runs")] public async Task GetAllForCheckSuite(string owner, string name, long checkSuiteId, CheckRunRequest checkRunRequest, ApiOptions options) { Ensure.ArgumentNotNullOrEmptyString(owner, nameof(owner)); @@ -354,7 +354,7 @@ public async Task GetAllForCheckSuite(long repositoryId, long /// The name of the repository /// The Id of the check run [Preview("antiope")] - [ManualRoute("GET", "/repos/{owner}/{name}/check-runs/{check_run_id}")] + [ManualRoute("GET", "/repos/{owner}/{repo}/check-runs/{check_run_id}")] public Task Get(string owner, string name, long checkRunId) { Ensure.ArgumentNotNullOrEmptyString(owner, nameof(owner)); @@ -387,7 +387,7 @@ public Task Get(long repositoryId, long checkRunId) /// The owner of the repository /// The name of the repository /// The Id of the check run - [ManualRoute("GET", "/repos/{owner}/{name}/check-runs/{check_run_id}/annotations")] + [ManualRoute("GET", "/repos/{owner}/{repo}/check-runs/{check_run_id}/annotations")] public Task> GetAllAnnotations(string owner, string name, long checkRunId) { Ensure.ArgumentNotNullOrEmptyString(owner, nameof(owner)); @@ -422,7 +422,7 @@ public Task> GetAllAnnotations(long repository /// The Id of the check run /// Options to change the API response [Preview("antiope")] - [ManualRoute("GET", "/repos/{owner}/{name}/check-runs/{check_run_id}/annotations")] + [ManualRoute("GET", "/repos/{owner}/{repo}/check-runs/{check_run_id}/annotations")] public Task> GetAllAnnotations(string owner, string name, long checkRunId, ApiOptions options) { Ensure.ArgumentNotNullOrEmptyString(owner, nameof(owner)); diff --git a/Octokit/Clients/CheckSuitesClient.cs b/Octokit/Clients/CheckSuitesClient.cs index 5213f0b6d9..6102d0cb98 100644 --- a/Octokit/Clients/CheckSuitesClient.cs +++ b/Octokit/Clients/CheckSuitesClient.cs @@ -31,7 +31,7 @@ public CheckSuitesClient(IApiConnection apiConnection) : base(apiConnection) /// The name of the repository /// The Id of the check suite [Preview("antiope")] - [ManualRoute("GET", "/repos/{owner}/{name}/check-suites/{id}")] + [ManualRoute("GET", "/repos/{owner}/{repo}/check-suites/{id}")] public Task Get(string owner, string name, long checkSuiteId) { Ensure.ArgumentNotNullOrEmptyString(owner, nameof(owner)); @@ -64,7 +64,7 @@ public Task Get(long repositoryId, long checkSuiteId) /// The owner of the repository /// The name of the repository /// The reference (SHA, branch name or tag name) to list check suites for - [ManualRoute("GET", "/repos/{owner}/{name}/commits/{ref}/check-suites")] + [ManualRoute("GET", "/repos/{owner}/{repo}/commits/{ref}/check-suites")] public Task GetAllForReference(string owner, string name, string reference) { Ensure.ArgumentNotNullOrEmptyString(owner, nameof(owner)); @@ -100,7 +100,7 @@ public Task GetAllForReference(long repositoryId, string re /// The name of the repository /// The reference (SHA, branch name or tag name) to list check suites for /// Details to filter the request, such as by App Id or Check Name - [ManualRoute("GET", "/repos/{owner}/{name}/commits/{ref}/check-suites")] + [ManualRoute("GET", "/repos/{owner}/{repo}/commits/{ref}/check-suites")] public Task GetAllForReference(string owner, string name, string reference, CheckSuiteRequest request) { Ensure.ArgumentNotNullOrEmptyString(owner, nameof(owner)); @@ -141,7 +141,7 @@ public Task GetAllForReference(long repositoryId, string re /// Details to filter the request, such as by App Id or Check Name /// Options to change the API response [Preview("antiope")] - [ManualRoute("GET", "/repos/{owner}/{name}/commits/{ref}/check-suites")] + [ManualRoute("GET", "/repos/{owner}/{repo}/commits/{ref}/check-suites")] public async Task GetAllForReference(string owner, string name, string reference, CheckSuiteRequest request, ApiOptions options) { Ensure.ArgumentNotNullOrEmptyString(owner, nameof(owner)); @@ -192,7 +192,7 @@ public async Task GetAllForReference(long repositoryId, str /// The name of the repository /// The check suite preferences [Preview("antiope")] - [ManualRoute("PATCH", "/repos/{owner}/{name}/check-suites/preferences")] + [ManualRoute("PATCH", "/repos/{owner}/{repo}/check-suites/preferences")] public Task UpdatePreferences(string owner, string name, CheckSuitePreferences preferences) { Ensure.ArgumentNotNullOrEmptyString(owner, nameof(owner)); @@ -229,7 +229,7 @@ public Task UpdatePreferences(long repositoryId, /// The name of the repository /// Details of the Check Suite to create [Preview("antiope")] - [ManualRoute("POST", "/repos/{owner}/{name}/check-suites")] + [ManualRoute("POST", "/repos/{owner}/{repo}/check-suites")] public Task Create(string owner, string name, NewCheckSuite newCheckSuite) { Ensure.ArgumentNotNullOrEmptyString(owner, nameof(owner)); @@ -266,7 +266,7 @@ public Task Create(long repositoryId, NewCheckSuite newCheckSuite) /// The name of the repository /// The Id of the check suite [Preview("antiope")] - [ManualRoute("GET", "/repos/{owner}/{name}/check-suites/{2}/rerequest")] + [ManualRoute("GET", "/repos/{owner}/{repo}/check-suites/{2}/rerequest")] public async Task Rerequest(string owner, string name, long checkSuiteId) { Ensure.ArgumentNotNullOrEmptyString(owner, nameof(owner)); diff --git a/Octokit/Clients/CommitCommentReactionsClient.cs b/Octokit/Clients/CommitCommentReactionsClient.cs index f7f5f69bc4..674f1c6002 100644 --- a/Octokit/Clients/CommitCommentReactionsClient.cs +++ b/Octokit/Clients/CommitCommentReactionsClient.cs @@ -26,7 +26,7 @@ public CommitCommentReactionsClient(IApiConnection apiConnection) /// The reaction to create /// [Preview("squirrel-girl")] - [ManualRoute("POST", "/repos/{owner}/{name}/comments/{comment_id}/reactions")] + [ManualRoute("POST", "/repos/{owner}/{repo}/comments/{comment_id}/reactions")] public Task Create(string owner, string name, int number, NewReaction reaction) { Ensure.ArgumentNotNullOrEmptyString(owner, nameof(owner)); @@ -61,7 +61,7 @@ public Task Create(long repositoryId, int number, NewReaction reaction /// The name of the repository /// The comment id /// - [ManualRoute("GET", "/repos/{owner}/{name}/comments/{comment_id}/reactions")] + [ManualRoute("GET", "/repos/{owner}/{repo}/comments/{comment_id}/reactions")] public Task> GetAll(string owner, string name, int number) { return GetAll(owner, name, number, ApiOptions.None); @@ -77,7 +77,7 @@ public Task> GetAll(string owner, string name, int numbe /// Options for changing the API response /// [Preview("squirrel-girl")] - [ManualRoute("GET", "/repos/{owner}/{name}/comments/{comment_id}/reactions")] + [ManualRoute("GET", "/repos/{owner}/{repo}/comments/{comment_id}/reactions")] public Task> GetAll(string owner, string name, int number, ApiOptions options) { Ensure.ArgumentNotNullOrEmptyString(owner, nameof(owner)); diff --git a/Octokit/Clients/CommitStatusClient.cs b/Octokit/Clients/CommitStatusClient.cs index 88f80ab12e..676c5324fa 100644 --- a/Octokit/Clients/CommitStatusClient.cs +++ b/Octokit/Clients/CommitStatusClient.cs @@ -29,7 +29,7 @@ public CommitStatusClient(IApiConnection apiConnection) : base(apiConnection) /// The owner of the repository /// The name of the repository /// The reference (SHA, branch name, or tag name) to list commits for - [ManualRoute("GET", "/repos/{owner}/{name}/commits/{sha}/statuses")] + [ManualRoute("GET", "/repos/{owner}/{repo}/commits/{ref}/statuses")] public Task> GetAll(string owner, string name, string reference) { Ensure.ArgumentNotNullOrEmptyString(owner, nameof(owner)); @@ -48,7 +48,7 @@ public Task> GetAll(string owner, string name, strin /// /// The Id of the repository /// The reference (SHA, branch name, or tag name) to list commits for - [ManualRoute("GET", "/repositories/{id}/commits/{sha}/statuses")] + [ManualRoute("GET", "/repositories/{id}/commits/{ref}/statuses")] public Task> GetAll(long repositoryId, string reference) { Ensure.ArgumentNotNullOrEmptyString(reference, nameof(reference)); @@ -64,10 +64,10 @@ public Task> GetAll(long repositoryId, string refere /// https://developer.github.com/v3/repos/statuses/#list-statuses-for-a-specific-ref /// /// The owner of the repository - /// The name of the repository + /// The name of the repository /// The reference (SHA, branch name, or tag name) to list commits for /// Options for changing the API response - [ManualRoute("GET", "/repos/{owner}/{name}/commits/{sha}/statuses")] + [ManualRoute("GET", "/repos/{owner}/{repo}/commits/{ref}/statuses")] public Task> GetAll(string owner, string name, string reference, ApiOptions options) { Ensure.ArgumentNotNullOrEmptyString(owner, nameof(owner)); @@ -88,7 +88,7 @@ public Task> GetAll(string owner, string name, strin /// The Id of the repository /// The reference (SHA, branch name, or tag name) to list commits for /// Options for changing the API response - [ManualRoute("GET", "/repositories/{id}/commits/{sha}/statuses")] + [ManualRoute("GET", "/repositories/{id}/commits/{ref}/statuses")] public Task> GetAll(long repositoryId, string reference, ApiOptions options) { Ensure.ArgumentNotNullOrEmptyString(reference, nameof(reference)); @@ -107,7 +107,7 @@ public Task> GetAll(long repositoryId, string refere /// The owner of the repository /// The name of the repository /// The reference (SHA, branch name, or tag name) to list commits for - [ManualRoute("GET", "/repos/{owner}/{name}/commits/{sha}/status")] + [ManualRoute("GET", "/repos/{owner}/{repo}/commits/{ref}/status")] public Task GetCombined(string owner, string name, string reference) { Ensure.ArgumentNotNullOrEmptyString(owner, nameof(owner)); @@ -126,7 +126,7 @@ public Task GetCombined(string owner, string name, string /// /// The Id of the repository /// The reference (SHA, branch name, or tag name) to list commits for - [ManualRoute("GET", "/repositories/{id}/commits/{sha}/status")] + [ManualRoute("GET", "/repositories/{id}/commits/{ref}/status")] public Task GetCombined(long repositoryId, string reference) { Ensure.ArgumentNotNullOrEmptyString(reference, nameof(reference)); @@ -144,7 +144,7 @@ public Task GetCombined(long repositoryId, string referenc /// The name of the repository /// The reference (SHA, branch name, or tag name) to list commits for /// The commit status to create - [ManualRoute("POST", "/repos/{owner}/{name}/statuses/{sha}")] + [ManualRoute("POST", "/repos/{owner}/{repo}/statuses/{ref}")] public Task Create(string owner, string name, string reference, NewCommitStatus newCommitStatus) { Ensure.ArgumentNotNullOrEmptyString(owner, nameof(owner)); @@ -164,7 +164,7 @@ public Task Create(string owner, string name, string reference, Ne /// The Id of the repository /// The reference (SHA, branch name, or tag name) to list commits for /// The commit status to create - [ManualRoute("POST", "/repositories/{id}/statuses/{sha}")] + [ManualRoute("POST", "/repositories/{id}/statuses/{ref}")] public Task Create(long repositoryId, string reference, NewCommitStatus newCommitStatus) { Ensure.ArgumentNotNullOrEmptyString(reference, nameof(reference)); diff --git a/Octokit/Clients/CommitsClient.cs b/Octokit/Clients/CommitsClient.cs index 95bb25c1f8..9853020618 100644 --- a/Octokit/Clients/CommitsClient.cs +++ b/Octokit/Clients/CommitsClient.cs @@ -28,7 +28,7 @@ public CommitsClient(IApiConnection apiConnection) : /// The owner of the repository /// The name of the repository /// Tha sha reference of the commit - [ManualRoute("GET", "/repos/{owner}/{name}/git/commits/{commit_sha}")] + [ManualRoute("GET", "/repos/{owner}/{repo}/git/commits/{commit_sha}")] public Task Get(string owner, string name, string reference) { Ensure.ArgumentNotNullOrEmptyString(owner, nameof(owner)); @@ -63,7 +63,7 @@ public Task Get(long repositoryId, string reference) /// The owner of the repository /// The name of the repository /// The commit to create - [ManualRoute("POST", "/repos/{owner}/{name}/git/commits")] + [ManualRoute("POST", "/repos/{owner}/{repo}/git/commits")] public Task Create(string owner, string name, NewCommit commit) { Ensure.ArgumentNotNullOrEmptyString(owner, nameof(owner)); diff --git a/Octokit/Clients/DeploymentStatusClient.cs b/Octokit/Clients/DeploymentStatusClient.cs index 679febf25a..63eee18cc1 100644 --- a/Octokit/Clients/DeploymentStatusClient.cs +++ b/Octokit/Clients/DeploymentStatusClient.cs @@ -27,7 +27,7 @@ public DeploymentStatusClient(IApiConnection apiConnection) /// The owner of the repository. /// The name of the repository. /// The id of the deployment. - [ManualRoute("GET", "/repos/{owner}/{name}/deployments/{deployment_id}/statuses")] + [ManualRoute("GET", "/repos/{owner}/{repo}/deployments/{deployment_id}/statuses")] public Task> GetAll(string owner, string name, int deploymentId) { Ensure.ArgumentNotNullOrEmptyString(owner, nameof(owner)); @@ -64,7 +64,7 @@ public Task> GetAll(long repositoryId, int deplo /// Options for changing the API response [Preview("ant-man")] [Preview("flash")] - [ManualRoute("GET", "/repos/{owner}/{name}/deployments/{deployment_id}/statuses")] + [ManualRoute("GET", "/repos/{owner}/{repo}/deployments/{deployment_id}/statuses")] public Task> GetAll(string owner, string name, int deploymentId, ApiOptions options) { Ensure.ArgumentNotNullOrEmptyString(owner, nameof(owner)); @@ -113,7 +113,7 @@ public Task> GetAll(long repositoryId, int deplo /// The new deployment status to create. [Preview("ant-man")] [Preview("flash")] - [ManualRoute("POST", "/repos/{owner}/{name}/deployments/{deployment_id}/statuses")] + [ManualRoute("POST", "/repos/{owner}/{repo}/deployments/{deployment_id}/statuses")] public Task Create(string owner, string name, int deploymentId, NewDeploymentStatus newDeploymentStatus) { Ensure.ArgumentNotNullOrEmptyString(owner, nameof(owner)); diff --git a/Octokit/Clients/DeploymentsClient.cs b/Octokit/Clients/DeploymentsClient.cs index 4ef62344f7..b7eb95c177 100644 --- a/Octokit/Clients/DeploymentsClient.cs +++ b/Octokit/Clients/DeploymentsClient.cs @@ -31,7 +31,7 @@ public DeploymentsClient(IApiConnection apiConnection) /// /// The owner of the repository /// The name of the repository - [ManualRoute("GET", "/repos/{owner}/{name}/deployments")] + [ManualRoute("GET", "/repos/{owner}/{repo}/deployments")] public Task> GetAll(string owner, string name) { Ensure.ArgumentNotNullOrEmptyString(owner, nameof(owner)); @@ -65,7 +65,7 @@ public Task> GetAll(long repositoryId) /// The name of the repository /// Options for changing the API response [Preview("ant-man")] - [ManualRoute("GET", "/repos/{owner}/{name}/deployments")] + [ManualRoute("GET", "/repos/{owner}/{repo}/deployments")] public Task> GetAll(string owner, string name, ApiOptions options) { Ensure.ArgumentNotNullOrEmptyString(owner, nameof(owner)); @@ -106,7 +106,7 @@ public Task> GetAll(long repositoryId, ApiOptions opti /// The name of the repository /// A instance describing the new deployment to create [Preview("ant-man")] - [ManualRoute("POST", "/repos/{owner}/{name}/deployments")] + [ManualRoute("POST", "/repos/{owner}/{repo}/deployments")] public Task Create(string owner, string name, NewDeployment newDeployment) { Ensure.ArgumentNotNullOrEmptyString(owner, nameof(owner)); diff --git a/Octokit/Clients/EventsClient.cs b/Octokit/Clients/EventsClient.cs index 83dfa282b3..3127252737 100644 --- a/Octokit/Clients/EventsClient.cs +++ b/Octokit/Clients/EventsClient.cs @@ -56,7 +56,7 @@ public Task> GetAll(ApiOptions options) /// /// The owner of the repository /// The name of the repository - [ManualRoute("GET", "/repos/{owner}/{name}/events")] + [ManualRoute("GET", "/repos/{owner}/{repo}/events")] public Task> GetAllForRepository(string owner, string name) { Ensure.ArgumentNotNullOrEmptyString(owner, nameof(owner)); @@ -87,7 +87,7 @@ public Task> GetAllForRepository(long repositoryId) /// The owner of the repository /// The name of the repository /// Options for changing the API response - [ManualRoute("GET", "/repos/{owner}/{name}/events")] + [ManualRoute("GET", "/repos/{owner}/{repo}/events")] public Task> GetAllForRepository(string owner, string name, ApiOptions options) { Ensure.ArgumentNotNullOrEmptyString(owner, nameof(owner)); @@ -121,7 +121,7 @@ public Task> GetAllForRepository(long repositoryId, ApiO /// /// The owner of the repository /// The name of the repository - [ManualRoute("GET", "/repos/{owner}/{name}/issues/events")] + [ManualRoute("GET", "/repos/{owner}/{repo}/issues/events")] public Task> GetAllIssuesForRepository(string owner, string name) { Ensure.ArgumentNotNullOrEmptyString(owner, nameof(owner)); @@ -152,7 +152,7 @@ public Task> GetAllIssuesForRepository(long repository /// The owner of the repository /// The name of the repository /// Options for changing the API response - [ManualRoute("GET", "/repos/{owner}/{name}/issues/events")] + [ManualRoute("GET", "/repos/{owner}/{repo}/issues/events")] public Task> GetAllIssuesForRepository(string owner, string name, ApiOptions options) { Ensure.ArgumentNotNullOrEmptyString(owner, nameof(owner)); diff --git a/Octokit/Clients/FollowersClient.cs b/Octokit/Clients/FollowersClient.cs index 60b819fc30..a631278ee0 100644 --- a/Octokit/Clients/FollowersClient.cs +++ b/Octokit/Clients/FollowersClient.cs @@ -57,7 +57,7 @@ public Task> GetAllForCurrent(ApiOptions options) /// See the API documentation for more information. /// /// A of s that follow the passed user. - [ManualRoute("GET", "/user/{username}/followers")] + [ManualRoute("GET", "/users/{username}/followers")] public Task> GetAll(string login) { Ensure.ArgumentNotNullOrEmptyString(login, nameof(login)); @@ -74,7 +74,7 @@ public Task> GetAll(string login) /// See the API documentation for more information. /// /// A of s that follow the passed user. - [ManualRoute("GET", "/user/{username}/followers")] + [ManualRoute("GET", "/users/{username}/followers")] public Task> GetAll(string login, ApiOptions options) { Ensure.ArgumentNotNullOrEmptyString(login, nameof(login)); @@ -179,7 +179,7 @@ public async Task IsFollowingForCurrent(string following) /// See the API documentation for more information. /// /// A bool representing the success of the operation. - [ManualRoute("GET", "/users/{login}/following/{username}")] + [ManualRoute("GET", "/users/{username}/following/{target_user}")] public async Task IsFollowing(string login, string following) { Ensure.ArgumentNotNullOrEmptyString(login, nameof(login)); diff --git a/Octokit/Clients/GistsClient.cs b/Octokit/Clients/GistsClient.cs index facf8f2db5..229f504ca1 100644 --- a/Octokit/Clients/GistsClient.cs +++ b/Octokit/Clients/GistsClient.cs @@ -49,8 +49,8 @@ public Task Create(NewGist newGist) { Ensure.ArgumentNotNull(newGist, nameof(newGist)); - //Required to create anonymous object to match signature of files hash. - // Allowing the serializer to handle Dictionary + //Required to create anonymous object to match signature of files hash. + // Allowing the serializer to handle Dictionary // will fail to match. var filesAsJsonObject = new JsonObject(); foreach (var kvp in newGist.Files) @@ -97,7 +97,7 @@ public Task Delete(string id) } /// - /// List the authenticated user’s gists or if called anonymously, + /// List the authenticated user’s gists or if called anonymously, /// this will return all public gists /// /// @@ -110,7 +110,7 @@ public Task> GetAll() } /// - /// List the authenticated user’s gists or if called anonymously, + /// List the authenticated user’s gists or if called anonymously, /// this will return all public gists /// /// @@ -126,7 +126,7 @@ public Task> GetAll(ApiOptions options) } /// - /// List the authenticated user’s gists or if called anonymously, + /// List the authenticated user’s gists or if called anonymously, /// this will return all public gists /// /// @@ -140,7 +140,7 @@ public Task> GetAll(DateTimeOffset since) } /// - /// List the authenticated user’s gists or if called anonymously, + /// List the authenticated user’s gists or if called anonymously, /// this will return all public gists /// /// @@ -278,7 +278,7 @@ public Task> GetAllStarred(DateTimeOffset since, ApiOptions /// http://developer.github.com/v3/gists/#list-gists /// /// The user - [ManualRoute("GET", "/users/{user}/gists")] + [ManualRoute("GET", "/users/{username}/gists")] public Task> GetAllForUser(string user) { Ensure.ArgumentNotNullOrEmptyString(user, nameof(user)); @@ -294,7 +294,7 @@ public Task> GetAllForUser(string user) /// /// The user /// Options for changing the API response - [ManualRoute("GET", "/users/{user}/gists")] + [ManualRoute("GET", "/users/{username}/gists")] public Task> GetAllForUser(string user, ApiOptions options) { Ensure.ArgumentNotNullOrEmptyString(user, nameof(user)); @@ -311,7 +311,7 @@ public Task> GetAllForUser(string user, ApiOptions options) /// /// The user /// Only gists updated at or after this time are returned - [ManualRoute("GET", "/users/{user}/gists")] + [ManualRoute("GET", "/users/{username}/gists")] public Task> GetAllForUser(string user, DateTimeOffset since) { Ensure.ArgumentNotNullOrEmptyString(user, nameof(user)); @@ -328,7 +328,7 @@ public Task> GetAllForUser(string user, DateTimeOffset since /// The user /// Only gists updated at or after this time are returned /// Options for changing the API response - [ManualRoute("GET", "/users/{user}/gists")] + [ManualRoute("GET", "/users/{username}/gists")] public Task> GetAllForUser(string user, DateTimeOffset since, ApiOptions options) { Ensure.ArgumentNotNullOrEmptyString(user, nameof(user)); diff --git a/Octokit/Clients/GitHubAppsClient.cs b/Octokit/Clients/GitHubAppsClient.cs index 32fa47aadf..7a0f08c875 100644 --- a/Octokit/Clients/GitHubAppsClient.cs +++ b/Octokit/Clients/GitHubAppsClient.cs @@ -94,7 +94,7 @@ public Task GetInstallation(long installationId) /// https://developer.github.com/v3/apps/#get-a-single-installation /// The Id of the GitHub App Installation [Preview("machine-man")] - [ManualRoute("GET", "/app/installations/{id}")] + [ManualRoute("GET", "/app/installations/{installation_id}")] public Task GetInstallationForCurrent(long installationId) { return ApiConnection.Get(ApiUrls.Installation(installationId), null, AcceptHeaders.GitHubAppsPreview); @@ -142,7 +142,7 @@ public async Task GetAllInstallationsForCurrentUser(ApiOp /// /// The Id of the GitHub App Installation [Preview("machine-man")] - [ManualRoute("GET", "/app/installations/{id}/access_tokens")] + [ManualRoute("GET", "/app/installations/{installation_id}/access_tokens")] public Task CreateInstallationToken(long installationId) { return ApiConnection.Post(ApiUrls.AccessTokens(installationId), string.Empty, AcceptHeaders.GitHubAppsPreview); @@ -169,7 +169,7 @@ public Task GetOrganizationInstallationForCurrent(string organizat /// The owner of the repo /// The name of the repo [Preview("machine-man")] - [ManualRoute("GET", "/repos/{owner}/{name}/installation")] + [ManualRoute("GET", "/repos/{owner}/{repo}/installation")] public Task GetRepositoryInstallationForCurrent(string owner, string repo) { Ensure.ArgumentNotNullOrEmptyString(owner, nameof(owner)); @@ -196,7 +196,7 @@ public Task GetRepositoryInstallationForCurrent(long repositoryId) /// https://developer.github.com/v3/apps/#find-user-installation /// The name of the user [Preview("machine-man")] - [ManualRoute("GET", "/users/{user}/installation")] + [ManualRoute("GET", "/users/{username}/installation")] public Task GetUserInstallationForCurrent(string user) { Ensure.ArgumentNotNullOrEmptyString(user, nameof(user)); diff --git a/Octokit/Clients/IssueCommentReactionsClient.cs b/Octokit/Clients/IssueCommentReactionsClient.cs index e8a0614283..f8293501b2 100644 --- a/Octokit/Clients/IssueCommentReactionsClient.cs +++ b/Octokit/Clients/IssueCommentReactionsClient.cs @@ -25,7 +25,7 @@ public IssueCommentReactionsClient(IApiConnection apiConnection) /// The comment id /// The reaction to create [Preview("squirrel-girl")] - [ManualRoute("POST", "/repos/{owner}/{name}/issues/comments/{number}/reactions")] + [ManualRoute("POST", "/repos/{owner}/{repo}/issues/comments/{number}/reactions")] public Task Create(string owner, string name, int number, NewReaction reaction) { Ensure.ArgumentNotNullOrEmptyString(owner, nameof(owner)); @@ -58,7 +58,7 @@ public Task Create(long repositoryId, int number, NewReaction reaction /// The owner of the repository /// The name of the repository /// The comment id - [ManualRoute("POST", "/repos/{owner}/{name}/issues/comments/{number}/reactions")] + [ManualRoute("POST", "/repos/{owner}/{repo}/issues/comments/{number}/reactions")] public Task> GetAll(string owner, string name, int number) { return GetAll(owner, name, number, ApiOptions.None); @@ -73,7 +73,7 @@ public Task> GetAll(string owner, string name, int numbe /// The comment id /// Options for changing the API response [Preview("squirrel-girl")] - [ManualRoute("POST", "/repos/{owner}/{name}/issues/comments/{number}/reactions")] + [ManualRoute("POST", "/repos/{owner}/{repo}/issues/comments/{number}/reactions")] public Task> GetAll(string owner, string name, int number, ApiOptions options) { Ensure.ArgumentNotNullOrEmptyString(owner, nameof(owner)); diff --git a/Octokit/Clients/IssueCommentsClient.cs b/Octokit/Clients/IssueCommentsClient.cs index e243f582b0..a91648c53e 100644 --- a/Octokit/Clients/IssueCommentsClient.cs +++ b/Octokit/Clients/IssueCommentsClient.cs @@ -27,7 +27,7 @@ public IssueCommentsClient(IApiConnection apiConnection) : base(apiConnection) /// The name of the repository /// The issue comment id [Preview("squirrel-girl")] - [ManualRoute("GET", "/repos/{owner}/{name}/issues/comments/{comment_id}")] + [ManualRoute("GET", "/repos/{owner}/{repo}/issues/comments/{comment_id}")] public Task Get(string owner, string name, int id) { Ensure.ArgumentNotNullOrEmptyString(owner, nameof(owner)); @@ -55,7 +55,7 @@ public Task Get(long repositoryId, int id) /// http://developer.github.com/v3/issues/comments/#list-comments-in-a-repository /// The owner of the repository /// The name of the repository - [ManualRoute("GET", "/repos/{owner}/{name}/issues/comments")] + [ManualRoute("GET", "/repos/{owner}/{repo}/issues/comments")] public Task> GetAllForRepository(string owner, string name) { Ensure.ArgumentNotNullOrEmptyString(owner, nameof(owner)); @@ -82,7 +82,7 @@ public Task> GetAllForRepository(long repositoryId) /// The owner of the repository /// The name of the repository /// Options for changing the API response - [ManualRoute("GET", "/repos/{owner}/{name}/issues/comments")] + [ManualRoute("GET", "/repos/{owner}/{repo}/issues/comments")] public Task> GetAllForRepository(string owner, string name, ApiOptions options) { Ensure.ArgumentNotNullOrEmptyString(owner, nameof(owner)); @@ -113,7 +113,7 @@ public Task> GetAllForRepository(long repositoryId, /// The owner of the repository /// The name of the repository /// The sorting parameters - [ManualRoute("GET", "/repos/{owner}/{name}/issues/comments")] + [ManualRoute("GET", "/repos/{owner}/{repo}/issues/comments")] public Task> GetAllForRepository(string owner, string name, IssueCommentRequest request) { Ensure.ArgumentNotNullOrEmptyString(owner, nameof(owner)); @@ -146,7 +146,7 @@ public Task> GetAllForRepository(long repositoryId, /// The sorting parameters /// Options for changing the API response [Preview("squirrel-girl")] - [ManualRoute("GET", "/repos/{owner}/{name}/issues/comments")] + [ManualRoute("GET", "/repos/{owner}/{repo}/issues/comments")] public Task> GetAllForRepository(string owner, string name, IssueCommentRequest request, ApiOptions options) { Ensure.ArgumentNotNullOrEmptyString(owner, nameof(owner)); @@ -181,7 +181,7 @@ public Task> GetAllForRepository(long repositoryId, /// The owner of the repository /// The name of the repository /// The issue number - [ManualRoute("GET", "/repos/{owner}/{name}/issues/{number]/comments")] + [ManualRoute("GET", "/repos/{owner}/{repo}/issues/{number]/comments")] public Task> GetAllForIssue(string owner, string name, int number) { Ensure.ArgumentNotNullOrEmptyString(owner, nameof(owner)); @@ -210,7 +210,7 @@ public Task> GetAllForIssue(long repositoryId, int n /// The name of the repository /// The issue number /// Options for changing the API response - [ManualRoute("GET", "/repos/{owner}/{name}/issues/{number]/comments")] + [ManualRoute("GET", "/repos/{owner}/{repo}/issues/{number]/comments")] public Task> GetAllForIssue(string owner, string name, int number, ApiOptions options) { Ensure.ArgumentNotNullOrEmptyString(owner, nameof(owner)); @@ -243,7 +243,7 @@ public Task> GetAllForIssue(long repositoryId, int n /// The name of the repository /// The issue number /// The sorting parameters - [ManualRoute("GET", "/repos/{owner}/{name}/issues/{number]/comments")] + [ManualRoute("GET", "/repos/{owner}/{repo}/issues/{number]/comments")] public Task> GetAllForIssue(string owner, string name, int number, IssueCommentRequest request) { Ensure.ArgumentNotNullOrEmptyString(owner, nameof(owner)); @@ -278,7 +278,7 @@ public Task> GetAllForIssue(long repositoryId, int n /// The sorting parameters /// Options for changing the API response [Preview("squirrel-girl")] - [ManualRoute("GET", "/repos/{owner}/{name}/issues/{number]/comments")] + [ManualRoute("GET", "/repos/{owner}/{repo}/issues/{number]/comments")] public Task> GetAllForIssue(string owner, string name, int number, IssueCommentRequest request, ApiOptions options) { Ensure.ArgumentNotNullOrEmptyString(owner, nameof(owner)); @@ -315,7 +315,7 @@ public Task> GetAllForIssue(long repositoryId, int n /// The name of the repository /// The number of the issue /// The new comment to add to the issue - [ManualRoute("POST", "/repos/{owner}/{name}/issues/{number]/comments")] + [ManualRoute("POST", "/repos/{owner}/{repo}/issues/{number]/comments")] public Task Create(string owner, string name, int number, string newComment) { Ensure.ArgumentNotNullOrEmptyString(owner, nameof(owner)); @@ -348,7 +348,7 @@ public Task Create(long repositoryId, int number, string newCommen /// The name of the repository /// The comment id /// The modified comment - [ManualRoute("PATCH", "/repos/{owner}/{name}/issues/comments/{id}")] + [ManualRoute("PATCH", "/repos/{owner}/{repo}/issues/comments/{id}")] public Task Update(string owner, string name, int id, string commentUpdate) { Ensure.ArgumentNotNullOrEmptyString(owner, nameof(owner)); @@ -380,7 +380,7 @@ public Task Update(long repositoryId, int id, string commentUpdate /// The owner of the repository /// The name of the repository /// The comment id - [ManualRoute("DELETE", "/repos/{owner}/{name}/issues/comments/{id}")] + [ManualRoute("DELETE", "/repos/{owner}/{repo}/issues/comments/{id}")] public Task Delete(string owner, string name, int id) { Ensure.ArgumentNotNullOrEmptyString(owner, nameof(owner)); diff --git a/Octokit/Clients/IssueReactionsClient.cs b/Octokit/Clients/IssueReactionsClient.cs index 05a959c84f..ea6f49b9d2 100644 --- a/Octokit/Clients/IssueReactionsClient.cs +++ b/Octokit/Clients/IssueReactionsClient.cs @@ -23,7 +23,7 @@ public IssueReactionsClient(IApiConnection apiConnection) /// The owner of the repository /// The name of the repository /// The issue id - [ManualRoute("GET", "/repos/{owner}/{name}/issues/{number}/reactions")] + [ManualRoute("GET", "/repos/{owner}/{repo}/issues/{number}/reactions")] public Task> GetAll(string owner, string name, int number) { return GetAll(owner, name, number, ApiOptions.None); @@ -38,7 +38,7 @@ public Task> GetAll(string owner, string name, int numbe /// The issue id /// Options for changing the API response [Preview("squirrel-girl")] - [ManualRoute("GET", "/repos/{owner}/{name}/issues/{number}/reactions")] + [ManualRoute("GET", "/repos/{owner}/{repo}/issues/{number}/reactions")] public Task> GetAll(string owner, string name, int number, ApiOptions options) { Ensure.ArgumentNotNullOrEmptyString(owner, nameof(owner)); @@ -85,7 +85,7 @@ public Task> GetAll(long repositoryId, int number, ApiOp /// The issue id /// The reaction to create [Preview("squirrel-girl")] - [ManualRoute("POST", "/repos/{owner}/{name}/issues/{number}/reactions")] + [ManualRoute("POST", "/repos/{owner}/{repo}/issues/{number}/reactions")] public Task Create(string owner, string name, int number, NewReaction reaction) { Ensure.ArgumentNotNullOrEmptyString(owner, nameof(owner)); diff --git a/Octokit/Clients/IssueTimelineClient.cs b/Octokit/Clients/IssueTimelineClient.cs index 20ebc310cb..5a67862a94 100644 --- a/Octokit/Clients/IssueTimelineClient.cs +++ b/Octokit/Clients/IssueTimelineClient.cs @@ -24,7 +24,7 @@ public IssueTimelineClient(IApiConnection apiConnection) : base(apiConnection) /// The owner of the repository /// The name of the repository /// The issue number - [ManualRoute("GET", "/repos/{owner}/{name}/issues/{number}/timeline")] + [ManualRoute("GET", "/repos/{owner}/{repo}/issues/{number}/timeline")] public Task> GetAllForIssue(string owner, string repo, int number) { Ensure.ArgumentNotNullOrEmptyString(owner, nameof(owner)); @@ -45,7 +45,7 @@ public Task> GetAllForIssue(string owner, strin /// Options for changing the API repsonse [Preview("mockingbird")] [Preview("starfox")] - [ManualRoute("GET", "/repos/{owner}/{name}/issues/{number}/timeline")] + [ManualRoute("GET", "/repos/{owner}/{repo}/issues/{number}/timeline")] public Task> GetAllForIssue(string owner, string repo, int number, ApiOptions options) { Ensure.ArgumentNotNullOrEmptyString(owner, nameof(owner)); diff --git a/Octokit/Clients/IssuesClient.cs b/Octokit/Clients/IssuesClient.cs index c558f22db3..8e9a5a4564 100644 --- a/Octokit/Clients/IssuesClient.cs +++ b/Octokit/Clients/IssuesClient.cs @@ -67,7 +67,7 @@ public IssuesClient(IApiConnection apiConnection) : base(apiConnection) /// The name of the repository /// The issue number [Preview("squirrel-girl")] - [ManualRoute("GET", "/repos/{owner}/{name}/issues/{number}")] + [ManualRoute("GET", "/repos/{owner}/{repo}/issues/{number}")] public Task Get(string owner, string name, int number) { Ensure.ArgumentNotNullOrEmptyString(owner, nameof(owner)); @@ -298,7 +298,7 @@ public Task> GetAllForOrganization(string organization, Iss /// /// The owner of the repository /// The name of the repository - [ManualRoute("GET", "/repos/{owner}/{name}/issues")] + [ManualRoute("GET", "/repos/{owner}/{repo}/issues")] public Task> GetAllForRepository(string owner, string name) { Ensure.ArgumentNotNullOrEmptyString(owner, nameof(owner)); @@ -329,7 +329,7 @@ public Task> GetAllForRepository(long repositoryId) /// The owner of the repository /// The name of the repository /// Options for changing the API response - [ManualRoute("GET", "/repos/{owner}/{name}/issues")] + [ManualRoute("GET", "/repos/{owner}/{repo}/issues")] public Task> GetAllForRepository(string owner, string name, ApiOptions options) { Ensure.ArgumentNotNullOrEmptyString(owner, nameof(owner)); @@ -364,7 +364,7 @@ public Task> GetAllForRepository(long repositoryId, ApiOpti /// The owner of the repository /// The name of the repository /// Used to filter and sort the list of issues returned - [ManualRoute("GET", "/repos/{owner}/{name}/issues")] + [ManualRoute("GET", "/repos/{owner}/{repo}/issues")] public Task> GetAllForRepository(string owner, string name, RepositoryIssueRequest request) { Ensure.ArgumentNotNullOrEmptyString(owner, nameof(owner)); @@ -401,7 +401,7 @@ public Task> GetAllForRepository(long repositoryId, Reposit /// Used to filter and sort the list of issues returned /// Options for changing the API response [Preview("squirrel-girl")] - [ManualRoute("GET", "/repos/{owner}/{name}/issues")] + [ManualRoute("GET", "/repos/{owner}/{repo}/issues")] public Task> GetAllForRepository(string owner, string name, RepositoryIssueRequest request, ApiOptions options) { Ensure.ArgumentNotNullOrEmptyString(owner, nameof(owner)); @@ -439,7 +439,7 @@ public Task> GetAllForRepository(long repositoryId, Reposit /// The owner of the repository /// The name of the repository /// A instance describing the new issue to create - [ManualRoute("POST", "/repos/{owner}/{name}/issues")] + [ManualRoute("POST", "/repos/{owner}/{repo}/issues")] public Task Create(string owner, string name, NewIssue newIssue) { Ensure.ArgumentNotNullOrEmptyString(owner, nameof(owner)); @@ -473,7 +473,7 @@ public Task Create(long repositoryId, NewIssue newIssue) /// The issue number /// An instance describing the changes to make to the issue /// - [ManualRoute("PATCH", "/repos/{owner}/{name}/issues/{number}")] + [ManualRoute("PATCH", "/repos/{owner}/{repo}/issues/{number}")] public Task Update(string owner, string name, int number, IssueUpdate issueUpdate) { Ensure.ArgumentNotNullOrEmptyString(owner, nameof(owner)); @@ -507,7 +507,7 @@ public Task Update(long repositoryId, int number, IssueUpdate issueUpdate /// The owner of the repository /// The name of the repository /// The issue number - [ManualRoute("PUT", "/repos/{owner}/{name}/issues/{number}/lock")] + [ManualRoute("PUT", "/repos/{owner}/{repo}/issues/{number}/lock")] public Task Lock(string owner, string name, int number) { Ensure.ArgumentNotNullOrEmptyString(owner, nameof(owner)); @@ -535,7 +535,7 @@ public Task Lock(long repositoryId, int number) /// The owner of the repository /// The name of the repository /// The issue number - [ManualRoute("DELETE", "/repos/{owner}/{name}/issues/{number}/lock")] + [ManualRoute("DELETE", "/repos/{owner}/{repo}/issues/{number}/lock")] public Task Unlock(string owner, string name, int number) { Ensure.ArgumentNotNullOrEmptyString(owner, nameof(owner)); diff --git a/Octokit/Clients/IssuesEventsClient.cs b/Octokit/Clients/IssuesEventsClient.cs index 8cee21f395..9b16d636e7 100644 --- a/Octokit/Clients/IssuesEventsClient.cs +++ b/Octokit/Clients/IssuesEventsClient.cs @@ -24,7 +24,7 @@ public IssuesEventsClient(IApiConnection apiConnection) : base(apiConnection) /// The owner of the repository /// The name of the repository /// The issue number - [ManualRoute("GET", "/repos/{owner}/{name}/issues/{number}/events")] + [ManualRoute("GET", "/repos/{owner}/{repo}/issues/{number}/events")] public Task> GetAllForIssue(string owner, string name, int number) { Ensure.ArgumentNotNullOrEmptyString(owner, nameof(owner)); @@ -58,7 +58,7 @@ public Task> GetAllForIssue(long repositoryId, int num /// The issue number /// Options for changing the API response [Preview("starfox")] - [ManualRoute("GET", "/repos/{owner}/{name}/issues/{number}/events")] + [ManualRoute("GET", "/repos/{owner}/{repo}/issues/{number}/events")] public Task> GetAllForIssue(string owner, string name, int number, ApiOptions options) { Ensure.ArgumentNotNullOrEmptyString(owner, nameof(owner)); @@ -100,7 +100,7 @@ public Task> GetAllForIssue(long repositoryId, int num /// /// The owner of the repository /// The name of the repository - [ManualRoute("GET", "/repos/{owner}/{name}/issues/events")] + [ManualRoute("GET", "/repos/{owner}/{repo}/issues/events")] public Task> GetAllForRepository(string owner, string name) { Ensure.ArgumentNotNullOrEmptyString(owner, nameof(owner)); @@ -132,7 +132,7 @@ public Task> GetAllForRepository(long repositoryId) /// The name of the repository /// Options for changing the API response [Preview("starfox")] - [ManualRoute("GET", "/repos/{owner}/{name}/issues/events")] + [ManualRoute("GET", "/repos/{owner}/{repo}/issues/events")] public Task> GetAllForRepository(string owner, string name, ApiOptions options) { Ensure.ArgumentNotNullOrEmptyString(owner, nameof(owner)); @@ -175,7 +175,7 @@ public Task> GetAllForRepository(long repositoryId, Ap /// The name of the repository /// The event id [Preview("starfox")] - [ManualRoute("GET", "/repos/{owner}/{name}/issues/events/{event_id}")] + [ManualRoute("GET", "/repos/{owner}/{repo}/issues/events/{event_id}")] public Task Get(string owner, string name, long eventId) { Ensure.ArgumentNotNullOrEmptyString(owner, nameof(owner)); diff --git a/Octokit/Clients/IssuesLabelsClient.cs b/Octokit/Clients/IssuesLabelsClient.cs index 7527eb80d5..173c968213 100644 --- a/Octokit/Clients/IssuesLabelsClient.cs +++ b/Octokit/Clients/IssuesLabelsClient.cs @@ -25,7 +25,7 @@ public IssuesLabelsClient(IApiConnection apiConnection) /// The owner of the repository /// The name of the repository /// The number of the issue - [ManualRoute("GET", "/repos/{owner}/{name}/issues/{number}/labels")] + [ManualRoute("GET", "/repos/{owner}/{repo}/issues/{number}/labels")] public Task> GetAllForIssue(string owner, string name, int number) { Ensure.ArgumentNotNullOrEmptyString(owner, nameof(owner)); @@ -58,7 +58,7 @@ public Task> GetAllForIssue(long repositoryId, int number) /// The name of the repository /// The number of the issue /// Options for changing the API response - [ManualRoute("GET", "/repos/{owner}/{name}/issues/{number}/labels")] + [ManualRoute("GET", "/repos/{owner}/{repo}/issues/{number}/labels")] public Task> GetAllForIssue(string owner, string name, int number, ApiOptions options) { Ensure.ArgumentNotNullOrEmptyString(owner, nameof(owner)); @@ -93,7 +93,7 @@ public Task> GetAllForIssue(long repositoryId, int number, /// /// The owner of the repository /// The name of the repository - [ManualRoute("GET", "/repos/{owner}/{name}/labels")] + [ManualRoute("GET", "/repos/{owner}/{repo}/labels")] public Task> GetAllForRepository(string owner, string name) { Ensure.ArgumentNotNullOrEmptyString(owner, nameof(owner)); @@ -124,7 +124,7 @@ public Task> GetAllForRepository(long repositoryId) /// The owner of the repository /// The name of the repository /// Options for changing the API response - [ManualRoute("GET", "/repos/{owner}/{name}/labels")] + [ManualRoute("GET", "/repos/{owner}/{repo}/labels")] public Task> GetAllForRepository(string owner, string name, ApiOptions options) { Ensure.ArgumentNotNullOrEmptyString(owner, nameof(owner)); @@ -159,7 +159,7 @@ public Task> GetAllForRepository(long repositoryId, ApiOpti /// The owner of the repository /// The name of the repository /// The number of the milestone - [ManualRoute("GET", "/repos/{owner}/{name}/milestones/{number}/labels")] + [ManualRoute("GET", "/repos/{owner}/{repo}/milestones/{number}/labels")] public Task> GetAllForMilestone(string owner, string name, int number) { Ensure.ArgumentNotNullOrEmptyString(owner, nameof(owner)); @@ -192,7 +192,7 @@ public Task> GetAllForMilestone(long repositoryId, int numb /// The name of the repository /// The number of the milestone /// Options for changing the API response - [ManualRoute("GET", "/repos/{owner}/{name}/milestones/{number}/labels")] + [ManualRoute("GET", "/repos/{owner}/{repo}/milestones/{number}/labels")] public Task> GetAllForMilestone(string owner, string name, int number, ApiOptions options) { Ensure.ArgumentNotNullOrEmptyString(owner, nameof(owner)); @@ -228,7 +228,7 @@ public Task> GetAllForMilestone(long repositoryId, int numb /// The owner of the repository /// The name of the repository /// The name of the label - [ManualRoute("GET", "/repos/{owner}/{name}/labels/{name}")] + [ManualRoute("GET", "/repos/{owner}/{repo}/labels/{name}")] public Task