diff --git a/Octokit.Reactive/Clients/IObservableAssigneesClient.cs b/Octokit.Reactive/Clients/IObservableAssigneesClient.cs
index 502ef625..c1de2265 100644
--- a/Octokit.Reactive/Clients/IObservableAssigneesClient.cs
+++ b/Octokit.Reactive/Clients/IObservableAssigneesClient.cs
@@ -11,7 +11,7 @@ namespace Octokit.Reactive
/// The owner of the repository
/// The name of the repository
///
- IObservable GetForRepository(string owner, string name);
+ IObservable GetAllForRepository(string owner, string name);
///
/// Checks to see if a user is an assignee for a repository.
diff --git a/Octokit.Reactive/Clients/IObservableEventsClient.cs b/Octokit.Reactive/Clients/IObservableEventsClient.cs
index ced8b7ff..5c037fdb 100644
--- a/Octokit.Reactive/Clients/IObservableEventsClient.cs
+++ b/Octokit.Reactive/Clients/IObservableEventsClient.cs
@@ -54,7 +54,7 @@ namespace Octokit.Reactive
///
/// The login of the user
/// All the s that a particular user has received.
- IObservable GetUserReceived(string user);
+ IObservable GetAllUserReceived(string user);
///
/// Gets all the events that have been received by a given user.
@@ -64,7 +64,7 @@ namespace Octokit.Reactive
///
/// The login of the user
/// All the s that a particular user has received.
- IObservable GetUserReceivedPublic(string user);
+ IObservable GetAllUserReceivedPublic(string user);
///
/// Gets all the events that have been performed by a given user.
@@ -74,7 +74,7 @@ namespace Octokit.Reactive
///
/// The login of the user
/// All the s that a particular user has performed.
- IObservable GetUserPerformed(string user);
+ IObservable GetAllUserPerformed(string user);
///
/// Gets all the public events that have been performed by a given user.
@@ -84,7 +84,7 @@ namespace Octokit.Reactive
///
/// The login of the user
/// All the public s that a particular user has performed.
- IObservable GetUserPerformedPublic(string user);
+ IObservable GetAllUserPerformedPublic(string user);
///
/// Gets all the events that are associated with an organization.
@@ -95,6 +95,6 @@ namespace Octokit.Reactive
/// The login of the user
/// The name of the organization
/// All the public s that are associated with an organization.
- IObservable GetForAnOrganization(string user, string organization);
+ IObservable GetAllForAnOrganization(string user, string organization);
}
}
\ No newline at end of file
diff --git a/Octokit.Reactive/Clients/IObservableGistCommentsClient.cs b/Octokit.Reactive/Clients/IObservableGistCommentsClient.cs
index 11accd8c..be577f16 100644
--- a/Octokit.Reactive/Clients/IObservableGistCommentsClient.cs
+++ b/Octokit.Reactive/Clients/IObservableGistCommentsClient.cs
@@ -23,7 +23,7 @@ namespace Octokit.Reactive
/// http://developer.github.com/v3/gists/comments/#list-comments-on-a-gist
/// The id of the gist
/// IObservable{GistComment}.
- IObservable GetForGist(string gistId);
+ IObservable GetAllForGist(string gistId);
///
/// Creates a comment for the gist with the specified id.
diff --git a/Octokit.Reactive/Clients/IObservableIssueCommentsClient.cs b/Octokit.Reactive/Clients/IObservableIssueCommentsClient.cs
index c6c6a67d..256c2990 100644
--- a/Octokit.Reactive/Clients/IObservableIssueCommentsClient.cs
+++ b/Octokit.Reactive/Clients/IObservableIssueCommentsClient.cs
@@ -25,7 +25,7 @@ namespace Octokit.Reactive
/// The owner of the repository
/// The name of the repository
/// The list of s for the specified Repository.
- IObservable GetForRepository(string owner, string name);
+ IObservable GetAllForRepository(string owner, string name);
///
/// Gets Issue Comments for a specified Issue.
@@ -35,7 +35,7 @@ namespace Octokit.Reactive
/// The name of the repository
/// The issue number
/// The list of s for the specified Issue.
- IObservable GetForIssue(string owner, string name, int number);
+ IObservable GetAllForIssue(string owner, string name, int number);
///
/// Creates a new Issue Comment for a specified Issue.
diff --git a/Octokit.Reactive/Clients/IObservableIssuesClient.cs b/Octokit.Reactive/Clients/IObservableIssuesClient.cs
index 10032884..008d9955 100644
--- a/Octokit.Reactive/Clients/IObservableIssuesClient.cs
+++ b/Octokit.Reactive/Clients/IObservableIssuesClient.cs
@@ -119,7 +119,7 @@ namespace Octokit.Reactive
/// The owner of the repository
/// The name of the repository
///
- IObservable GetForRepository(string owner, string name);
+ IObservable GetAllForRepository(string owner, string name);
///
/// Gets issues for a repository.
@@ -131,7 +131,7 @@ namespace Octokit.Reactive
/// The name of the repository
/// Used to filter and sort the list of issues returned
///
- IObservable GetForRepository(string owner, string name, RepositoryIssueRequest request);
+ IObservable GetAllForRepository(string owner, string name, RepositoryIssueRequest request);
///
/// Creates an issue for the specified repository. Any user with pull access to a repository can create an
diff --git a/Octokit.Reactive/Clients/IObservableIssuesEventsClient.cs b/Octokit.Reactive/Clients/IObservableIssuesEventsClient.cs
index 7dc0b2b6..2e40960b 100644
--- a/Octokit.Reactive/Clients/IObservableIssuesEventsClient.cs
+++ b/Octokit.Reactive/Clients/IObservableIssuesEventsClient.cs
@@ -15,7 +15,7 @@ namespace Octokit.Reactive
/// The name of the repository
/// The issue number
///
- IObservable GetForIssue(string owner, string name, int number);
+ IObservable GetAllForIssue(string owner, string name, int number);
///
/// Gets all events for the repository.
@@ -26,7 +26,7 @@ namespace Octokit.Reactive
/// The owner of the repository
/// The name of the repository
///
- IObservable GetForRepository(string owner, string name);
+ IObservable GetAllForRepository(string owner, string name);
///
/// Gets a single event
diff --git a/Octokit.Reactive/Clients/IObservableIssuesLabelsClient.cs b/Octokit.Reactive/Clients/IObservableIssuesLabelsClient.cs
index 97afc96c..ec84de51 100644
--- a/Octokit.Reactive/Clients/IObservableIssuesLabelsClient.cs
+++ b/Octokit.Reactive/Clients/IObservableIssuesLabelsClient.cs
@@ -16,7 +16,7 @@ namespace Octokit.Reactive
/// The name of the repository
/// The number of the issue
/// The list of labels
- IObservable GetForIssue(string owner, string repo, int number);
+ IObservable GetAllForIssue(string owner, string repo, int number);
///
/// Gets all labels for the repository.
@@ -27,7 +27,7 @@ namespace Octokit.Reactive
/// The owner of the repository
/// The name of the repository
/// The list of labels
- IObservable GetForRepository(string owner, string repo);
+ IObservable GetAllForRepository(string owner, string repo);
///
/// Gets a single Label by name.
@@ -141,6 +141,6 @@ namespace Octokit.Reactive
/// The name of the repository
/// The number of the milestone
///
- IObservable GetForMilestone(string owner, string repo, int number);
+ IObservable GetAllForMilestone(string owner, string repo, int number);
}
}
diff --git a/Octokit.Reactive/Clients/IObservableMilestonesClient.cs b/Octokit.Reactive/Clients/IObservableMilestonesClient.cs
index c21ef819..db2ecad3 100644
--- a/Octokit.Reactive/Clients/IObservableMilestonesClient.cs
+++ b/Octokit.Reactive/Clients/IObservableMilestonesClient.cs
@@ -26,7 +26,7 @@ namespace Octokit.Reactive
/// The owner of the repository
/// The name of the repository
///
- IObservable GetForRepository(string owner, string name);
+ IObservable GetAllForRepository(string owner, string name);
///
/// Gets all open milestones for the repository.
@@ -38,7 +38,7 @@ namespace Octokit.Reactive
/// The name of the repository
/// Used to filter and sort the list of Milestones returned
///
- IObservable GetForRepository(string owner, string name, MilestoneRequest request);
+ IObservable GetAllForRepository(string owner, string name, MilestoneRequest request);
///
/// Creates a milestone for the specified repository. Any user with pull access to a repository can create a
diff --git a/Octokit.Reactive/Clients/IObservableMiscellaneousClient.cs b/Octokit.Reactive/Clients/IObservableMiscellaneousClient.cs
index 74a148f8..3116b409 100644
--- a/Octokit.Reactive/Clients/IObservableMiscellaneousClient.cs
+++ b/Octokit.Reactive/Clients/IObservableMiscellaneousClient.cs
@@ -12,7 +12,7 @@ namespace Octokit.Reactive
/// An of emoji and their URI.
[SuppressMessage("Microsoft.Design", "CA1024:UsePropertiesWhereAppropriate",
Justification = "Makes a network request")]
- IObservable GetEmojis();
+ IObservable GetAllEmojis();
///
/// Gets the rendered Markdown for the specified plain-text Markdown document.
@@ -27,7 +27,7 @@ namespace Octokit.Reactive
///
/// An observable list of gitignore template names.
[SuppressMessage("Microsoft.Design", "CA1024:UsePropertiesWhereAppropriate")]
- IObservable GetGitIgnoreTemplates();
+ IObservable GetAllGitIgnoreTemplates();
///
/// Retrieves the source for a single GitIgnore template
@@ -42,7 +42,7 @@ namespace Octokit.Reactive
/// This is a PREVIEW API! Use it at your own risk.
/// A list of licenses available on the site
[SuppressMessage("Microsoft.Design", "CA1024:UsePropertiesWhereAppropriate")]
- IObservable GetLicenses();
+ IObservable GetAllLicenses();
///
/// Retrieves a license based on the licence key such as "mit"
diff --git a/Octokit.Reactive/Clients/IObservableOrganizationMembersClient.cs b/Octokit.Reactive/Clients/IObservableOrganizationMembersClient.cs
index 995b1cca..d2e6d9ca 100644
--- a/Octokit.Reactive/Clients/IObservableOrganizationMembersClient.cs
+++ b/Octokit.Reactive/Clients/IObservableOrganizationMembersClient.cs
@@ -65,7 +65,7 @@ namespace Octokit.Reactive
/// http://developer.github.com/v3/orgs/members/#public-members-list
/// The login for the organization
///
- IObservable GetPublic(string org);
+ IObservable GetAllPublic(string org);
///
/// Check if a user is, publicly or privately, a member of the organization.
diff --git a/Octokit.Reactive/Clients/IObservablePullRequestReviewCommentsClient.cs b/Octokit.Reactive/Clients/IObservablePullRequestReviewCommentsClient.cs
index f6c8e946..a4868c70 100644
--- a/Octokit.Reactive/Clients/IObservablePullRequestReviewCommentsClient.cs
+++ b/Octokit.Reactive/Clients/IObservablePullRequestReviewCommentsClient.cs
@@ -22,7 +22,7 @@ namespace Octokit.Reactive
/// The owner of the repository
/// The name of the repository
/// The list of s for the specified repository
- IObservable GetForRepository(string owner, string name);
+ IObservable GetAllForRepository(string owner, string name);
///
/// Gets a list of the pull request review comments in a specified repository.
@@ -32,7 +32,7 @@ namespace Octokit.Reactive
/// The name of the repository
/// The sorting parameters
/// The list of s for the specified repository
- IObservable GetForRepository(string owner, string name, PullRequestReviewCommentRequest request);
+ IObservable GetAllForRepository(string owner, string name, PullRequestReviewCommentRequest request);
///
/// Gets a single pull request review comment by number.
diff --git a/Octokit.Reactive/Clients/IObservablePullRequestsClient.cs b/Octokit.Reactive/Clients/IObservablePullRequestsClient.cs
index 1ada7bec..2369ce0f 100644
--- a/Octokit.Reactive/Clients/IObservablePullRequestsClient.cs
+++ b/Octokit.Reactive/Clients/IObservablePullRequestsClient.cs
@@ -30,7 +30,7 @@ namespace Octokit.Reactive
/// The owner of the repository
/// The name of the repository
/// A collection of results
- IObservable GetForRepository(string owner, string name);
+ IObservable GetAllForRepository(string owner, string name);
///
/// Query pull requests for the repository based on criteria
@@ -42,7 +42,7 @@ namespace Octokit.Reactive
/// The name of the repository
/// Used to filter and sort the list of pull requests returned
/// A collection of results
- IObservable GetForRepository(string owner, string name, PullRequestRequest request);
+ IObservable GetAllForRepository(string owner, string name, PullRequestRequest request);
///
/// Creates a pull request for the specified repository.
diff --git a/Octokit.Reactive/Clients/IObservableReleasesClient.cs b/Octokit.Reactive/Clients/IObservableReleasesClient.cs
index 82fd46f5..446fc575 100644
--- a/Octokit.Reactive/Clients/IObservableReleasesClient.cs
+++ b/Octokit.Reactive/Clients/IObservableReleasesClient.cs
@@ -83,7 +83,7 @@ namespace Octokit.Reactive
/// The id of the .
/// Thrown when a general API error occurs.
/// The list of for the specified release of the specified repository.
- IObservable GetAssets(string owner, string name, int id);
+ IObservable GetAllAssets(string owner, string name, int id);
///
/// Uploads a for the specified release.
diff --git a/Octokit.Reactive/Clients/IObservableRepositoriesClient.cs b/Octokit.Reactive/Clients/IObservableRepositoriesClient.cs
index cb07ddfa..0a81231f 100644
--- a/Octokit.Reactive/Clients/IObservableRepositoriesClient.cs
+++ b/Octokit.Reactive/Clients/IObservableRepositoriesClient.cs
@@ -49,7 +49,19 @@ namespace Octokit.Reactive
[SuppressMessage("Microsoft.Design", "CA1024:UsePropertiesWhereAppropriate",
Justification = "Makes a network request")]
IObservable GetAllPublic();
-
+
+ ///
+ /// Retrieves every public since the last repository seen.
+ ///
+ ///
+ /// The default page size on GitHub.com is 30.
+ ///
+ /// Search parameters of the last repository seen
+ /// A of .
+ [SuppressMessage("Microsoft.Design", "CA1024:UsePropertiesWhereAppropriate",
+ Justification = "Makes a network request")]
+ IObservable GetAllPublic(PublicRepositoryRequest request);
+
///
/// Retrieves every that belongs to the current user.
///
diff --git a/Octokit.Reactive/Clients/IObservableRepositoryCommentsClient.cs b/Octokit.Reactive/Clients/IObservableRepositoryCommentsClient.cs
index 66a93d41..55c5af2a 100644
--- a/Octokit.Reactive/Clients/IObservableRepositoryCommentsClient.cs
+++ b/Octokit.Reactive/Clients/IObservableRepositoryCommentsClient.cs
@@ -25,7 +25,7 @@ namespace Octokit.Reactive
/// The owner of the repository
/// The name of the repository
///
- IObservable GetForRepository(string owner, string name);
+ IObservable GetAllForRepository(string owner, string name);
///
/// Gets Commit Comments for a specified Commit.
@@ -35,7 +35,7 @@ namespace Octokit.Reactive
/// The name of the repository
/// The sha of the commit
///
- IObservable GetForCommit(string owner, string name, string sha);
+ IObservable GetAllForCommit(string owner, string name, string sha);
///
/// Creates a new Commit Comment for a specified Commit.
diff --git a/Octokit.Reactive/Clients/IObservableRepositoryContentsClient.cs b/Octokit.Reactive/Clients/IObservableRepositoryContentsClient.cs
index cd0696eb..bfe4cb3e 100644
--- a/Octokit.Reactive/Clients/IObservableRepositoryContentsClient.cs
+++ b/Octokit.Reactive/Clients/IObservableRepositoryContentsClient.cs
@@ -36,7 +36,7 @@ namespace Octokit.Reactive
///
/// A collection of representing the content at the specified path
///
- IObservable GetContents(string owner, string name, string path);
+ IObservable GetAllContents(string owner, string name, string path);
///
/// Creates a commit that creates a new file in a repository.
diff --git a/Octokit.Reactive/Clients/IObservableTeamsClient.cs b/Octokit.Reactive/Clients/IObservableTeamsClient.cs
index a9c083f4..1d17e581 100644
--- a/Octokit.Reactive/Clients/IObservableTeamsClient.cs
+++ b/Octokit.Reactive/Clients/IObservableTeamsClient.cs
@@ -40,7 +40,7 @@ namespace Octokit.Reactive
///
/// Thrown when a general API error occurs.
/// A list of the team's member s.
- IObservable GetMembers(int id);
+ IObservable GetAllMembers(int id);
///
/// Returns newly created for the current org.
@@ -77,7 +77,7 @@ namespace Octokit.Reactive
///
/// Thrown when a general API error occurs.
/// The team's repositories
- IObservable GetRepositories(int id);
+ IObservable GetAllRepositories(int id);
///
/// Add a member to the team
diff --git a/Octokit.Reactive/Clients/ObservableAssigneesClient.cs b/Octokit.Reactive/Clients/ObservableAssigneesClient.cs
index 725d3383..65813404 100644
--- a/Octokit.Reactive/Clients/ObservableAssigneesClient.cs
+++ b/Octokit.Reactive/Clients/ObservableAssigneesClient.cs
@@ -24,7 +24,7 @@ namespace Octokit.Reactive
/// The owner of the repository
/// The name of the repository
///
- public IObservable GetForRepository(string owner, string name)
+ public IObservable GetAllForRepository(string owner, string name)
{
Ensure.ArgumentNotNullOrEmptyString(owner, "owner");
Ensure.ArgumentNotNullOrEmptyString(name, "name");
diff --git a/Octokit.Reactive/Clients/ObservableEventsClient.cs b/Octokit.Reactive/Clients/ObservableEventsClient.cs
index ccfb6ebb..ad871c29 100644
--- a/Octokit.Reactive/Clients/ObservableEventsClient.cs
+++ b/Octokit.Reactive/Clients/ObservableEventsClient.cs
@@ -83,7 +83,7 @@ namespace Octokit.Reactive
///
/// The login of the user
/// All the s that a particular user has received.
- public IObservable GetUserReceived(string user)
+ public IObservable GetAllUserReceived(string user)
{
Ensure.ArgumentNotNullOrEmptyString(user, "user");
@@ -98,7 +98,7 @@ namespace Octokit.Reactive
///
/// The login of the user
/// All the s that a particular user has received.
- public IObservable GetUserReceivedPublic(string user)
+ public IObservable GetAllUserReceivedPublic(string user)
{
Ensure.ArgumentNotNullOrEmptyString(user, "user");
@@ -113,7 +113,7 @@ namespace Octokit.Reactive
///
/// The login of the user
/// All the s that a particular user has performed.
- public IObservable GetUserPerformed(string user)
+ public IObservable GetAllUserPerformed(string user)
{
Ensure.ArgumentNotNullOrEmptyString(user, "user");
@@ -128,7 +128,7 @@ namespace Octokit.Reactive
///
/// The login of the user
/// All the public s that a particular user has performed.
- public IObservable GetUserPerformedPublic(string user)
+ public IObservable GetAllUserPerformedPublic(string user)
{
Ensure.ArgumentNotNullOrEmptyString(user, "user");
@@ -144,7 +144,7 @@ namespace Octokit.Reactive
/// The login of the user
/// The name of the organization
/// All the public s that are associated with an organization.
- public IObservable GetForAnOrganization(string user, string organization)
+ public IObservable GetAllForAnOrganization(string user, string organization)
{
Ensure.ArgumentNotNullOrEmptyString(user, "user");
Ensure.ArgumentNotNullOrEmptyString(organization, "organization");
diff --git a/Octokit.Reactive/Clients/ObservableGistCommentsClient.cs b/Octokit.Reactive/Clients/ObservableGistCommentsClient.cs
index 93a5df44..7dc639bf 100644
--- a/Octokit.Reactive/Clients/ObservableGistCommentsClient.cs
+++ b/Octokit.Reactive/Clients/ObservableGistCommentsClient.cs
@@ -36,7 +36,7 @@ namespace Octokit.Reactive
/// http://developer.github.com/v3/gists/comments/#list-comments-on-a-gist
/// The id of the gist
/// IObservable{GistComment}.
- public IObservable GetForGist(string gistId)
+ public IObservable GetAllForGist(string gistId)
{
return _connection.GetAndFlattenAllPages(ApiUrls.GistComments(gistId));
}
diff --git a/Octokit.Reactive/Clients/ObservableIssueCommentsClient.cs b/Octokit.Reactive/Clients/ObservableIssueCommentsClient.cs
index e9b82759..72709b44 100644
--- a/Octokit.Reactive/Clients/ObservableIssueCommentsClient.cs
+++ b/Octokit.Reactive/Clients/ObservableIssueCommentsClient.cs
@@ -41,7 +41,7 @@ namespace Octokit.Reactive
/// The owner of the repository
/// The name of the repository
/// The list of s for the specified Repository.
- public IObservable GetForRepository(string owner, string name)
+ public IObservable GetAllForRepository(string owner, string name)
{
Ensure.ArgumentNotNullOrEmptyString(owner, "owner");
Ensure.ArgumentNotNullOrEmptyString(name, "name");
@@ -57,7 +57,7 @@ namespace Octokit.Reactive
/// The name of the repository
/// The issue number
/// The list of s for the specified Issue.
- public IObservable GetForIssue(string owner, string name, int number)
+ public IObservable GetAllForIssue(string owner, string name, int number)
{
Ensure.ArgumentNotNullOrEmptyString(owner, "owner");
Ensure.ArgumentNotNullOrEmptyString(name, "name");
diff --git a/Octokit.Reactive/Clients/ObservableIssuesClient.cs b/Octokit.Reactive/Clients/ObservableIssuesClient.cs
index 21f0c9f5..45716963 100644
--- a/Octokit.Reactive/Clients/ObservableIssuesClient.cs
+++ b/Octokit.Reactive/Clients/ObservableIssuesClient.cs
@@ -161,9 +161,9 @@ namespace Octokit.Reactive
/// The owner of the repository
/// The name of the repository
///
- public IObservable GetForRepository(string owner, string name)
+ public IObservable GetAllForRepository(string owner, string name)
{
- return GetForRepository(owner, name, new RepositoryIssueRequest());
+ return GetAllForRepository(owner, name, new RepositoryIssueRequest());
}
///
@@ -176,7 +176,7 @@ namespace Octokit.Reactive
/// The name of the repository
/// Used to filter and sort the list of issues returned
///
- public IObservable GetForRepository(string owner, string name, RepositoryIssueRequest request)
+ public IObservable GetAllForRepository(string owner, string name, RepositoryIssueRequest request)
{
Ensure.ArgumentNotNullOrEmptyString(owner, "owner");
Ensure.ArgumentNotNullOrEmptyString(name, "name");
diff --git a/Octokit.Reactive/Clients/ObservableIssuesEventsClient.cs b/Octokit.Reactive/Clients/ObservableIssuesEventsClient.cs
index 67ff9184..7ca3d628 100644
--- a/Octokit.Reactive/Clients/ObservableIssuesEventsClient.cs
+++ b/Octokit.Reactive/Clients/ObservableIssuesEventsClient.cs
@@ -27,7 +27,7 @@ namespace Octokit.Reactive
/// The name of the repository
/// The issue number
///
- public IObservable GetForIssue(string owner, string name, int number)
+ public IObservable GetAllForIssue(string owner, string name, int number)
{
return _connection.GetAndFlattenAllPages(ApiUrls.IssuesEvents(owner, name, number));
}
@@ -41,7 +41,7 @@ namespace Octokit.Reactive
/// The owner of the repository
/// The name of the repository
///
- public IObservable GetForRepository(string owner, string name)
+ public IObservable GetAllForRepository(string owner, string name)
{
return _connection.GetAndFlattenAllPages(ApiUrls.IssuesEvents(owner, name));
}
diff --git a/Octokit.Reactive/Clients/ObservableIssuesLabelsClient.cs b/Octokit.Reactive/Clients/ObservableIssuesLabelsClient.cs
index 093a69d8..cf6bb5c7 100644
--- a/Octokit.Reactive/Clients/ObservableIssuesLabelsClient.cs
+++ b/Octokit.Reactive/Clients/ObservableIssuesLabelsClient.cs
@@ -29,7 +29,7 @@ namespace Octokit.Reactive
/// The name of the repository
/// The number of the issue
/// The list of labels
- public IObservable GetForIssue(string owner, string repo, int number)
+ public IObservable GetAllForIssue(string owner, string repo, int number)
{
return _connection.GetAndFlattenAllPages(ApiUrls.IssueLabels(owner, repo, number));
}
@@ -43,7 +43,7 @@ namespace Octokit.Reactive
/// The owner of the repository
/// The name of the repository
/// The list of labels
- public IObservable GetForRepository(string owner, string repo)
+ public IObservable GetAllForRepository(string owner, string repo)
{
return _connection.GetAndFlattenAllPages(ApiUrls.Labels(owner, repo));
}
@@ -187,7 +187,7 @@ namespace Octokit.Reactive
/// The name of the repository
/// The number of the milestone
///
- public IObservable GetForMilestone(string owner, string repo, int number)
+ public IObservable GetAllForMilestone(string owner, string repo, int number)
{
return _connection.GetAndFlattenAllPages(ApiUrls.MilestoneLabels(owner, repo, number));
}
diff --git a/Octokit.Reactive/Clients/ObservableMilestonesClient.cs b/Octokit.Reactive/Clients/ObservableMilestonesClient.cs
index 6a955c56..2364c561 100644
--- a/Octokit.Reactive/Clients/ObservableMilestonesClient.cs
+++ b/Octokit.Reactive/Clients/ObservableMilestonesClient.cs
@@ -42,7 +42,7 @@ namespace Octokit.Reactive
/// The owner of the repository
/// The name of the repository
///
- public IObservable GetForRepository(string owner, string name)
+ public IObservable GetAllForRepository(string owner, string name)
{
return _connection.GetAndFlattenAllPages(ApiUrls.Milestones(owner, name));
}
@@ -57,7 +57,7 @@ namespace Octokit.Reactive
/// The name of the repository
/// Used to filter and sort the list of Milestones returned
///
- public IObservable GetForRepository(string owner, string name, MilestoneRequest request)
+ public IObservable GetAllForRepository(string owner, string name, MilestoneRequest request)
{
Ensure.ArgumentNotNullOrEmptyString(owner, "owner");
Ensure.ArgumentNotNullOrEmptyString(name, "name");
diff --git a/Octokit.Reactive/Clients/ObservableMiscellaneousClient.cs b/Octokit.Reactive/Clients/ObservableMiscellaneousClient.cs
index e204bc54..befd0de3 100644
--- a/Octokit.Reactive/Clients/ObservableMiscellaneousClient.cs
+++ b/Octokit.Reactive/Clients/ObservableMiscellaneousClient.cs
@@ -20,9 +20,9 @@ namespace Octokit.Reactive
///
/// Thrown when a general API error occurs.
/// An of emoji and their URI.
- public IObservable GetEmojis()
+ public IObservable GetAllEmojis()
{
- return _client.GetEmojis().ToObservable().SelectMany(e => e);
+ return _client.GetAllEmojis().ToObservable().SelectMany(e => e);
}
///
@@ -40,9 +40,9 @@ namespace Octokit.Reactive
/// List all templates available to pass as an option when creating a repository.
///
/// An observable list of gitignore template names.
- public IObservable GetGitIgnoreTemplates()
+ public IObservable GetAllGitIgnoreTemplates()
{
- return _client.GetGitIgnoreTemplates().ToObservable().SelectMany(t => t);
+ return _client.GetAllGitIgnoreTemplates().ToObservable().SelectMany(t => t);
}
///
@@ -60,9 +60,9 @@ namespace Octokit.Reactive
///
/// This is a PREVIEW API! Use it at your own risk.
/// A list of licenses available on the site
- public IObservable GetLicenses()
+ public IObservable GetAllLicenses()
{
- return _client.GetLicenses().ToObservable().SelectMany(l => l);
+ return _client.GetAllLicenses().ToObservable().SelectMany(l => l);
}
///
diff --git a/Octokit.Reactive/Clients/ObservableOrganizationMembersClient.cs b/Octokit.Reactive/Clients/ObservableOrganizationMembersClient.cs
index 982d59fa..d8c447cc 100644
--- a/Octokit.Reactive/Clients/ObservableOrganizationMembersClient.cs
+++ b/Octokit.Reactive/Clients/ObservableOrganizationMembersClient.cs
@@ -98,7 +98,7 @@ namespace Octokit.Reactive
/// http://developer.github.com/v3/orgs/members/#public-members-list
/// The login for the organization
///
- public IObservable GetPublic(string org)
+ public IObservable GetAllPublic(string org)
{
Ensure.ArgumentNotNullOrEmptyString(org, "org");
diff --git a/Octokit.Reactive/Clients/ObservablePullRequestReviewCommentsClient.cs b/Octokit.Reactive/Clients/ObservablePullRequestReviewCommentsClient.cs
index 4d4084ea..3fd32795 100644
--- a/Octokit.Reactive/Clients/ObservablePullRequestReviewCommentsClient.cs
+++ b/Octokit.Reactive/Clients/ObservablePullRequestReviewCommentsClient.cs
@@ -41,9 +41,9 @@ namespace Octokit.Reactive
/// The owner of the repository
/// The name of the repository
/// The list of s for the specified repository
- public IObservable GetForRepository(string owner, string name)
+ public IObservable GetAllForRepository(string owner, string name)
{
- return GetForRepository(owner, name, new PullRequestReviewCommentRequest());
+ return GetAllForRepository(owner, name, new PullRequestReviewCommentRequest());
}
///
@@ -54,7 +54,7 @@ namespace Octokit.Reactive
/// The name of the repository
/// The sorting parameters
/// The list of s for the specified repository
- public IObservable GetForRepository(string owner, string name, PullRequestReviewCommentRequest request)
+ public IObservable GetAllForRepository(string owner, string name, PullRequestReviewCommentRequest request)
{
Ensure.ArgumentNotNullOrEmptyString(owner, "owner");
Ensure.ArgumentNotNullOrEmptyString(name, "name");
diff --git a/Octokit.Reactive/Clients/ObservablePullRequestsClient.cs b/Octokit.Reactive/Clients/ObservablePullRequestsClient.cs
index ef57fdd3..a4f1a344 100644
--- a/Octokit.Reactive/Clients/ObservablePullRequestsClient.cs
+++ b/Octokit.Reactive/Clients/ObservablePullRequestsClient.cs
@@ -47,7 +47,7 @@ namespace Octokit.Reactive
/// The owner of the repository
/// The name of the repository
/// A collection of results
- public IObservable GetForRepository(string owner, string name)
+ public IObservable GetAllForRepository(string owner, string name)
{
return _connection.GetAndFlattenAllPages(ApiUrls.PullRequests(owner, name));
}
@@ -62,7 +62,7 @@ namespace Octokit.Reactive
/// The name of the repository
/// Used to filter and sort the list of pull requests returned
/// A collection of results
- public IObservable GetForRepository(string owner, string name, PullRequestRequest request)
+ public IObservable GetAllForRepository(string owner, string name, PullRequestRequest request)
{
Ensure.ArgumentNotNullOrEmptyString(owner, "owner");
Ensure.ArgumentNotNullOrEmptyString(name, "name");
diff --git a/Octokit.Reactive/Clients/ObservableReleasesClient.cs b/Octokit.Reactive/Clients/ObservableReleasesClient.cs
index d1809999..67e40ac0 100644
--- a/Octokit.Reactive/Clients/ObservableReleasesClient.cs
+++ b/Octokit.Reactive/Clients/ObservableReleasesClient.cs
@@ -126,7 +126,7 @@ namespace Octokit.Reactive
/// The id of the .
/// Thrown when a general API error occurs.
/// The list of for the specified release of the specified repository.
- public IObservable GetAssets(string owner, string name, int id)
+ public IObservable GetAllAssets(string owner, string name, int id)
{
Ensure.ArgumentNotNullOrEmptyString(owner, "owner");
Ensure.ArgumentNotNullOrEmptyString(name, "name");
diff --git a/Octokit.Reactive/Clients/ObservableRepositoriesClient.cs b/Octokit.Reactive/Clients/ObservableRepositoriesClient.cs
index 887ccc42..ecc3c7b0 100644
--- a/Octokit.Reactive/Clients/ObservableRepositoriesClient.cs
+++ b/Octokit.Reactive/Clients/ObservableRepositoriesClient.cs
@@ -104,6 +104,21 @@ namespace Octokit.Reactive
return _connection.GetAndFlattenAllPages(ApiUrls.AllPublicRepositories());
}
+ ///
+ /// Retrieves every public since the last repository seen.
+ ///
+ ///
+ /// The default page size on GitHub.com is 30.
+ ///
+ /// Search parameters of the last repository seen
+ /// A of .
+ public IObservable GetAllPublic(PublicRepositoryRequest request)
+ {
+ Ensure.ArgumentNotNull(request, "request");
+
+ return _connection.GetAndFlattenAllPages(ApiUrls.AllPublicRepositories(), request.ToParametersDictionary());
+ }
+
///
/// Retrieves every that belongs to the current user.
///
diff --git a/Octokit.Reactive/Clients/ObservableRepositoryCommentsClient.cs b/Octokit.Reactive/Clients/ObservableRepositoryCommentsClient.cs
index 8bb70a89..a4c3c129 100644
--- a/Octokit.Reactive/Clients/ObservableRepositoryCommentsClient.cs
+++ b/Octokit.Reactive/Clients/ObservableRepositoryCommentsClient.cs
@@ -41,7 +41,7 @@ namespace Octokit.Reactive
/// The owner of the repository
/// The name of the repository
///
- public IObservable GetForRepository(string owner, string name)
+ public IObservable GetAllForRepository(string owner, string name)
{
Ensure.ArgumentNotNullOrEmptyString(owner, "owner");
Ensure.ArgumentNotNullOrEmptyString(name, "name");
@@ -57,7 +57,7 @@ namespace Octokit.Reactive
/// The name of the repository
/// The sha of the commit
///
- public IObservable GetForCommit(string owner, string name, string sha)
+ public IObservable GetAllForCommit(string owner, string name, string sha)
{
Ensure.ArgumentNotNullOrEmptyString(owner, "owner");
Ensure.ArgumentNotNullOrEmptyString(name, "name");
diff --git a/Octokit.Reactive/Clients/ObservableRepositoryContentsClient.cs b/Octokit.Reactive/Clients/ObservableRepositoryContentsClient.cs
index e13e5f04..0a45ca68 100644
--- a/Octokit.Reactive/Clients/ObservableRepositoryContentsClient.cs
+++ b/Octokit.Reactive/Clients/ObservableRepositoryContentsClient.cs
@@ -61,7 +61,7 @@ namespace Octokit.Reactive
///
/// A collection of representing the content at the specified path
///
- public IObservable GetContents(string owner, string name, string path)
+ public IObservable GetAllContents(string owner, string name, string path)
{
Ensure.ArgumentNotNullOrEmptyString(owner, "owner");
Ensure.ArgumentNotNullOrEmptyString(name, "name");
diff --git a/Octokit.Reactive/Clients/ObservableTeamsClient.cs b/Octokit.Reactive/Clients/ObservableTeamsClient.cs
index b6648fac..9315944a 100644
--- a/Octokit.Reactive/Clients/ObservableTeamsClient.cs
+++ b/Octokit.Reactive/Clients/ObservableTeamsClient.cs
@@ -60,7 +60,7 @@ namespace Octokit.Reactive
///
/// Thrown when a general API error occurs.
/// A list of the team's member s.
- public IObservable GetMembers(int id)
+ public IObservable GetAllMembers(int id)
{
return _connection.GetAndFlattenAllPages(ApiUrls.TeamMembers(id));
}
@@ -112,7 +112,7 @@ namespace Octokit.Reactive
///
/// Thrown when a general API error occurs.
/// The team's repositories
- public IObservable GetRepositories(int id)
+ public IObservable GetAllRepositories(int id)
{
return _connection.GetAndFlattenAllPages(ApiUrls.TeamRepositories(id));
}
diff --git a/Octokit.Tests.Conventions/Exception/PaginationGetAllMethodNameMismatchException.cs b/Octokit.Tests.Conventions/Exception/PaginationGetAllMethodNameMismatchException.cs
new file mode 100644
index 00000000..8c20067e
--- /dev/null
+++ b/Octokit.Tests.Conventions/Exception/PaginationGetAllMethodNameMismatchException.cs
@@ -0,0 +1,24 @@
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Reflection;
+using System.Text;
+using System.Threading.Tasks;
+
+namespace Octokit.Tests.Conventions
+{
+ public class PaginationGetAllMethodNameMismatchException : Exception
+ {
+ public PaginationGetAllMethodNameMismatchException(Type type, IEnumerable methods)
+ : base(CreateMessage(type, methods)) { }
+
+ static string CreateMessage(Type type, IEnumerable methods)
+ {
+ var methodsFormatted = String.Join("\r\n", methods.Select(m => String.Format(" - {0}", m)));
+ return "Methods found on type {0} should follow the 'GetAll*' naming convention:\r\n{1}"
+ .FormatWithNewLine(
+ type.Name,
+ methodsFormatted);
+ }
+ }
+}
diff --git a/Octokit.Tests.Conventions/ModelTests.cs b/Octokit.Tests.Conventions/ModelTests.cs
index 19e54cc5..df87d961 100644
--- a/Octokit.Tests.Conventions/ModelTests.cs
+++ b/Octokit.Tests.Conventions/ModelTests.cs
@@ -59,6 +59,31 @@ namespace Octokit.Tests.Conventions
}
}
+ //TODO: This should (probably) be moved to the PaginationTests class that is being introduced in PR #760
+ [Theory]
+ [MemberData("GetClientInterfaces")]
+ public void CheckPaginationGetAllMethodNames(Type clientInterface)
+ {
+ var methodsOrdered = clientInterface.GetMethodsOrdered();
+
+ var methodsThatCanPaginate = methodsOrdered
+ .Where(x => x.ReturnType.GetTypeInfo().TypeCategory == TypeCategory.ReadOnlyList)
+ .Where(x => x.Name.StartsWith("Get"));
+
+ var invalidMethods = methodsThatCanPaginate
+ .Where(x => !x.Name.StartsWith("GetAll"));
+
+ if (invalidMethods.Any())
+ {
+ throw new PaginationGetAllMethodNameMismatchException(clientInterface, invalidMethods);
+ }
+ }
+
+ public static IEnumerable GetClientInterfaces()
+ {
+ return typeof(IEventsClient).Assembly.ExportedTypes.Where(TypeExtensions.IsClientInterface).Select(type => new[] { type });
+ }
+
public static IEnumerable ModelTypes
{
get { return GetModelTypes(includeRequestModels: true).Select(type => new[] { type }); }
diff --git a/Octokit.Tests.Conventions/Octokit.Tests.Conventions.csproj b/Octokit.Tests.Conventions/Octokit.Tests.Conventions.csproj
index 0f4f7244..d7ec4332 100644
--- a/Octokit.Tests.Conventions/Octokit.Tests.Conventions.csproj
+++ b/Octokit.Tests.Conventions/Octokit.Tests.Conventions.csproj
@@ -57,6 +57,7 @@
+
diff --git a/Octokit.Tests.Integration/Clients/AssigneesClientTests.cs b/Octokit.Tests.Integration/Clients/AssigneesClientTests.cs
index 9ba34cd2..e902b525 100644
--- a/Octokit.Tests.Integration/Clients/AssigneesClientTests.cs
+++ b/Octokit.Tests.Integration/Clients/AssigneesClientTests.cs
@@ -36,7 +36,7 @@ public class AssigneesClientTests
public async Task CanListAssignees()
{
// Repository owner is always an assignee
- var assignees = await _gitHubClient.Issue.Assignee.GetForRepository(_owner, _repository.Name);
+ var assignees = await _gitHubClient.Issue.Assignee.GetAllForRepository(_owner, _repository.Name);
Assert.True(assignees.Any(u => u.Login == Helper.UserName));
}
diff --git a/Octokit.Tests.Integration/Clients/EventsClientTests.cs b/Octokit.Tests.Integration/Clients/EventsClientTests.cs
index f1d57979..666d4104 100644
--- a/Octokit.Tests.Integration/Clients/EventsClientTests.cs
+++ b/Octokit.Tests.Integration/Clients/EventsClientTests.cs
@@ -14,7 +14,7 @@ namespace Octokit.Tests.Integration.Clients
public async Task ReturnsACollection()
{
var github = Helper.GetAuthenticatedClient();
- var events = await github.Activity.Events.GetUserPerformed("shiftkey");
+ var events = await github.Activity.Events.GetAllUserPerformed("shiftkey");
Assert.NotEmpty(events);
}
}
@@ -25,7 +25,7 @@ namespace Octokit.Tests.Integration.Clients
public EventPayloads()
{
var github = Helper.GetAuthenticatedClient();
- _events = github.Activity.Events.GetUserPerformed("shiftkey").Result;
+ _events = github.Activity.Events.GetAllUserPerformed("shiftkey").Result;
}
[IntegrationTest]
diff --git a/Octokit.Tests.Integration/Clients/IssuesClientTests.cs b/Octokit.Tests.Integration/Clients/IssuesClientTests.cs
index 70658f70..292d5d11 100644
--- a/Octokit.Tests.Integration/Clients/IssuesClientTests.cs
+++ b/Octokit.Tests.Integration/Clients/IssuesClientTests.cs
@@ -34,7 +34,7 @@ public class IssuesClientTests : IDisposable
Assert.NotNull(issue);
var retrieved = await _issuesClient.Get(owner, _repository.Name, issue.Number);
- var all = await _issuesClient.GetForRepository(owner, _repository.Name);
+ var all = await _issuesClient.GetAllForRepository(owner, _repository.Name);
Assert.NotNull(retrieved);
Assert.True(all.Any(i => i.Number == retrieved.Number));
}
@@ -64,7 +64,7 @@ public class IssuesClientTests : IDisposable
await _issuesClient.Update(owner, _repository.Name, closed.Number,
new IssueUpdate { State = ItemState.Closed });
- var issues = await _issuesClient.GetForRepository(owner, _repository.Name);
+ var issues = await _issuesClient.GetAllForRepository(owner, _repository.Name);
Assert.Equal(3, issues.Count);
Assert.Equal("A test issue3", issues[0].Title);
@@ -90,7 +90,7 @@ public class IssuesClientTests : IDisposable
await _issuesClient.Update(owner, _repository.Name, closed.Number,
new IssueUpdate { State = ItemState.Closed });
- var issues = await _issuesClient.GetForRepository(owner, _repository.Name,
+ var issues = await _issuesClient.GetAllForRepository(owner, _repository.Name,
new RepositoryIssueRequest {SortDirection = SortDirection.Ascending});
Assert.Equal(3, issues.Count);
@@ -112,7 +112,7 @@ public class IssuesClientTests : IDisposable
await _issuesClient.Update(owner, _repository.Name, closed.Number,
new IssueUpdate { State = ItemState.Closed });
- var issues = await _issuesClient.GetForRepository(owner, _repository.Name,
+ var issues = await _issuesClient.GetAllForRepository(owner, _repository.Name,
new RepositoryIssueRequest { State = ItemState.Closed });
Assert.Equal(1, issues.Count);
@@ -129,7 +129,7 @@ public class IssuesClientTests : IDisposable
await _issuesClient.Create(owner, _repository.Name, newIssue1);
await _issuesClient.Create(owner, _repository.Name, newIssue2);
- var issues = await _issuesClient.GetForRepository(owner, _repository.Name,
+ var issues = await _issuesClient.GetAllForRepository(owner, _repository.Name,
new RepositoryIssueRequest { Milestone = milestone.Number.ToString(CultureInfo.InvariantCulture) });
Assert.Equal(1, issues.Count);
@@ -151,7 +151,7 @@ public class IssuesClientTests : IDisposable
await _issuesClient.Update(owner, _repository.Name, issue4.Number,
new IssueUpdate { State = ItemState.Closed });
- var retrieved = await _issuesClient.GetForRepository(owner, _repository.Name,
+ var retrieved = await _issuesClient.GetAllForRepository(owner, _repository.Name,
new RepositoryIssueRequest { State = ItemState.All });
Assert.True(retrieved.Count >= 4);
@@ -170,18 +170,18 @@ public class IssuesClientTests : IDisposable
await _issuesClient.Create(owner, _repository.Name, newIssue1);
await _issuesClient.Create(owner, _repository.Name, newIssue2);
- var allIssues = await _issuesClient.GetForRepository(owner, _repository.Name,
+ var allIssues = await _issuesClient.GetAllForRepository(owner, _repository.Name,
new RepositoryIssueRequest());
Assert.Equal(2, allIssues.Count);
- var assignedIssues = await _issuesClient.GetForRepository(owner, _repository.Name,
+ var assignedIssues = await _issuesClient.GetAllForRepository(owner, _repository.Name,
new RepositoryIssueRequest { Assignee = owner });
Assert.Equal(1, assignedIssues.Count);
Assert.Equal("An assigned issue", assignedIssues[0].Title);
- var unassignedIssues = await _issuesClient.GetForRepository(owner, _repository.Name,
+ var unassignedIssues = await _issuesClient.GetAllForRepository(owner, _repository.Name,
new RepositoryIssueRequest { Assignee = "none" });
Assert.Equal(1, unassignedIssues.Count);
@@ -197,17 +197,17 @@ public class IssuesClientTests : IDisposable
await _issuesClient.Create(owner, _repository.Name, newIssue1);
await _issuesClient.Create(owner, _repository.Name, newIssue2);
- var allIssues = await _issuesClient.GetForRepository(owner, _repository.Name,
+ var allIssues = await _issuesClient.GetAllForRepository(owner, _repository.Name,
new RepositoryIssueRequest());
Assert.Equal(2, allIssues.Count);
- var issuesCreatedByOwner = await _issuesClient.GetForRepository(owner, _repository.Name,
+ var issuesCreatedByOwner = await _issuesClient.GetAllForRepository(owner, _repository.Name,
new RepositoryIssueRequest { Creator = owner });
Assert.Equal(2, issuesCreatedByOwner.Count);
- var issuesCreatedByExternalUser = await _issuesClient.GetForRepository(owner, _repository.Name,
+ var issuesCreatedByExternalUser = await _issuesClient.GetAllForRepository(owner, _repository.Name,
new RepositoryIssueRequest { Creator = "shiftkey" });
Assert.Equal(0, issuesCreatedByExternalUser.Count);
@@ -222,17 +222,17 @@ public class IssuesClientTests : IDisposable
await _issuesClient.Create(owner, _repository.Name, newIssue1);
await _issuesClient.Create(owner, _repository.Name, newIssue2);
- var allIssues = await _issuesClient.GetForRepository(owner, _repository.Name,
+ var allIssues = await _issuesClient.GetAllForRepository(owner, _repository.Name,
new RepositoryIssueRequest());
Assert.Equal(2, allIssues.Count);
- var mentionsWithShiftkey = await _issuesClient.GetForRepository(owner, _repository.Name,
+ var mentionsWithShiftkey = await _issuesClient.GetAllForRepository(owner, _repository.Name,
new RepositoryIssueRequest { Mentioned = "shiftkey" });
Assert.Equal(1, mentionsWithShiftkey.Count);
- var mentionsWithHaacked = await _issuesClient.GetForRepository(owner, _repository.Name,
+ var mentionsWithHaacked = await _issuesClient.GetAllForRepository(owner, _repository.Name,
new RepositoryIssueRequest { Mentioned = "haacked" });
Assert.Equal(0, mentionsWithHaacked.Count);
@@ -244,7 +244,7 @@ public class IssuesClientTests : IDisposable
var owner = _repository.Owner.Login;
await AssertEx.Throws(
- async () => await _issuesClient.GetForRepository(owner, _repository.Name,
+ async () => await _issuesClient.GetAllForRepository(owner, _repository.Name,
new RepositoryIssueRequest { Assignee = "some-random-account" }));
}
diff --git a/Octokit.Tests.Integration/Clients/IssuesEventsClientTests.cs b/Octokit.Tests.Integration/Clients/IssuesEventsClientTests.cs
index 57bab824..63ccdf75 100644
--- a/Octokit.Tests.Integration/Clients/IssuesEventsClientTests.cs
+++ b/Octokit.Tests.Integration/Clients/IssuesEventsClientTests.cs
@@ -34,13 +34,13 @@ public class IssuesEventsClientTests : IDisposable
var newIssue = new NewIssue("a test issue") { Body = "A new unassigned issue" };
var issue = await _issuesClient.Create(_repositoryOwner, _repositoryName, newIssue);
- var issueEventInfo = await _issuesEventsClientClient.GetForIssue(_repositoryOwner, _repositoryName, issue.Number);
+ var issueEventInfo = await _issuesEventsClientClient.GetAllForIssue(_repositoryOwner, _repositoryName, issue.Number);
Assert.Empty(issueEventInfo);
var closed = _issuesClient.Update(_repositoryOwner, _repository.Name, issue.Number, new IssueUpdate { State = ItemState.Closed })
.Result;
Assert.NotNull(closed);
- issueEventInfo = await _issuesEventsClientClient.GetForIssue(_repositoryOwner, _repositoryName, issue.Number);
+ issueEventInfo = await _issuesEventsClientClient.GetAllForIssue(_repositoryOwner, _repositoryName, issue.Number);
Assert.Equal(1, issueEventInfo.Count);
Assert.Equal(EventInfoState.Closed, issueEventInfo[0].Event);
@@ -71,7 +71,7 @@ public class IssuesEventsClientTests : IDisposable
.Result;
Assert.NotNull(closed2);
- var issueEvents = await _issuesEventsClientClient.GetForRepository(_repositoryOwner, _repositoryName);
+ var issueEvents = await _issuesEventsClientClient.GetAllForRepository(_repositoryOwner, _repositoryName);
Assert.Equal(3, issueEvents.Count);
Assert.Equal(2, issueEvents.Count(issueEvent => issueEvent.Issue.Body == "Everything's coming up Millhouse"));
@@ -85,7 +85,7 @@ public class IssuesEventsClientTests : IDisposable
var closed = _issuesClient.Update(_repositoryOwner, _repository.Name, issue.Number, new IssueUpdate { State = ItemState.Closed })
.Result;
Assert.NotNull(closed);
- var issueEvents = await _issuesEventsClientClient.GetForRepository(_repositoryOwner, _repositoryName);
+ var issueEvents = await _issuesEventsClientClient.GetAllForRepository(_repositoryOwner, _repositoryName);
int issueEventId = issueEvents[0].Id;
var issueEventLookupById = await _issuesEventsClientClient.Get(_repositoryOwner, _repositoryName, issueEventId);
diff --git a/Octokit.Tests.Integration/Clients/IssuesLabelsClientTests.cs b/Octokit.Tests.Integration/Clients/IssuesLabelsClientTests.cs
index 09521ee9..45558580 100644
--- a/Octokit.Tests.Integration/Clients/IssuesLabelsClientTests.cs
+++ b/Octokit.Tests.Integration/Clients/IssuesLabelsClientTests.cs
@@ -35,14 +35,14 @@ public class IssuesLabelsClientTests : IDisposable
var label = await _issuesLabelsClient.Create(_repositoryOwner, _repository.Name, newLabel);
var issue = await _issuesClient.Create(_repositoryOwner, _repositoryName, newIssue);
- var issueLabelsInfo = await _issuesLabelsClient.GetForIssue(_repositoryOwner, _repositoryName, issue.Number);
+ var issueLabelsInfo = await _issuesLabelsClient.GetAllForIssue(_repositoryOwner, _repositoryName, issue.Number);
Assert.Empty(issueLabelsInfo);
var issueUpdate = new IssueUpdate();
issueUpdate.AddLabel(label.Name);
var updated = await _issuesClient.Update(_repositoryOwner, _repository.Name, issue.Number, issueUpdate);
Assert.NotNull(updated);
- issueLabelsInfo = await _issuesLabelsClient.GetForIssue(_repositoryOwner, _repositoryName, issue.Number);
+ issueLabelsInfo = await _issuesLabelsClient.GetAllForIssue(_repositoryOwner, _repositoryName, issue.Number);
Assert.Equal(1, issueLabelsInfo.Count);
Assert.Equal(newLabel.Color, issueLabelsInfo[0].Color);
@@ -54,12 +54,12 @@ public class IssuesLabelsClientTests : IDisposable
var newLabel1 = new NewLabel("test label 1", "FFFFFF");
var newLabel2 = new NewLabel("test label 2", "FFFFFF");
- var originalIssueLabels = await _issuesLabelsClient.GetForRepository(_repositoryOwner, _repositoryName);
+ var originalIssueLabels = await _issuesLabelsClient.GetAllForRepository(_repositoryOwner, _repositoryName);
await _issuesLabelsClient.Create(_repositoryOwner, _repository.Name, newLabel1);
await _issuesLabelsClient.Create(_repositoryOwner, _repository.Name, newLabel2);
- var issueLabels = await _issuesLabelsClient.GetForRepository(_repositoryOwner, _repositoryName);
+ var issueLabels = await _issuesLabelsClient.GetAllForRepository(_repositoryOwner, _repositoryName);
Assert.Equal(originalIssueLabels.Count + 2, issueLabels.Count);
}
diff --git a/Octokit.Tests.Integration/Clients/MilestonesClientTests.cs b/Octokit.Tests.Integration/Clients/MilestonesClientTests.cs
index 460b988d..128affd4 100644
--- a/Octokit.Tests.Integration/Clients/MilestonesClientTests.cs
+++ b/Octokit.Tests.Integration/Clients/MilestonesClientTests.cs
@@ -39,7 +39,7 @@ public class MilestonesClientTests : IDisposable
[IntegrationTest]
public async Task CanListEmptyMilestones()
{
- var milestones = await _milestonesClient.GetForRepository(_repositoryOwner, _repositoryName);
+ var milestones = await _milestonesClient.GetAllForRepository(_repositoryOwner, _repositoryName);
Assert.Empty(milestones);
}
@@ -54,7 +54,7 @@ public class MilestonesClientTests : IDisposable
await _milestonesClient.Create(_repositoryOwner, _repositoryName, milestone2);
await _milestonesClient.Create(_repositoryOwner, _repositoryName, milestone3);
- var milestones = await _milestonesClient.GetForRepository(_repositoryOwner, _repositoryName);
+ var milestones = await _milestonesClient.GetAllForRepository(_repositoryOwner, _repositoryName);
Assert.Equal(2, milestones.Count);
Assert.Equal("milestone 1", milestones[0].Title);
Assert.Equal("milestone 2", milestones[1].Title);
@@ -70,7 +70,7 @@ public class MilestonesClientTests : IDisposable
await _milestonesClient.Create(_repositoryOwner, _repositoryName, milestone2);
await _milestonesClient.Create(_repositoryOwner, _repositoryName, milestone3);
- var milestones = await _milestonesClient.GetForRepository(_repositoryOwner, _repositoryName,
+ var milestones = await _milestonesClient.GetAllForRepository(_repositoryOwner, _repositoryName,
new MilestoneRequest { SortDirection = SortDirection.Descending });
Assert.Equal(2, milestones.Count);
Assert.Equal("milestone 2", milestones[0].Title);
@@ -87,7 +87,7 @@ public class MilestonesClientTests : IDisposable
await _milestonesClient.Create(_repositoryOwner, _repositoryName, milestone2);
await _milestonesClient.Create(_repositoryOwner, _repositoryName, milestone3);
- var milestones = await _milestonesClient.GetForRepository(_repositoryOwner, _repositoryName,
+ var milestones = await _milestonesClient.GetAllForRepository(_repositoryOwner, _repositoryName,
new MilestoneRequest { State = ItemState.Closed });
Assert.Equal(1, milestones.Count);
@@ -107,7 +107,7 @@ public class MilestonesClientTests : IDisposable
await _gitHubClient.Issue.Update(owner, _repository.Name, issue2.Number,
new IssueUpdate { State = ItemState.Closed });
- var retrieved = await _gitHubClient.Issue.GetForRepository(owner, _repository.Name,
+ var retrieved = await _gitHubClient.Issue.GetAllForRepository(owner, _repository.Name,
new RepositoryIssueRequest { State = ItemState.Closed });
Assert.True(retrieved.Count >= 2);
diff --git a/Octokit.Tests.Integration/Clients/MiscellaneousClientTests.cs b/Octokit.Tests.Integration/Clients/MiscellaneousClientTests.cs
index 97a56374..256a73f3 100644
--- a/Octokit.Tests.Integration/Clients/MiscellaneousClientTests.cs
+++ b/Octokit.Tests.Integration/Clients/MiscellaneousClientTests.cs
@@ -11,7 +11,7 @@ public class MiscellaneousClientTests
{
var github = Helper.GetAuthenticatedClient();
- var emojis = await github.Miscellaneous.GetEmojis();
+ var emojis = await github.Miscellaneous.GetAllEmojis();
Assert.True(emojis.Count > 1);
}
@@ -37,7 +37,7 @@ public class MiscellaneousClientTests
{
var github = Helper.GetAuthenticatedClient();
- var result = await github.Miscellaneous.GetGitIgnoreTemplates();
+ var result = await github.Miscellaneous.GetAllGitIgnoreTemplates();
Assert.True(result.Count > 2);
}
@@ -50,7 +50,7 @@ public class MiscellaneousClientTests
{
var github = Helper.GetAuthenticatedClient();
- var result = await github.Miscellaneous.GetLicenses();
+ var result = await github.Miscellaneous.GetAllLicenses();
Assert.True(result.Count > 2);
Assert.Contains(result, license => license.Key == "mit");
diff --git a/Octokit.Tests.Integration/Clients/PullRequestReviewCommentsClientTests.cs b/Octokit.Tests.Integration/Clients/PullRequestReviewCommentsClientTests.cs
index 0345af9d..6aec2462 100644
--- a/Octokit.Tests.Integration/Clients/PullRequestReviewCommentsClientTests.cs
+++ b/Octokit.Tests.Integration/Clients/PullRequestReviewCommentsClientTests.cs
@@ -138,7 +138,7 @@ public class PullRequestReviewCommentsClientTests : IDisposable
await CreateComments(commentsToCreate, position, _repository.Name, pullRequest.Sha, pullRequest.Number);
- var pullRequestComments = await _client.GetForRepository(Helper.UserName, _repository.Name);
+ var pullRequestComments = await _client.GetAllForRepository(Helper.UserName, _repository.Name);
AssertComments(pullRequestComments, commentsToCreate, position);
}
@@ -153,7 +153,7 @@ public class PullRequestReviewCommentsClientTests : IDisposable
await CreateComments(commentsToCreate, position, _repository.Name, pullRequest.Sha, pullRequest.Number);
- var pullRequestComments = await _client.GetForRepository(Helper.UserName, _repository.Name, new PullRequestReviewCommentRequest { Direction = SortDirection.Ascending });
+ var pullRequestComments = await _client.GetAllForRepository(Helper.UserName, _repository.Name, new PullRequestReviewCommentRequest { Direction = SortDirection.Ascending });
Assert.Equal(pullRequestComments.Select(x => x.Body), commentsToCreate);
}
@@ -168,7 +168,7 @@ public class PullRequestReviewCommentsClientTests : IDisposable
await CreateComments(commentsToCreate, position, _repository.Name, pullRequest.Sha, pullRequest.Number);
- var pullRequestComments = await _client.GetForRepository(Helper.UserName, _repository.Name, new PullRequestReviewCommentRequest { Direction = SortDirection.Descending });
+ var pullRequestComments = await _client.GetAllForRepository(Helper.UserName, _repository.Name, new PullRequestReviewCommentRequest { Direction = SortDirection.Descending });
Assert.Equal(pullRequestComments.Select(x => x.Body), commentsToCreate.Reverse());
}
diff --git a/Octokit.Tests.Integration/Clients/PullRequestsClientTests.cs b/Octokit.Tests.Integration/Clients/PullRequestsClientTests.cs
index f5bc8f07..590a05a5 100644
--- a/Octokit.Tests.Integration/Clients/PullRequestsClientTests.cs
+++ b/Octokit.Tests.Integration/Clients/PullRequestsClientTests.cs
@@ -48,7 +48,7 @@ public class PullRequestsClientTests : IDisposable
var newPullRequest = new NewPullRequest("a pull request", branchName, "master");
var result = await _fixture.Create(Helper.UserName, _repository.Name, newPullRequest);
- var pullRequests = await _fixture.GetForRepository(Helper.UserName, _repository.Name);
+ var pullRequests = await _fixture.GetAllForRepository(Helper.UserName, _repository.Name);
Assert.Equal(1, pullRequests.Count);
Assert.Equal(result.Title, pullRequests[0].Title);
@@ -63,7 +63,7 @@ public class PullRequestsClientTests : IDisposable
var result = await _fixture.Create(Helper.UserName, _repository.Name, newPullRequest);
var openPullRequests = new PullRequestRequest { State = ItemState.Open };
- var pullRequests = await _fixture.GetForRepository(Helper.UserName, _repository.Name, openPullRequests);
+ var pullRequests = await _fixture.GetAllForRepository(Helper.UserName, _repository.Name, openPullRequests);
Assert.Equal(1, pullRequests.Count);
Assert.Equal(result.Title, pullRequests[0].Title);
@@ -78,7 +78,7 @@ public class PullRequestsClientTests : IDisposable
await _fixture.Create(Helper.UserName, _repository.Name, newPullRequest);
var openPullRequests = new PullRequestRequest { State = ItemState.Closed };
- var pullRequests = await _fixture.GetForRepository(Helper.UserName, _repository.Name, openPullRequests);
+ var pullRequests = await _fixture.GetAllForRepository(Helper.UserName, _repository.Name, openPullRequests);
Assert.Empty(pullRequests);
}
@@ -126,7 +126,7 @@ public class PullRequestsClientTests : IDisposable
await _fixture.Update(Helper.UserName, _repository.Name, pullRequest.Number, updatePullRequest);
var closedPullRequests = new PullRequestRequest { State = ItemState.Closed };
- var pullRequests = await _fixture.GetForRepository(Helper.UserName, _repository.Name, closedPullRequests);
+ var pullRequests = await _fixture.GetAllForRepository(Helper.UserName, _repository.Name, closedPullRequests);
Assert.Equal(1, pullRequests.Count);
}
@@ -146,11 +146,11 @@ public class PullRequestsClientTests : IDisposable
await _fixture.Update(Helper.UserName, _repository.Name, pullRequest.Number, updatePullRequest);
var sortPullRequestsByUpdated = new PullRequestRequest { SortProperty = PullRequestSort.Updated, SortDirection = SortDirection.Ascending };
- var pullRequests = await _fixture.GetForRepository(Helper.UserName, _repository.Name, sortPullRequestsByUpdated);
+ var pullRequests = await _fixture.GetAllForRepository(Helper.UserName, _repository.Name, sortPullRequestsByUpdated);
Assert.Equal(anotherPullRequest.Title, pullRequests[0].Title);
var sortPullRequestsByLongRunning = new PullRequestRequest { SortProperty = PullRequestSort.LongRunning };
- var pullRequestsByLongRunning = await _fixture.GetForRepository(Helper.UserName, _repository.Name, sortPullRequestsByLongRunning);
+ var pullRequestsByLongRunning = await _fixture.GetAllForRepository(Helper.UserName, _repository.Name, sortPullRequestsByLongRunning);
Assert.Equal(pullRequest.Title, pullRequestsByLongRunning[0].Title);
}
@@ -165,10 +165,10 @@ public class PullRequestsClientTests : IDisposable
var newPullRequest2 = new NewPullRequest("another pull request", otherBranchName, "master");
var anotherPullRequest = await _fixture.Create(Helper.UserName, _repository.Name, newPullRequest2);
- var pullRequests = await _fixture.GetForRepository(Helper.UserName, _repository.Name, new PullRequestRequest { SortDirection = SortDirection.Ascending });
+ var pullRequests = await _fixture.GetAllForRepository(Helper.UserName, _repository.Name, new PullRequestRequest { SortDirection = SortDirection.Ascending });
Assert.Equal(pullRequest.Title, pullRequests[0].Title);
- var pullRequestsDescending = await _fixture.GetForRepository(Helper.UserName, _repository.Name, new PullRequestRequest());
+ var pullRequestsDescending = await _fixture.GetAllForRepository(Helper.UserName, _repository.Name, new PullRequestRequest());
Assert.Equal(anotherPullRequest.Title, pullRequestsDescending[0].Title);
}
diff --git a/Octokit.Tests.Integration/Clients/ReleasesClientTests.cs b/Octokit.Tests.Integration/Clients/ReleasesClientTests.cs
index 98fd8146..a0826051 100644
--- a/Octokit.Tests.Integration/Clients/ReleasesClientTests.cs
+++ b/Octokit.Tests.Integration/Clients/ReleasesClientTests.cs
@@ -152,7 +152,7 @@ public class ReleasesClientTests
Assert.True(result.Id > 0);
- var assets = await _releaseClient.GetAssets(_repositoryOwner, _repositoryName, release.Id);
+ var assets = await _releaseClient.GetAllAssets(_repositoryOwner, _repositoryName, release.Id);
Assert.Equal(1, assets.Count);
var asset = assets[0];
diff --git a/Octokit.Tests.Integration/Clients/RepositoriesClientTests.cs b/Octokit.Tests.Integration/Clients/RepositoriesClientTests.cs
index cc0bddeb..6c40f537 100644
--- a/Octokit.Tests.Integration/Clients/RepositoriesClientTests.cs
+++ b/Octokit.Tests.Integration/Clients/RepositoriesClientTests.cs
@@ -552,6 +552,21 @@ public class RepositoriesClientTests
Assert.True(repositories.Count > 80);
}
+
+ [IntegrationTest]
+ public async Task ReturnsAllPublicRepositoriesSinceLastSeen()
+ {
+ var github = Helper.GetAuthenticatedClient();
+
+ var request = new PublicRepositoryRequest(32732250);
+ var repositories = await github.Repository.GetAllPublic(request);
+
+ Assert.NotNull(repositories);
+ Assert.True(repositories.Any());
+ Assert.Equal(32732252, repositories[0].Id);
+ Assert.False(repositories[0].Private);
+ Assert.Equal("zad19", repositories[0].Name);
+ }
}
public class TheGetAllForOrgMethod
diff --git a/Octokit.Tests.Integration/Clients/RepositoryContentsClientTests.cs b/Octokit.Tests.Integration/Clients/RepositoryContentsClientTests.cs
index 02cdbb12..05bd0607 100644
--- a/Octokit.Tests.Integration/Clients/RepositoryContentsClientTests.cs
+++ b/Octokit.Tests.Integration/Clients/RepositoryContentsClientTests.cs
@@ -53,7 +53,7 @@ namespace Octokit.Tests.Integration.Clients
var contents = await github
.Repository
.Content
- .GetContents("octokit", "octokit.net", "Octokit.Reactive/ObservableGitHubClient.cs");
+ .GetAllContents("octokit", "octokit.net", "Octokit.Reactive/ObservableGitHubClient.cs");
Assert.Equal(1, contents.Count);
Assert.Equal(ContentType.File, contents.First().Type);
@@ -71,7 +71,7 @@ namespace Octokit.Tests.Integration.Clients
var contents = await github
.Repository
.Content
- .GetContents("octokit", "octokit.net", "Octokit");
+ .GetAllContents("octokit", "octokit.net", "Octokit");
Assert.True(contents.Count > 2);
Assert.Equal(ContentType.Dir, contents.First().Type);
@@ -99,7 +99,7 @@ namespace Octokit.Tests.Integration.Clients
new CreateFileRequest("Test commit", "Some Content"));
Assert.Equal("somefile.txt", file.Content.Name);
- var contents = await fixture.GetContents(repository.Owner.Login, repository.Name, "somefile.txt");
+ var contents = await fixture.GetAllContents(repository.Owner.Login, repository.Name, "somefile.txt");
string fileSha = contents.First().Sha;
Assert.Equal("Some Content", contents.First().Content);
@@ -110,7 +110,7 @@ namespace Octokit.Tests.Integration.Clients
new UpdateFileRequest("Updating file", "New Content", fileSha));
Assert.Equal("somefile.txt", update.Content.Name);
- contents = await fixture.GetContents(repository.Owner.Login, repository.Name, "somefile.txt");
+ contents = await fixture.GetAllContents(repository.Owner.Login, repository.Name, "somefile.txt");
Assert.Equal("New Content", contents.First().Content);
fileSha = contents.First().Sha;
@@ -121,7 +121,7 @@ namespace Octokit.Tests.Integration.Clients
new DeleteFileRequest("Deleted file", fileSha));
await Assert.ThrowsAsync(
- async () => await fixture.GetContents(repository.Owner.Login, repository.Name, "somefile.txt"));
+ async () => await fixture.GetAllContents(repository.Owner.Login, repository.Name, "somefile.txt"));
}
finally
{
diff --git a/Octokit.Tests.Integration/Clients/TeamsClientTests.cs b/Octokit.Tests.Integration/Clients/TeamsClientTests.cs
index 62c879e4..97524767 100644
--- a/Octokit.Tests.Integration/Clients/TeamsClientTests.cs
+++ b/Octokit.Tests.Integration/Clients/TeamsClientTests.cs
@@ -117,7 +117,7 @@ public class TeamsClientTests
{
var github = Helper.GetAuthenticatedClient();
- var members = await github.Organization.Team.GetMembers(team.Id);
+ var members = await github.Organization.Team.GetAllMembers(team.Id);
Assert.Contains(Helper.UserName, members.Select(u => u.Login));
}
diff --git a/Octokit.Tests.Integration/Reactive/ObservableIssuesClientTests.cs b/Octokit.Tests.Integration/Reactive/ObservableIssuesClientTests.cs
index a8cbc15d..a1745ee4 100644
--- a/Octokit.Tests.Integration/Reactive/ObservableIssuesClientTests.cs
+++ b/Octokit.Tests.Integration/Reactive/ObservableIssuesClientTests.cs
@@ -35,7 +35,7 @@ public class ObservableIssuesClientTests : IDisposable
[IntegrationTest]
public async Task ReturnsAllIssuesForARepository()
{
- var issues = await _client.GetForRepository("libgit2", "libgit2sharp").ToList();
+ var issues = await _client.GetAllForRepository("libgit2", "libgit2sharp").ToList();
Assert.NotEmpty(issues);
}
diff --git a/Octokit.Tests.Integration/Reactive/ObservableMilestonesClientTests.cs b/Octokit.Tests.Integration/Reactive/ObservableMilestonesClientTests.cs
index df9c80ef..91e9acc9 100644
--- a/Octokit.Tests.Integration/Reactive/ObservableMilestonesClientTests.cs
+++ b/Octokit.Tests.Integration/Reactive/ObservableMilestonesClientTests.cs
@@ -31,7 +31,7 @@ namespace Octokit.Tests.Integration
var github = Helper.GetAuthenticatedClient();
var client = new ObservableMilestonesClient(github);
- var milestones = await client.GetForRepository("libgit2", "libgit2sharp", new MilestoneRequest { State = ItemState.Closed }).ToList();
+ var milestones = await client.GetAllForRepository("libgit2", "libgit2sharp", new MilestoneRequest { State = ItemState.Closed }).ToList();
Assert.NotEmpty(milestones);
Assert.True(milestones.All(m => m.State == ItemState.Closed));
diff --git a/Octokit.Tests.Integration/Reactive/ObservableRepositoriesClientTests.cs b/Octokit.Tests.Integration/Reactive/ObservableRepositoriesClientTests.cs
index fe5294b8..397eb663 100644
--- a/Octokit.Tests.Integration/Reactive/ObservableRepositoriesClientTests.cs
+++ b/Octokit.Tests.Integration/Reactive/ObservableRepositoriesClientTests.cs
@@ -1,4 +1,5 @@
-using System.Reactive.Linq;
+using System.Linq;
+using System.Reactive.Linq;
using System.Threading.Tasks;
using Octokit.Reactive;
using Xunit;
@@ -27,5 +28,22 @@ namespace Octokit.Tests.Integration
Assert.False(repository2.Fork);
}
}
+
+ public class TheGetAllPublicSinceMethod
+ {
+ [IntegrationTest(Skip = "This will take a very long time to return, so will skip it for now.")]
+ public async Task ReturnsAllPublicReposSinceLastSeen()
+ {
+ var github = Helper.GetAuthenticatedClient();
+
+ var client = new ObservableRepositoriesClient(github);
+ var request = new PublicRepositoryRequest(32732250);
+ var repositories = await client.GetAllPublic(request).ToArray();
+ Assert.NotEmpty(repositories);
+ Assert.Equal(32732252, repositories[0].Id);
+ Assert.False(repositories[0].Private);
+ Assert.Equal("zad19", repositories[0].Name);
+ }
+ }
}
}
diff --git a/Octokit.Tests.Integration/Reactive/ObservableTeamsClientTests.cs b/Octokit.Tests.Integration/Reactive/ObservableTeamsClientTests.cs
index dd33ac85..bf8dc203 100644
--- a/Octokit.Tests.Integration/Reactive/ObservableTeamsClientTests.cs
+++ b/Octokit.Tests.Integration/Reactive/ObservableTeamsClientTests.cs
@@ -26,7 +26,7 @@ public class ObservableTeamsClientTests
var client = new ObservableTeamsClient(github);
- var member = await client.GetMembers(team.Id);
+ var member = await client.GetAllMembers(team.Id);
Assert.Equal(Helper.UserName, member.Login);
}
diff --git a/Octokit.Tests/Clients/AssigneesClientTests.cs b/Octokit.Tests/Clients/AssigneesClientTests.cs
index f41e09ce..1c1ae25c 100644
--- a/Octokit.Tests/Clients/AssigneesClientTests.cs
+++ b/Octokit.Tests/Clients/AssigneesClientTests.cs
@@ -19,7 +19,7 @@ namespace Octokit.Tests.Clients
var connection = Substitute.For();
var client = new AssigneesClient(connection);
- client.GetForRepository("fake", "repo");
+ client.GetAllForRepository("fake", "repo");
connection.Received().GetAll(Arg.Is(u => u.ToString() == "repos/fake/repo/assignees"));
}
@@ -29,10 +29,10 @@ namespace Octokit.Tests.Clients
{
var client = new AssigneesClient(Substitute.For());
- await AssertEx.Throws(async () => await client.GetForRepository(null, "name"));
- await AssertEx.Throws(async () => await client.GetForRepository(null, ""));
- await AssertEx.Throws(async () => await client.GetForRepository("owner", null));
- await AssertEx.Throws(async () => await client.GetForRepository("", null));
+ await AssertEx.Throws(async () => await client.GetAllForRepository(null, "name"));
+ await AssertEx.Throws(async () => await client.GetAllForRepository(null, ""));
+ await AssertEx.Throws(async () => await client.GetAllForRepository("owner", null));
+ await AssertEx.Throws(async () => await client.GetAllForRepository("", null));
}
}
diff --git a/Octokit.Tests/Clients/EventsClientTests.cs b/Octokit.Tests/Clients/EventsClientTests.cs
index c94c375f..7a1d6395 100644
--- a/Octokit.Tests/Clients/EventsClientTests.cs
+++ b/Octokit.Tests/Clients/EventsClientTests.cs
@@ -112,7 +112,7 @@ namespace Octokit.Tests.Clients
var connection = Substitute.For();
var client = new EventsClient(connection);
- client.GetUserReceived("fake");
+ client.GetAllUserReceived("fake");
connection.Received().GetAll(Arg.Is(u => u.ToString() == "users/fake/received_events"));
}
@@ -123,8 +123,8 @@ namespace Octokit.Tests.Clients
var connection = Substitute.For();
var client = new EventsClient(connection);
- await AssertEx.Throws(async () => await client.GetUserReceived(null));
- await AssertEx.Throws(async () => await client.GetUserReceived(""));
+ await AssertEx.Throws(async () => await client.GetAllUserReceived(null));
+ await AssertEx.Throws(async () => await client.GetAllUserReceived(""));
}
}
@@ -136,7 +136,7 @@ namespace Octokit.Tests.Clients
var connection = Substitute.For();
var client = new EventsClient(connection);
- client.GetUserReceivedPublic("fake");
+ client.GetAllUserReceivedPublic("fake");
connection.Received().GetAll(Arg.Is(u => u.ToString() == "users/fake/received_events/public"));
}
@@ -147,8 +147,8 @@ namespace Octokit.Tests.Clients
var connection = Substitute.For();
var client = new EventsClient(connection);
- await AssertEx.Throws(async () => await client.GetUserReceivedPublic(null));
- await AssertEx.Throws(async () => await client.GetUserReceivedPublic(""));
+ await AssertEx.Throws(async () => await client.GetAllUserReceivedPublic(null));
+ await AssertEx.Throws(async () => await client.GetAllUserReceivedPublic(""));
}
}
@@ -160,7 +160,7 @@ namespace Octokit.Tests.Clients
var connection = Substitute.For();
var client = new EventsClient(connection);
- client.GetUserPerformed("fake");
+ client.GetAllUserPerformed("fake");
connection.Received().GetAll(Arg.Is(u => u.ToString() == "users/fake/events"));
}
@@ -171,8 +171,8 @@ namespace Octokit.Tests.Clients
var connection = Substitute.For();
var client = new EventsClient(connection);
- await AssertEx.Throws(async () => await client.GetUserPerformed(null));
- await AssertEx.Throws(async () => await client.GetUserPerformed(""));
+ await AssertEx.Throws(async () => await client.GetAllUserPerformed(null));
+ await AssertEx.Throws(async () => await client.GetAllUserPerformed(""));
}
}
@@ -184,7 +184,7 @@ namespace Octokit.Tests.Clients
var connection = Substitute.For();
var client = new EventsClient(connection);
- client.GetUserPerformedPublic("fake");
+ client.GetAllUserPerformedPublic("fake");
connection.Received().GetAll(Arg.Is(u => u.ToString() == "users/fake/events/public"));
}
@@ -195,8 +195,8 @@ namespace Octokit.Tests.Clients
var connection = Substitute.For();
var client = new EventsClient(connection);
- await AssertEx.Throws(async () => await client.GetUserPerformedPublic(null));
- await AssertEx.Throws(async () => await client.GetUserPerformedPublic(""));
+ await AssertEx.Throws(async () => await client.GetAllUserPerformedPublic(null));
+ await AssertEx.Throws(async () => await client.GetAllUserPerformedPublic(""));
}
}
@@ -208,7 +208,7 @@ namespace Octokit.Tests.Clients
var connection = Substitute.For();
var client = new EventsClient(connection);
- client.GetForAnOrganization("fake", "org");
+ client.GetAllForAnOrganization("fake", "org");
connection.Received().GetAll(Arg.Is(u => u.ToString() == "users/fake/events/orgs/org"));
}
@@ -219,10 +219,10 @@ namespace Octokit.Tests.Clients
var connection = Substitute.For();
var client = new EventsClient(connection);
- await AssertEx.Throws(async () => await client.GetForAnOrganization(null, "org"));
- await AssertEx.Throws(async () => await client.GetForAnOrganization("", "org"));
- await AssertEx.Throws(async () => await client.GetForAnOrganization("fake", null));
- await AssertEx.Throws(async () => await client.GetForAnOrganization("fake", ""));
+ await AssertEx.Throws(async () => await client.GetAllForAnOrganization(null, "org"));
+ await AssertEx.Throws(async () => await client.GetAllForAnOrganization("", "org"));
+ await AssertEx.Throws(async () => await client.GetAllForAnOrganization("fake", null));
+ await AssertEx.Throws(async () => await client.GetAllForAnOrganization("fake", ""));
}
}
diff --git a/Octokit.Tests/Clients/GistCommentsClientTests.cs b/Octokit.Tests/Clients/GistCommentsClientTests.cs
index 8f78d790..3798f2d1 100644
--- a/Octokit.Tests/Clients/GistCommentsClientTests.cs
+++ b/Octokit.Tests/Clients/GistCommentsClientTests.cs
@@ -38,7 +38,7 @@ public class GistCommentsClientTests
var connection = Substitute.For();
var client = new GistCommentsClient(connection);
- await client.GetForGist("24");
+ await client.GetAllForGist("24");
connection.Received().GetAll(Arg.Is(u => u.ToString() == "gists/24/comments"));
}
diff --git a/Octokit.Tests/Clients/IssueCommentsClientTests.cs b/Octokit.Tests/Clients/IssueCommentsClientTests.cs
index 2d569757..3fda4b96 100644
--- a/Octokit.Tests/Clients/IssueCommentsClientTests.cs
+++ b/Octokit.Tests/Clients/IssueCommentsClientTests.cs
@@ -45,7 +45,7 @@ public class IssueCommentsClientTests
var connection = Substitute.For();
var client = new IssueCommentsClient(connection);
- client.GetForRepository("fake", "repo");
+ client.GetAllForRepository("fake", "repo");
connection.Received().GetAll(Arg.Is(u => u.ToString() == "repos/fake/repo/issues/comments"));
}
@@ -56,10 +56,10 @@ public class IssueCommentsClientTests
var connection = Substitute.For();
var client = new IssueCommentsClient(connection);
- await AssertEx.Throws(async () => await client.GetForRepository(null, "name"));
- await AssertEx.Throws(async () => await client.GetForRepository("", "name"));
- await AssertEx.Throws(async () => await client.GetForRepository("owner", null));
- await AssertEx.Throws(async () => await client.GetForRepository("owner", ""));
+ await AssertEx.Throws(async () => await client.GetAllForRepository(null, "name"));
+ await AssertEx.Throws(async () => await client.GetAllForRepository("", "name"));
+ await AssertEx.Throws(async () => await client.GetAllForRepository("owner", null));
+ await AssertEx.Throws(async () => await client.GetAllForRepository("owner", ""));
}
}
@@ -71,7 +71,7 @@ public class IssueCommentsClientTests
var connection = Substitute.For();
var client = new IssueCommentsClient(connection);
- client.GetForIssue("fake", "repo", 3);
+ client.GetAllForIssue("fake", "repo", 3);
connection.Received().GetAll(Arg.Is(u => u.ToString() == "repos/fake/repo/issues/3/comments"));
}
@@ -82,10 +82,10 @@ public class IssueCommentsClientTests
var connection = Substitute.For();
var client = new IssueCommentsClient(connection);
- await AssertEx.Throws(async () => await client.GetForIssue(null, "name", 1));
- await AssertEx.Throws(async () => await client.GetForIssue("", "name", 1));
- await AssertEx.Throws(async () => await client.GetForIssue("owner", null, 1));
- await AssertEx.Throws(async () => await client.GetForIssue("owner", "", 1));
+ await AssertEx.Throws(async () => await client.GetAllForIssue(null, "name", 1));
+ await AssertEx.Throws(async () => await client.GetAllForIssue("", "name", 1));
+ await AssertEx.Throws(async () => await client.GetAllForIssue("owner", null, 1));
+ await AssertEx.Throws(async () => await client.GetAllForIssue("owner", "", 1));
}
}
diff --git a/Octokit.Tests/Clients/IssuesClientTests.cs b/Octokit.Tests/Clients/IssuesClientTests.cs
index f8915d22..54ceaee8 100644
--- a/Octokit.Tests/Clients/IssuesClientTests.cs
+++ b/Octokit.Tests/Clients/IssuesClientTests.cs
@@ -90,7 +90,7 @@ namespace Octokit.Tests.Clients
var connection = Substitute.For();
var client = new IssuesClient(connection);
- client.GetForRepository("fake", "repo");
+ client.GetAllForRepository("fake", "repo");
connection.Received().GetAll(Arg.Is(u => u.ToString() == "repos/fake/repo/issues"),
Arg.Any>());
@@ -102,7 +102,7 @@ namespace Octokit.Tests.Clients
var connection = Substitute.For();
var client = new IssuesClient(connection);
- client.GetForRepository("fake", "repo", new RepositoryIssueRequest
+ client.GetAllForRepository("fake", "repo", new RepositoryIssueRequest
{
SortDirection = SortDirection.Ascending
});
@@ -121,11 +121,11 @@ namespace Octokit.Tests.Clients
var connection = Substitute.For();
var client = new IssuesClient(connection);
- await Assert.ThrowsAsync(() => client.GetForRepository(null, "name", new RepositoryIssueRequest()));
- await Assert.ThrowsAsync(() => client.GetForRepository("", "name", new RepositoryIssueRequest()));
- await Assert.ThrowsAsync(() => client.GetForRepository("owner", null, new RepositoryIssueRequest()));
- await Assert.ThrowsAsync(() => client.GetForRepository("owner", "", new RepositoryIssueRequest()));
- await Assert.ThrowsAsync(() => client.GetForRepository("owner", "name", null));
+ await Assert.ThrowsAsync(() => client.GetAllForRepository(null, "name", new RepositoryIssueRequest()));
+ await Assert.ThrowsAsync(() => client.GetAllForRepository("", "name", new RepositoryIssueRequest()));
+ await Assert.ThrowsAsync(() => client.GetAllForRepository("owner", null, new RepositoryIssueRequest()));
+ await Assert.ThrowsAsync(() => client.GetAllForRepository("owner", "", new RepositoryIssueRequest()));
+ await Assert.ThrowsAsync(() => client.GetAllForRepository("owner", "name", null));
}
}
diff --git a/Octokit.Tests/Clients/IssuesEventsClientTests.cs b/Octokit.Tests/Clients/IssuesEventsClientTests.cs
index 2d3a1555..ff5c642e 100644
--- a/Octokit.Tests/Clients/IssuesEventsClientTests.cs
+++ b/Octokit.Tests/Clients/IssuesEventsClientTests.cs
@@ -16,7 +16,7 @@ namespace Octokit.Tests.Clients
var connection = Substitute.For();
var client = new IssuesEventsClient(connection);
- await client.GetForIssue("fake", "repo", 42);
+ await client.GetAllForIssue("fake", "repo", 42);
connection.Received().GetAll(Arg.Is(u => u.ToString() == "repos/fake/repo/issues/42/events"));
}
@@ -39,7 +39,7 @@ namespace Octokit.Tests.Clients
var connection = Substitute.For();
var client = new IssuesEventsClient(connection);
- await client.GetForRepository("fake", "repo");
+ await client.GetAllForRepository("fake", "repo");
connection.Received().GetAll(Arg.Is(u => u.ToString() == "repos/fake/repo/issues/events"));
}
diff --git a/Octokit.Tests/Clients/IssuesLabelsClientTests.cs b/Octokit.Tests/Clients/IssuesLabelsClientTests.cs
index 0ceef6de..351ea055 100644
--- a/Octokit.Tests/Clients/IssuesLabelsClientTests.cs
+++ b/Octokit.Tests/Clients/IssuesLabelsClientTests.cs
@@ -17,7 +17,7 @@ namespace Octokit.Tests.Clients
var connection = Substitute.For();
var client = new IssuesLabelsClient(connection);
- await client.GetForIssue("fake", "repo", 42);
+ await client.GetAllForIssue("fake", "repo", 42);
connection.Received().GetAll(Arg.Is(u => u.ToString() == "repos/fake/repo/issues/42/labels"));
}
@@ -41,7 +41,7 @@ namespace Octokit.Tests.Clients
var connection = Substitute.For();
var client = new IssuesLabelsClient(connection);
- await client.GetForRepository("fake", "repo");
+ await client.GetAllForRepository("fake", "repo");
connection.Received().GetAll(Arg.Is(u => u.ToString() == "repos/fake/repo/labels"));
}
@@ -188,7 +188,7 @@ namespace Octokit.Tests.Clients
var connection = Substitute.For();
var client = new IssuesLabelsClient(connection);
- client.GetForMilestone("fake", "repo", 42);
+ client.GetAllForMilestone("fake", "repo", 42);
connection.Received().GetAll(Arg.Is(u => u.ToString() == "repos/fake/repo/milestones/42/labels"));
}
@@ -198,8 +198,8 @@ namespace Octokit.Tests.Clients
{
var client = new IssuesLabelsClient(Substitute.For());
- await AssertEx.Throws(async () => await client.GetForMilestone(null, "name", 42));
- await AssertEx.Throws(async () => await client.GetForMilestone("owner", null, 42));
+ await AssertEx.Throws(async () => await client.GetAllForMilestone(null, "name", 42));
+ await AssertEx.Throws