Fix usage of FormatUri method (#1290)

* updated xml documentation of Deployments method

* fixed in OrganizationMembersClient.Delete method.

* Revert "fixed in OrganizationMembersClient.Delete method."

This reverts commit f47405f5337e60945fdb3ccf1368f16069599217.

* fixed usage of "repos/{0}/{1}".FormatUri(owner, name);

* fixed usage of "user/keys/{0}".FormatUri(id)

* fixed usage of "users/{0}".FormatUri(login)

* added ApiUrls.StatsContributors method

fixed usage of "repos/{0}/{1}/stats/contributors".FormatUri(owner, repositoryName)

* added method ApiUrls.StatsCommitActivity
fixed usage of "repos/{0}/{1}/stats/commit_activity".FormatUri(owner, repositoryName)

* fix to prev. commit

* added method ApiUrls.StatsCodeFrequency
fixed usage of "repos/{0}/{1}/stats/code_frequency".FormatUri(owner, name)

* added method ApiUrls.StatsParticipation
fixed usage of "repos/{0}/{1}/stats/participation".FormatUri(owner, name)

* added method ApiUrls.StatsPunchCard
fixed usage of "repos/{0}/{1}/stats/punch_card".FormatUri(owner, name)
fixed documentation

* added method ApiUrls.RepoCollaborator
fixed usage of "repos/{0}/{1}/collaborators/{2}".FormatUri(owner, repo, user)

* added method ApiUrls.OrganizationMember
fixed usage of"orgs/{0}/members/{1}".FormatUri(org, user)

* added method ApiUrls.Organization
fixed usage of "orgs/{0}".FormatUri(organizationName)

* Fixed inconsistency in ApiUrls.cs (#1287)

* Fix inconsistecy in parameters name that used in methods that use "repos/{0}/{1}" syntax.

* added XML documentation for PullRequestFiles method

* updated XML documentation of some methods in ApiUrls

* added needed XML doc tags

* fixed name of parameter

* fixed name of parameter

* undo prev. commit

* updated XML documentation of ApiUrls

* fixed after merge errors

* fxied after merge errors

* added OrganizationMembersClient accidentaly missed during rebase

* errors fixed arises during merging

* fixed by remarks
This commit is contained in:
Alexander Efremov
2016-05-11 13:51:31 +07:00
committed by Brendan Forster
parent 9b06db25a9
commit efa2942669
8 changed files with 122 additions and 40 deletions
+6 -12
View File
@@ -73,12 +73,10 @@ namespace Octokit
Ensure.ArgumentNotNullOrEmptyString(owner, "owner");
Ensure.ArgumentNotNullOrEmptyString(repo, "repo");
Ensure.ArgumentNotNullOrEmptyString(user, "user");
var endpoint = "repos/{0}/{1}/collaborators/{2}".FormatUri(owner, repo, user);
try
{
var response = await Connection.Get<object>(endpoint, null, null).ConfigureAwait(false);
var response = await Connection.Get<object>(ApiUrls.RepoCollaborator(owner, repo, user), null, null).ConfigureAwait(false);
return response.HttpResponse.IsTrue();
}
catch (NotFoundException)
@@ -100,10 +98,8 @@ namespace Octokit
Ensure.ArgumentNotNullOrEmptyString(owner, "owner");
Ensure.ArgumentNotNullOrEmptyString(repo, "repo");
Ensure.ArgumentNotNullOrEmptyString(user, "user");
var endpoint = "repos/{0}/{1}/collaborators/{2}".FormatUri(owner, repo, user);
return ApiConnection.Put(endpoint);
return ApiConnection.Put(ApiUrls.RepoCollaborator(owner, repo, user));
}
/// <summary>
@@ -119,10 +115,8 @@ namespace Octokit
Ensure.ArgumentNotNullOrEmptyString(owner, "owner");
Ensure.ArgumentNotNullOrEmptyString(repo, "repo");
Ensure.ArgumentNotNullOrEmptyString(user, "user");
var endpoint = "repos/{0}/{1}/collaborators/{2}".FormatUri(owner, repo, user);
return ApiConnection.Delete(endpoint);
return ApiConnection.Delete(ApiUrls.RepoCollaborator(owner, repo, user));
}
}
}