From 5b9f817519ec2e9915f46b105bb7133c1edd45b6 Mon Sep 17 00:00:00 2001 From: Alexander Efremov Date: Thu, 5 May 2016 17:37:55 +0700 Subject: [PATCH] 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 --- Octokit/Helpers/ApiUrls.cs | 105 +++++++++++++++++++------------------ 1 file changed, 54 insertions(+), 51 deletions(-) diff --git a/Octokit/Helpers/ApiUrls.cs b/Octokit/Helpers/ApiUrls.cs index b91b695782..f03a8b9c53 100644 --- a/Octokit/Helpers/ApiUrls.cs +++ b/Octokit/Helpers/ApiUrls.cs @@ -588,60 +588,60 @@ public static Uri Milestones(string owner, string name) /// Returns the that returns the specified label. /// /// The owner of the repository - /// The name of the repository - /// The milestone number + /// The name of the repository + /// The name of label /// - public static Uri Label(string owner, string repo, string name) + public static Uri Label(string owner, string name, string labelName) { - return "repos/{0}/{1}/labels/{2}".FormatUri(owner, repo, name); + return "repos/{0}/{1}/labels/{2}".FormatUri(owner, name, labelName); } /// /// Returns the that returns all of the labels for the specified repository. /// /// The owner of the repository - /// The name of the repository + /// The name of the repository /// - public static Uri Labels(string owner, string repo) + public static Uri Labels(string owner, string name) { - return "repos/{0}/{1}/labels".FormatUri(owner, repo); + return "repos/{0}/{1}/labels".FormatUri(owner, name); } /// /// Returns the that returns the named label for the specified issue. /// /// The owner of the repository - /// The name of the repository + /// The name of the repository /// The issue number - /// The name of the label + /// The name of the label /// - public static Uri IssueLabel(string owner, string repo, int number, string name) + public static Uri IssueLabel(string owner, string name, int number, string labelName) { - return "repos/{0}/{1}/issues/{2}/labels/{3}".FormatUri(owner, repo, number, name); + return "repos/{0}/{1}/issues/{2}/labels/{3}".FormatUri(owner, name, number, labelName); } /// /// Returns the that returns all of the labels for the specified issue. /// /// The owner of the repository - /// The name of the repository + /// The name of the repository /// The issue number /// - public static Uri IssueLabels(string owner, string repo, int number) + public static Uri IssueLabels(string owner, string name, int number) { - return "repos/{0}/{1}/issues/{2}/labels".FormatUri(owner, repo, number); + return "repos/{0}/{1}/issues/{2}/labels".FormatUri(owner, name, number); } /// /// Returns the that returns all of the labels for all issues in the specified milestone. /// /// The owner of the repository - /// The name of the repository + /// The name of the repository /// The milestone number /// - public static Uri MilestoneLabels(string owner, string repo, int number) + public static Uri MilestoneLabels(string owner, string name, int number) { - return "repos/{0}/{1}/milestones/{2}/labels".FormatUri(owner, repo, number); + return "repos/{0}/{1}/milestones/{2}/labels".FormatUri(owner, name, number); } /// @@ -660,47 +660,47 @@ public static Uri CreateCommitStatus(string owner, string name, string reference /// Returns the that lists the repository hooks for the specified reference. /// /// The owner of the repository - /// The name of the repository + /// The name of the repository /// - public static Uri RepositoryHooks(string owner, string repositoryName) + public static Uri RepositoryHooks(string owner, string name) { - return "repos/{0}/{1}/hooks".FormatUri(owner, repositoryName); + return "repos/{0}/{1}/hooks".FormatUri(owner, name); } /// /// Returns the that gets the repository hook for the specified reference. /// /// The owner of the repository - /// The name of the repository + /// The name of the repository /// The identifier of the repository hook /// - public static Uri RepositoryHookById(string owner, string repositoryName, int hookId) + public static Uri RepositoryHookById(string owner, string name, int hookId) { - return "repos/{0}/{1}/hooks/{2}".FormatUri(owner, repositoryName, hookId); + return "repos/{0}/{1}/hooks/{2}".FormatUri(owner, name, hookId); } /// /// Returns the that can tests a specified repository hook /// /// The owner of the repository - /// The name of the repository + /// The name of the repository /// The identifier of the repository hook /// - public static Uri RepositoryHookTest(string owner, string repositoryName, int hookId) + public static Uri RepositoryHookTest(string owner, string name, int hookId) { - return "repos/{0}/{1}/hooks/{2}/tests".FormatUri(owner, repositoryName, hookId); + return "repos/{0}/{1}/hooks/{2}/tests".FormatUri(owner, name, hookId); } /// /// Returns the that can ping a specified repository hook /// /// The owner of the repository - /// The name of the repository + /// The name of the repository /// The identifier of the repository hook /// - public static Uri RepositoryHookPing(string owner, string repositoryName, int hookId) + public static Uri RepositoryHookPing(string owner, string name, int hookId) { - return "repos/{0}/{1}/hooks/{2}/pings".FormatUri(owner, repositoryName, hookId); + return "repos/{0}/{1}/hooks/{2}/pings".FormatUri(owner, name, hookId); } /// @@ -731,11 +731,11 @@ public static Uri CombinedCommitStatus(string owner, string name, string referen /// Returns the that lists the repository forks for the specified reference. /// /// The owner of the repository - /// The name of the repository + /// The name of the repository /// - public static Uri RepositoryForks(string owner, string repositoryName) + public static Uri RepositoryForks(string owner, string name) { - return "repos/{0}/{1}/forks".FormatUri(owner, repositoryName); + return "repos/{0}/{1}/forks".FormatUri(owner, name); } /// @@ -743,7 +743,7 @@ public static Uri RepositoryForks(string owner, string repositoryName) /// /// The owner of the repository /// The name of the repository - /// The that lists the watched repositories for the authenticated user. + /// The that lists the watched repositories for the authenticated user. public static Uri Watchers(string owner, string name) { return "repos/{0}/{1}/subscribers".FormatUri(owner, name); @@ -1064,6 +1064,9 @@ public static Uri CreateMerge(string owner, string name) /// /// Returns the for the network of repositories. /// + /// The owner of the repository + /// The name of the repository + /// The for the network of repositories. public static Uri NetworkEvents(string owner, string name) { return "networks/{0}/{1}/events".FormatUri(owner, name); @@ -1316,11 +1319,11 @@ public static Uri TeamRepository(int id, string organization, string repoName) /// use for update or deleting a team /// /// owner of repo - /// name of repo + /// name of repo /// - public static Uri RepoCollaborators(string owner, string repo) + public static Uri RepoCollaborators(string owner, string name) { - return "repos/{0}/{1}/collaborators".FormatUri(owner, repo); + return "repos/{0}/{1}/collaborators".FormatUri(owner, name); } /// @@ -1339,11 +1342,11 @@ public static Uri RepoCollaborator(string owner, string repo, string user) /// returns the for branches /// /// owner of repo - /// name of repo + /// name of repo /// - public static Uri RepoBranches(string owner, string repo) + public static Uri RepoBranches(string owner, string name) { - return "repos/{0}/{1}/branches".FormatUri(owner, repo); + return "repos/{0}/{1}/branches".FormatUri(owner, name); } /// @@ -1473,12 +1476,12 @@ public static Uri RepoCompare(string owner, string name, string @base, string he /// Returns the for a repository branch. /// /// The owner of the repository - /// The name of the repository + /// The name of the repository /// The name of the branch /// - public static Uri RepoBranch(string owner, string repositoryName, string branchName) + public static Uri RepoBranch(string owner, string name, string branchName) { - return "repos/{0}/{1}/branches/{2}".FormatUri(owner, repositoryName, branchName); + return "repos/{0}/{1}/branches/{2}".FormatUri(owner, name, branchName); } /// @@ -1663,13 +1666,13 @@ public static Uri RepositoryContent(string owner, string name, string path) } /// - /// Creates the relative for getting the archive link of the specified repository and path + /// Creates the relative for getting an archive of a given repository's contents, in a specific format /// /// The owner of the repository /// The name of the repository /// The format of the archive. Can be either tarball or zipball - /// A valid Git reference - /// The relative for getting the archive link of the specified repository and path + /// A valid Git reference. + /// The for getting an archive of a given repository's contents, in a specific format public static Uri RepositoryArchiveLink(string owner, string name, ArchiveFormat archiveFormat, string reference) { return "repos/{0}/{1}/{2}/{3}".FormatUri(owner, name, archiveFormat.ToParameter(), reference); @@ -1689,33 +1692,33 @@ public static Uri RepositoryContent(string owner, string name, string path, stri } /// - /// Creates the relative for getting the pages of the specified repository and path + /// Creates the relative for getting the page metadata for a given repository /// /// The owner of the repository /// The name of the repository - /// The relative for getting the pages of the specified repository and path + /// The for getting the page metadata for a given repository public static Uri RepositoryPage(string owner, string name) { return "repos/{0}/{1}/pages".FormatUri(owner, name); } /// - /// Creates the relative for getting the page builds of the specified repository and path + /// Creates the relative for getting all build metadata for a given repository /// /// The owner of the repository /// The name of the repository - /// The relative for getting the page builds of the specified repository and path + /// The for getting all build metadata for a given repository public static Uri RepositoryPageBuilds(string owner, string name) { return "repos/{0}/{1}/pages/builds".FormatUri(owner, name); } /// - /// Creates the relative for getting the latest page builds of the specified repository and path + /// Creates the relative for getting the build metadata for the last build for a given repository /// /// The owner of the repository /// The name of the repository - /// The relative for getting the latest page builds of the specified repository and path + /// The for getting the build metadata for the last build for a given repository public static Uri RepositoryPageBuildsLatest(string owner, string name) { return "repos/{0}/{1}/pages/builds/latest".FormatUri(owner, name);