From b0ab485ed13344c4443f9a1f047077bb47eba485 Mon Sep 17 00:00:00 2001 From: Henrik Andersson Date: Sun, 22 Mar 2015 19:09:08 +1000 Subject: [PATCH 01/13] Add a convention test --- ...nationGetAllMethodNameMismatchException.cs | 24 ++++++++++++++++++ Octokit.Tests.Conventions/ModelTests.cs | 25 +++++++++++++++++++ .../Octokit.Tests.Conventions.csproj | 1 + 3 files changed, 50 insertions(+) create mode 100644 Octokit.Tests.Conventions/Exception/PaginationGetAllMethodNameMismatchException.cs 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 @@ + From 01665bce78276b838b2344a354e511eca2aabacd Mon Sep 17 00:00:00 2001 From: Henrik Andersson Date: Mon, 23 Mar 2015 23:22:47 +1000 Subject: [PATCH 02/13] Add 'since` parameter for public repositories --- .../Clients/IObservableRepositoriesClient.cs | 14 +++++++++- .../Clients/ObservableRepositoriesClient.cs | 15 ++++++++++ Octokit/Clients/IRepositoriesClient.cs | 14 ++++++++++ Octokit/Clients/RepositoriesClient.cs | 19 +++++++++++++ .../Models/Request/PublicRepositoryRequest.cs | 28 +++++++++++++++++++ Octokit/Octokit-Mono.csproj | 1 + Octokit/Octokit-MonoAndroid.csproj | 1 + Octokit/Octokit-Monotouch.csproj | 1 + Octokit/Octokit-Portable.csproj | 1 + Octokit/Octokit-netcore45.csproj | 1 + Octokit/Octokit.csproj | 1 + 11 files changed, 95 insertions(+), 1 deletion(-) create mode 100644 Octokit/Models/Request/PublicRepositoryRequest.cs diff --git a/Octokit.Reactive/Clients/IObservableRepositoriesClient.cs b/Octokit.Reactive/Clients/IObservableRepositoriesClient.cs index 222cea82..25337bab 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/ObservableRepositoriesClient.cs b/Octokit.Reactive/Clients/ObservableRepositoriesClient.cs index 9c17dbf8..1a173d9c 100644 --- a/Octokit.Reactive/Clients/ObservableRepositoriesClient.cs +++ b/Octokit.Reactive/Clients/ObservableRepositoriesClient.cs @@ -102,6 +102,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/Clients/IRepositoriesClient.cs b/Octokit/Clients/IRepositoriesClient.cs index 7172f0f4..18533597 100644 --- a/Octokit/Clients/IRepositoriesClient.cs +++ b/Octokit/Clients/IRepositoriesClient.cs @@ -109,6 +109,20 @@ namespace Octokit Justification = "Makes a network request")] Task> GetAllPublic(); + + /// + /// Gets all public repositories since the integer ID of the last Repository that you’ve seen. + /// + /// + /// See the API documentation for more information. + /// The default page size on GitHub.com is 30. + /// + /// Search parameters of the last repository seen + /// Thrown if the client is not authenticated. + /// Thrown when a general API error occurs. + /// A of . + Task> GetAllPublic(PublicRepositoryRequest request); + /// /// Gets all repositories owned by the current user. /// diff --git a/Octokit/Clients/RepositoriesClient.cs b/Octokit/Clients/RepositoriesClient.cs index 25deeae7..6bb9c6a4 100644 --- a/Octokit/Clients/RepositoriesClient.cs +++ b/Octokit/Clients/RepositoriesClient.cs @@ -1,4 +1,5 @@ using System; +using System.Globalization; #if NET_45 using System.Collections.Generic; #endif @@ -187,6 +188,24 @@ namespace Octokit return ApiConnection.GetAll(ApiUrls.AllPublicRepositories()); } + /// + /// Gets all public repositories since the integer ID of the last Repository that you�ve seen. + /// + /// + /// See the API documentation for more information. + /// The default page size on GitHub.com is 30. + /// + /// Search parameters of the last repository seen + /// Thrown if the client is not authenticated. + /// Thrown when a general API error occurs. + /// A of . + public Task> GetAllPublic(PublicRepositoryRequest request) + { + Ensure.ArgumentNotNull(request, "request"); + + return ApiConnection.GetAll(ApiUrls.AllPublicRepositories(), request.ToParametersDictionary()); + } + /// /// Gets all repositories owned by the current user. /// diff --git a/Octokit/Models/Request/PublicRepositoryRequest.cs b/Octokit/Models/Request/PublicRepositoryRequest.cs new file mode 100644 index 00000000..926374a9 --- /dev/null +++ b/Octokit/Models/Request/PublicRepositoryRequest.cs @@ -0,0 +1,28 @@ +using System; +using System.Collections.Generic; +using System.Diagnostics; +using System.Globalization; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace Octokit +{ + [DebuggerDisplay("{DebuggerDisplay,nq}")] + public class PublicRepositoryRequest : RequestParameters + { + public PublicRepositoryRequest() + { + } + + public long Since { get; set; } + + internal string DebuggerDisplay + { + get + { + return String.Format(CultureInfo.InvariantCulture, "Since: {0} ", Since); + } + } + } +} diff --git a/Octokit/Octokit-Mono.csproj b/Octokit/Octokit-Mono.csproj index 08b522f4..d9f81fc2 100644 --- a/Octokit/Octokit-Mono.csproj +++ b/Octokit/Octokit-Mono.csproj @@ -382,6 +382,7 @@ + \ No newline at end of file diff --git a/Octokit/Octokit-MonoAndroid.csproj b/Octokit/Octokit-MonoAndroid.csproj index 03023e21..897b2a73 100644 --- a/Octokit/Octokit-MonoAndroid.csproj +++ b/Octokit/Octokit-MonoAndroid.csproj @@ -394,6 +394,7 @@ + \ No newline at end of file diff --git a/Octokit/Octokit-Monotouch.csproj b/Octokit/Octokit-Monotouch.csproj index 29d7faa3..997f94e7 100644 --- a/Octokit/Octokit-Monotouch.csproj +++ b/Octokit/Octokit-Monotouch.csproj @@ -387,6 +387,7 @@ + diff --git a/Octokit/Octokit-Portable.csproj b/Octokit/Octokit-Portable.csproj index 377001e6..55d10491 100644 --- a/Octokit/Octokit-Portable.csproj +++ b/Octokit/Octokit-Portable.csproj @@ -380,6 +380,7 @@ + diff --git a/Octokit/Octokit-netcore45.csproj b/Octokit/Octokit-netcore45.csproj index 53942c26..65291e0a 100644 --- a/Octokit/Octokit-netcore45.csproj +++ b/Octokit/Octokit-netcore45.csproj @@ -384,6 +384,7 @@ + diff --git a/Octokit/Octokit.csproj b/Octokit/Octokit.csproj index 98eb49c4..fdf8c32f 100644 --- a/Octokit/Octokit.csproj +++ b/Octokit/Octokit.csproj @@ -83,6 +83,7 @@ + From 818f730a6c669b834679120508f130dafb527426 Mon Sep 17 00:00:00 2001 From: Henrik Andersson Date: Mon, 23 Mar 2015 23:23:08 +1000 Subject: [PATCH 03/13] Add tests --- .../Clients/RepositoriesClientTests.cs | 15 +++++ .../ObservableRepositoriesClientTests.cs | 24 +++++++- .../Clients/RepositoriesClientTests.cs | 31 +++++++++++ .../ObservableRepositoriesClientTests.cs | 55 +++++++++++++++++++ 4 files changed, 124 insertions(+), 1 deletion(-) diff --git a/Octokit.Tests.Integration/Clients/RepositoriesClientTests.cs b/Octokit.Tests.Integration/Clients/RepositoriesClientTests.cs index cc0bddeb..0117463a 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 { Since = 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/Reactive/ObservableRepositoriesClientTests.cs b/Octokit.Tests.Integration/Reactive/ObservableRepositoriesClientTests.cs index fe5294b8..3a63339e 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,26 @@ namespace Octokit.Tests.Integration Assert.False(repository2.Fork); } } + + public class TheGetAllPublicSinceMethod + { + [IntegrationTest] + public async Task ReturnsAllPublicReposSinceLastSeen() + { + var github = Helper.GetAuthenticatedClient(); + + var client = new ObservableRepositoriesClient(github); + var request = new PublicRepositoryRequest + { + Since = 32732250 + }; + var repositories = await client.GetAllPublic(request).ToArray(); + Assert.NotNull(repositories); + Assert.True(repositories.Any()); + Assert.Equal(32732252, repositories[0].Id); + Assert.False(repositories[0].Private); + Assert.Equal("zad19", repositories[0].Name); + } + } } } diff --git a/Octokit.Tests/Clients/RepositoriesClientTests.cs b/Octokit.Tests/Clients/RepositoriesClientTests.cs index 0534472b..1dcb5787 100644 --- a/Octokit.Tests/Clients/RepositoriesClientTests.cs +++ b/Octokit.Tests/Clients/RepositoriesClientTests.cs @@ -273,6 +273,37 @@ namespace Octokit.Tests.Clients } } + + public class TheGetAllPublicSinceMethod + { + [Fact] + public void RequestsTheCorrectUrl() + { + var connection = Substitute.For(); + var client = new RepositoriesClient(connection); + + client.GetAllPublic(new PublicRepositoryRequest { Since = 364 }); + + connection.Received() + .GetAll(Arg.Is(u => u.ToString() == "/repositories"), + Arg.Any>()); + } + + [Fact] + public void SendsTheCorrectParameter() + { + var connection = Substitute.For(); + var client = new RepositoriesClient(connection); + + client.GetAllPublic(new PublicRepositoryRequest { Since = 364 }); + + connection.Received() + .GetAll(Arg.Is(u => u.ToString() == "/repositories"), + Arg.Is>(d => d.Count == 1 + && d["since"] == "364")); + } + } + public class TheGetAllForCurrentMethod { [Fact] diff --git a/Octokit.Tests/Reactive/ObservableRepositoriesClientTests.cs b/Octokit.Tests/Reactive/ObservableRepositoriesClientTests.cs index 044a74d7..a69ab0b2 100644 --- a/Octokit.Tests/Reactive/ObservableRepositoriesClientTests.cs +++ b/Octokit.Tests/Reactive/ObservableRepositoriesClientTests.cs @@ -158,6 +158,61 @@ namespace Octokit.Tests.Reactive } } + public class TheGetAllPublicRepositoriesSinceMethod + { + [Fact] + public async Task ReturnsEveryPageOfRepositories() + { + var firstPageUrl = new Uri("/repositories", UriKind.Relative); + var secondPageUrl = new Uri("https://example.com/page/2"); + var firstPageLinks = new Dictionary { { "next", secondPageUrl } }; + var firstPageResponse = new ApiResponse>( + CreateResponseWithApiInfo(firstPageLinks), + new List + { + new Repository(364), + new Repository(365), + new Repository(366) + }); + var thirdPageUrl = new Uri("https://example.com/page/3"); + var secondPageLinks = new Dictionary { { "next", thirdPageUrl } }; + var secondPageResponse = new ApiResponse> + ( + CreateResponseWithApiInfo(secondPageLinks), + new List + { + new Repository(367), + new Repository(368), + new Repository(369) + }); + var lastPageResponse = new ApiResponse>( + new Response(), + new List + { + new Repository(370) + }); + var gitHubClient = Substitute.For(); + gitHubClient.Connection.Get>(firstPageUrl, + Arg.Is>(d => d.Count == 1 + && d["since"] == "364"), null) + .Returns(Task.Factory.StartNew>>(() => firstPageResponse)); + gitHubClient.Connection.Get>(secondPageUrl, null, null) + .Returns(Task.Factory.StartNew>>(() => secondPageResponse)); + gitHubClient.Connection.Get>(thirdPageUrl, null, null) + .Returns(Task.Factory.StartNew>>(() => lastPageResponse)); + var repositoriesClient = new ObservableRepositoriesClient(gitHubClient); + + var results = await repositoriesClient.GetAllPublic(new PublicRepositoryRequest { Since = 364 }).ToArray(); + + Assert.Equal(7, results.Length); + gitHubClient.Connection.Received(1).Get>(firstPageUrl, + Arg.Is>(d=>d.Count == 1 + && d["since"] == "364"), null); + gitHubClient.Connection.Received(1).Get>(secondPageUrl, null, null); + gitHubClient.Connection.Received(1).Get>(thirdPageUrl, null, null); + } + } + public class TheGetAllBranchesMethod { [Fact] From 78e76be7d9d7ea33c6dfa64e4c5cfb08123ae869 Mon Sep 17 00:00:00 2001 From: Henrik Andersson Date: Tue, 24 Mar 2015 00:11:52 +1000 Subject: [PATCH 04/13] Update clients --- Octokit/Clients/AssigneesClient.cs | 2 +- Octokit/Clients/EventsClient.cs | 10 +++++----- Octokit/Clients/FollowersClient.cs | 4 ++-- Octokit/Clients/GistCommentsClient.cs | 2 +- Octokit/Clients/IAssigneesClient.cs | 2 +- Octokit/Clients/IEventsClient.cs | 10 +++++----- Octokit/Clients/IFollowersClient.cs | 4 ++-- Octokit/Clients/IGistCommentsClient.cs | 2 +- Octokit/Clients/IIssueCommentsClient.cs | 4 ++-- Octokit/Clients/IIssuesClient.cs | 4 ++-- Octokit/Clients/IIssuesEventsClient.cs | 4 ++-- Octokit/Clients/IIssuesLabelsClient.cs | 6 +++--- Octokit/Clients/IMilestonesClient.cs | 4 ++-- Octokit/Clients/IMiscellaneousClient.cs | 6 +++--- Octokit/Clients/IOrganizationMembersClient.cs | 2 +- Octokit/Clients/IPullRequestReviewCommentsClient.cs | 4 ++-- Octokit/Clients/IPullRequestsClient.cs | 4 ++-- Octokit/Clients/IReleasesClient.cs | 2 +- Octokit/Clients/IRepositoryCommentsClient.cs | 4 ++-- Octokit/Clients/IRepositoryContentsClient.cs | 2 +- Octokit/Clients/ITeamsClient.cs | 4 ++-- Octokit/Clients/IssueCommentsClient.cs | 4 ++-- Octokit/Clients/IssuesClient.cs | 6 +++--- Octokit/Clients/IssuesEventsClient.cs | 4 ++-- Octokit/Clients/IssuesLabelsClient.cs | 6 +++--- Octokit/Clients/MilestonesClient.cs | 6 +++--- Octokit/Clients/MiscellaneousClient.cs | 6 +++--- Octokit/Clients/OrganizationMembersClient.cs | 2 +- Octokit/Clients/PullRequestReviewCommentsClient.cs | 6 +++--- Octokit/Clients/PullRequestsClient.cs | 6 +++--- Octokit/Clients/ReleasesClient.cs | 2 +- Octokit/Clients/RepositoryCommentsClient.cs | 4 ++-- Octokit/Clients/RepositoryContentsClient.cs | 2 +- Octokit/Clients/TeamsClient.cs | 4 ++-- 34 files changed, 72 insertions(+), 72 deletions(-) diff --git a/Octokit/Clients/AssigneesClient.cs b/Octokit/Clients/AssigneesClient.cs index 46e9cb4e..110a37dc 100644 --- a/Octokit/Clients/AssigneesClient.cs +++ b/Octokit/Clients/AssigneesClient.cs @@ -26,7 +26,7 @@ namespace Octokit /// The owner of the repository /// The name of the repository /// - public Task> GetForRepository(string owner, string name) + public Task> GetAllForRepository(string owner, string name) { Ensure.ArgumentNotNullOrEmptyString(owner, "owner"); Ensure.ArgumentNotNullOrEmptyString(name, "name"); diff --git a/Octokit/Clients/EventsClient.cs b/Octokit/Clients/EventsClient.cs index c5808349..65e420f0 100644 --- a/Octokit/Clients/EventsClient.cs +++ b/Octokit/Clients/EventsClient.cs @@ -89,7 +89,7 @@ namespace Octokit /// /// The login of the user /// All the s that a particular user has received. - public Task> GetUserReceived(string user) + public Task> GetAllUserReceived(string user) { Ensure.ArgumentNotNullOrEmptyString(user, "user"); @@ -104,7 +104,7 @@ namespace Octokit /// /// The login of the user /// All the s that a particular user has received. - public Task> GetUserReceivedPublic(string user) + public Task> GetAllUserReceivedPublic(string user) { Ensure.ArgumentNotNullOrEmptyString(user, "user"); @@ -119,7 +119,7 @@ namespace Octokit /// /// The login of the user /// All the s that a particular user has performed. - public Task> GetUserPerformed(string user) + public Task> GetAllUserPerformed(string user) { Ensure.ArgumentNotNullOrEmptyString(user, "user"); @@ -134,7 +134,7 @@ namespace Octokit /// /// The login of the user /// All the public s that a particular user has performed. - public Task> GetUserPerformedPublic(string user) + public Task> GetAllUserPerformedPublic(string user) { Ensure.ArgumentNotNullOrEmptyString(user, "user"); @@ -150,7 +150,7 @@ namespace Octokit /// The login of the user /// The name of the organization /// All the public s that are associated with an organization. - public Task> GetForAnOrganization(string user, string organization) + public Task> GetAllForAnOrganization(string user, string organization) { Ensure.ArgumentNotNullOrEmptyString(user, "user"); Ensure.ArgumentNotNullOrEmptyString(organization, "organization"); diff --git a/Octokit/Clients/FollowersClient.cs b/Octokit/Clients/FollowersClient.cs index 9059371c..9d85c4dc 100644 --- a/Octokit/Clients/FollowersClient.cs +++ b/Octokit/Clients/FollowersClient.cs @@ -54,7 +54,7 @@ namespace Octokit /// See the API documentation for more information. /// /// A of s that the authenticated user follows. - public Task> GetFollowingForCurrent() + public Task> GetAllFollowingForCurrent() { return ApiConnection.GetAll(ApiUrls.Following()); } @@ -67,7 +67,7 @@ namespace Octokit /// See the API documentation for more information. /// /// A of s that the passed user follows. - public Task> GetFollowing(string login) + public Task> GetAllFollowing(string login) { Ensure.ArgumentNotNullOrEmptyString(login, "login"); diff --git a/Octokit/Clients/GistCommentsClient.cs b/Octokit/Clients/GistCommentsClient.cs index f32a055e..47487159 100644 --- a/Octokit/Clients/GistCommentsClient.cs +++ b/Octokit/Clients/GistCommentsClient.cs @@ -37,7 +37,7 @@ namespace Octokit /// http://developer.github.com/v3/gists/comments/#list-comments-on-a-gist /// The id of the gist /// Task{IReadOnlyList{GistComment}}. - public Task> GetForGist(string gistId) + public Task> GetAllForGist(string gistId) { return ApiConnection.GetAll(ApiUrls.GistComments(gistId)); } diff --git a/Octokit/Clients/IAssigneesClient.cs b/Octokit/Clients/IAssigneesClient.cs index 2d629751..2a1e0cdf 100644 --- a/Octokit/Clients/IAssigneesClient.cs +++ b/Octokit/Clients/IAssigneesClient.cs @@ -17,7 +17,7 @@ namespace Octokit /// The owner of the repository /// The name of the repository /// - Task> GetForRepository(string owner, string name); + Task> GetAllForRepository(string owner, string name); /// /// Checks to see if a user is an assignee for a repository. diff --git a/Octokit/Clients/IEventsClient.cs b/Octokit/Clients/IEventsClient.cs index 8213b5bd..ec148815 100644 --- a/Octokit/Clients/IEventsClient.cs +++ b/Octokit/Clients/IEventsClient.cs @@ -61,7 +61,7 @@ namespace Octokit /// /// The login of the user /// All the s that a particular user has received. - Task> GetUserReceived(string user); + Task> GetAllUserReceived(string user); /// /// Gets all the events that have been received by a given user. @@ -71,7 +71,7 @@ namespace Octokit /// /// The login of the user /// All the s that a particular user has received. - Task> GetUserReceivedPublic(string user); + Task> GetAllUserReceivedPublic(string user); /// /// Gets all the events that have been performed by a given user. @@ -81,7 +81,7 @@ namespace Octokit /// /// The login of the user /// All the s that a particular user has performed. - Task> GetUserPerformed(string user); + Task> GetAllUserPerformed(string user); /// /// Gets all the public events that have been performed by a given user. @@ -91,7 +91,7 @@ namespace Octokit /// /// The login of the user /// All the public s that a particular user has performed. - Task> GetUserPerformedPublic(string user); + Task> GetAllUserPerformedPublic(string user); /// /// Gets all the events that are associated with an organization. @@ -102,6 +102,6 @@ namespace Octokit /// The login of the user /// The name of the organization /// All the public s that are associated with an organization. - Task> GetForAnOrganization(string user, string organization); + Task> GetAllForAnOrganization(string user, string organization); } } \ No newline at end of file diff --git a/Octokit/Clients/IFollowersClient.cs b/Octokit/Clients/IFollowersClient.cs index b73dc583..00f7b7e0 100644 --- a/Octokit/Clients/IFollowersClient.cs +++ b/Octokit/Clients/IFollowersClient.cs @@ -40,7 +40,7 @@ namespace Octokit /// /// A of s that the authenticated user follows. [SuppressMessage("Microsoft.Design", "CA1024:UsePropertiesWhereAppropriate")] - Task> GetFollowingForCurrent(); + Task> GetAllFollowingForCurrent(); /// /// List who a user is following @@ -50,7 +50,7 @@ namespace Octokit /// See the API documentation for more information. /// /// A of s that the passed user follows. - Task> GetFollowing(string login); + Task> GetAllFollowing(string login); /// /// Check if the authenticated user follows another user diff --git a/Octokit/Clients/IGistCommentsClient.cs b/Octokit/Clients/IGistCommentsClient.cs index af11e668..3bcd814a 100644 --- a/Octokit/Clients/IGistCommentsClient.cs +++ b/Octokit/Clients/IGistCommentsClient.cs @@ -29,7 +29,7 @@ namespace Octokit /// http://developer.github.com/v3/gists/comments/#list-comments-on-a-gist /// The id of the gist /// Task{IReadOnlyList{GistComment}}. - Task> GetForGist(string gistId); + Task> GetAllForGist(string gistId); /// /// Creates a comment for the gist with the specified id. diff --git a/Octokit/Clients/IIssueCommentsClient.cs b/Octokit/Clients/IIssueCommentsClient.cs index dd3c2795..fdfbc389 100644 --- a/Octokit/Clients/IIssueCommentsClient.cs +++ b/Octokit/Clients/IIssueCommentsClient.cs @@ -31,7 +31,7 @@ namespace Octokit /// The owner of the repository /// The name of the repository /// - Task> GetForRepository(string owner, string name); + Task> GetAllForRepository(string owner, string name); /// /// Gets Issue Comments for a specified Issue. @@ -41,7 +41,7 @@ namespace Octokit /// The name of the repository /// The issue number /// - Task> GetForIssue(string owner, string name, int number); + Task> GetAllForIssue(string owner, string name, int number); /// /// Creates a new Issue Comment for a specified Issue. diff --git a/Octokit/Clients/IIssuesClient.cs b/Octokit/Clients/IIssuesClient.cs index b0071f2c..bc0e362c 100644 --- a/Octokit/Clients/IIssuesClient.cs +++ b/Octokit/Clients/IIssuesClient.cs @@ -126,7 +126,7 @@ namespace Octokit /// The owner of the repository /// The name of the repository /// - Task> GetForRepository(string owner, string name); + Task> GetAllForRepository(string owner, string name); /// /// Gets issues for a repository. @@ -138,7 +138,7 @@ namespace Octokit /// The name of the repository /// Used to filter and sort the list of issues returned /// - Task> GetForRepository(string owner, string name, RepositoryIssueRequest request); + Task> 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/Clients/IIssuesEventsClient.cs b/Octokit/Clients/IIssuesEventsClient.cs index 6b711a9c..ae51a608 100644 --- a/Octokit/Clients/IIssuesEventsClient.cs +++ b/Octokit/Clients/IIssuesEventsClient.cs @@ -22,7 +22,7 @@ namespace Octokit /// The name of the repository /// The issue number /// - Task> GetForIssue(string owner, string name, int number); + Task> GetAllForIssue(string owner, string name, int number); /// /// Gets all events for the repository. @@ -33,7 +33,7 @@ namespace Octokit /// The owner of the repository /// The name of the repository /// - Task> GetForRepository(string owner, string name); + Task> GetAllForRepository(string owner, string name); /// /// Gets a single event diff --git a/Octokit/Clients/IIssuesLabelsClient.cs b/Octokit/Clients/IIssuesLabelsClient.cs index 1976953d..3f4169db 100644 --- a/Octokit/Clients/IIssuesLabelsClient.cs +++ b/Octokit/Clients/IIssuesLabelsClient.cs @@ -16,7 +16,7 @@ namespace Octokit /// The name of the repository /// The number of the issue /// The list of labels - Task> GetForIssue(string owner, string repo, int number); + Task> GetAllForIssue(string owner, string repo, int number); /// /// Gets all labels for the repository. @@ -27,7 +27,7 @@ namespace Octokit /// The owner of the repository /// The name of the repository /// The list of labels - Task> GetForRepository(string owner, string repo); + Task> GetAllForRepository(string owner, string repo); /// /// Gets a single Label by name. @@ -141,6 +141,6 @@ namespace Octokit /// The name of the repository /// The number of the milestone /// - Task> GetForMilestone(string owner, string repo, int number); + Task> GetAllForMilestone(string owner, string repo, int number); } } \ No newline at end of file diff --git a/Octokit/Clients/IMilestonesClient.cs b/Octokit/Clients/IMilestonesClient.cs index d0635db4..5ef5b41e 100644 --- a/Octokit/Clients/IMilestonesClient.cs +++ b/Octokit/Clients/IMilestonesClient.cs @@ -32,7 +32,7 @@ namespace Octokit /// The owner of the repository /// The name of the repository /// - Task> GetForRepository(string owner, string name); + Task> GetAllForRepository(string owner, string name); /// /// Gets all open milestones for the repository. @@ -44,7 +44,7 @@ namespace Octokit /// The name of the repository /// Used to filter and sort the list of Milestones returned /// - Task> GetForRepository(string owner, string name, MilestoneRequest request); + Task> GetAllForRepository(string owner, string name, MilestoneRequest request); /// /// Creates a milestone for the specified repository. Any user with pull access to a repository can create an diff --git a/Octokit/Clients/IMiscellaneousClient.cs b/Octokit/Clients/IMiscellaneousClient.cs index 50104168..04153a31 100644 --- a/Octokit/Clients/IMiscellaneousClient.cs +++ b/Octokit/Clients/IMiscellaneousClient.cs @@ -20,7 +20,7 @@ namespace Octokit /// Thrown when a general API error occurs. /// An of emoji and their URI. [SuppressMessage("Microsoft.Design", "CA1024:UsePropertiesWhereAppropriate")] - Task> GetEmojis(); + Task> GetAllEmojis(); /// /// Gets the rendered Markdown for the specified plain-text Markdown document. @@ -35,7 +35,7 @@ namespace Octokit /// /// A list of template names [SuppressMessage("Microsoft.Design", "CA1024:UsePropertiesWhereAppropriate")] - Task> GetGitIgnoreTemplates(); + Task> GetAllGitIgnoreTemplates(); /// /// Retrieves the source for a single GitIgnore template @@ -51,7 +51,7 @@ namespace Octokit /// This is a PREVIEW API! Use it at your own risk. /// A list of licenses available on the site [SuppressMessage("Microsoft.Design", "CA1024:UsePropertiesWhereAppropriate")] - Task> GetLicenses(); + Task> GetAllLicenses(); /// /// Retrieves a license based on the licence key such as "mit" diff --git a/Octokit/Clients/IOrganizationMembersClient.cs b/Octokit/Clients/IOrganizationMembersClient.cs index 1e849670..29609af7 100644 --- a/Octokit/Clients/IOrganizationMembersClient.cs +++ b/Octokit/Clients/IOrganizationMembersClient.cs @@ -72,7 +72,7 @@ namespace Octokit /// http://developer.github.com/v3/orgs/members/#public-members-list /// The login for the organization /// - Task> GetPublic(string org); + Task> GetAllPublic(string org); /// /// Check if a user is, publicly or privately, a member of the organization. diff --git a/Octokit/Clients/IPullRequestReviewCommentsClient.cs b/Octokit/Clients/IPullRequestReviewCommentsClient.cs index f2d73c51..a58b3c1f 100644 --- a/Octokit/Clients/IPullRequestReviewCommentsClient.cs +++ b/Octokit/Clients/IPullRequestReviewCommentsClient.cs @@ -28,7 +28,7 @@ namespace Octokit /// The owner of the repository /// The name of the repository /// The list of s for the specified repository - Task> GetForRepository(string owner, string name); + Task> GetAllForRepository(string owner, string name); /// /// Gets a list of the pull request review comments in a specified repository. @@ -38,7 +38,7 @@ namespace Octokit /// The name of the repository /// The sorting parameters /// The list of s for the specified repository - Task> GetForRepository(string owner, string name, PullRequestReviewCommentRequest request); + Task> GetAllForRepository(string owner, string name, PullRequestReviewCommentRequest request); /// /// Gets a single pull request review comment by number. diff --git a/Octokit/Clients/IPullRequestsClient.cs b/Octokit/Clients/IPullRequestsClient.cs index e612850b..0ed1cd25 100644 --- a/Octokit/Clients/IPullRequestsClient.cs +++ b/Octokit/Clients/IPullRequestsClient.cs @@ -31,7 +31,7 @@ namespace Octokit /// The owner of the repository /// The name of the repository /// A of s which are currently open - Task> GetForRepository(string owner, string name); + Task> GetAllForRepository(string owner, string name); /// /// Query pull requests for the repository based on criteria @@ -43,7 +43,7 @@ namespace Octokit /// The name of the repository /// Used to filter and sort the list of pull requests returned /// A of s which match the criteria - Task> GetForRepository(string owner, string name, PullRequestRequest request); + Task> GetAllForRepository(string owner, string name, PullRequestRequest request); /// /// Create a pull request for the specified repository. diff --git a/Octokit/Clients/IReleasesClient.cs b/Octokit/Clients/IReleasesClient.cs index bfbbc96c..742806ad 100644 --- a/Octokit/Clients/IReleasesClient.cs +++ b/Octokit/Clients/IReleasesClient.cs @@ -91,7 +91,7 @@ namespace Octokit /// The id of the . /// Thrown when a general API error occurs. /// The list of for the specified release of the specified repository. - Task> GetAssets(string owner, string name, int id); + Task> GetAllAssets(string owner, string name, int id); /// /// Uploads a for the specified release. diff --git a/Octokit/Clients/IRepositoryCommentsClient.cs b/Octokit/Clients/IRepositoryCommentsClient.cs index 11a67545..3156870f 100644 --- a/Octokit/Clients/IRepositoryCommentsClient.cs +++ b/Octokit/Clients/IRepositoryCommentsClient.cs @@ -31,7 +31,7 @@ namespace Octokit /// The owner of the repository /// The name of the repository /// - Task> GetForRepository(string owner, string name); + Task> GetAllForRepository(string owner, string name); /// /// Gets Commit Comments for a specified Commit. @@ -41,7 +41,7 @@ namespace Octokit /// The name of the repository /// The sha of the commit /// - Task> GetForCommit(string owner, string name, string sha); + Task> GetAllForCommit(string owner, string name, string sha); /// /// Creates a new Commit Comment for a specified Commit. diff --git a/Octokit/Clients/IRepositoryContentsClient.cs b/Octokit/Clients/IRepositoryContentsClient.cs index 89dfa3ec..84b7db96 100644 --- a/Octokit/Clients/IRepositoryContentsClient.cs +++ b/Octokit/Clients/IRepositoryContentsClient.cs @@ -20,7 +20,7 @@ namespace Octokit /// /// A collection of representing the content at the specified path /// - Task> GetContents(string owner, string name, string path); + Task> GetAllContents(string owner, string name, string path); /// /// Gets the preferred README for the specified repository. diff --git a/Octokit/Clients/ITeamsClient.cs b/Octokit/Clients/ITeamsClient.cs index 566fc87c..63f40fa2 100644 --- a/Octokit/Clients/ITeamsClient.cs +++ b/Octokit/Clients/ITeamsClient.cs @@ -41,7 +41,7 @@ namespace Octokit /// https://developer.github.com/v3/orgs/teams/#list-team-members /// /// A list of the team's member s. - Task> GetMembers(int id); + Task> GetAllMembers(int id); /// /// Returns newly created for the current org. @@ -92,7 +92,7 @@ namespace Octokit /// /// Thrown when a general API error occurs. /// The team's repositories - Task> GetRepositories(int id); + Task> GetAllRepositories(int id); /// /// Add a repository to the team diff --git a/Octokit/Clients/IssueCommentsClient.cs b/Octokit/Clients/IssueCommentsClient.cs index 72bdfbf9..1b84f8b2 100644 --- a/Octokit/Clients/IssueCommentsClient.cs +++ b/Octokit/Clients/IssueCommentsClient.cs @@ -42,7 +42,7 @@ namespace Octokit /// The owner of the repository /// The name of the repository /// - public Task> GetForRepository(string owner, string name) + public Task> GetAllForRepository(string owner, string name) { Ensure.ArgumentNotNullOrEmptyString(owner, "owner"); Ensure.ArgumentNotNullOrEmptyString(name, "name"); @@ -58,7 +58,7 @@ namespace Octokit /// The name of the repository /// The issue number /// - public Task> GetForIssue(string owner, string name, int number) + public Task> GetAllForIssue(string owner, string name, int number) { Ensure.ArgumentNotNullOrEmptyString(owner, "owner"); Ensure.ArgumentNotNullOrEmptyString(name, "name"); diff --git a/Octokit/Clients/IssuesClient.cs b/Octokit/Clients/IssuesClient.cs index 4b96db0b..2dbabc89 100644 --- a/Octokit/Clients/IssuesClient.cs +++ b/Octokit/Clients/IssuesClient.cs @@ -164,9 +164,9 @@ namespace Octokit /// The owner of the repository /// The name of the repository /// - public Task> GetForRepository(string owner, string name) + public Task> GetAllForRepository(string owner, string name) { - return GetForRepository(owner, name, new RepositoryIssueRequest()); + return GetAllForRepository(owner, name, new RepositoryIssueRequest()); } /// @@ -179,7 +179,7 @@ namespace Octokit /// The name of the repository /// Used to filter and sort the list of issues returned /// - public Task> GetForRepository(string owner, string name, + public Task> GetAllForRepository(string owner, string name, RepositoryIssueRequest request) { Ensure.ArgumentNotNullOrEmptyString(owner, "owner"); diff --git a/Octokit/Clients/IssuesEventsClient.cs b/Octokit/Clients/IssuesEventsClient.cs index c476683b..836a2913 100644 --- a/Octokit/Clients/IssuesEventsClient.cs +++ b/Octokit/Clients/IssuesEventsClient.cs @@ -27,7 +27,7 @@ namespace Octokit /// The name of the repository /// The issue number /// - public Task> GetForIssue(string owner, string name, int number) + public Task> GetAllForIssue(string owner, string name, int number) { Ensure.ArgumentNotNullOrEmptyString(owner, "owner"); Ensure.ArgumentNotNullOrEmptyString(name, "name"); @@ -44,7 +44,7 @@ namespace Octokit /// The owner of the repository /// The name of the repository /// - public Task> GetForRepository(string owner, string name) + public Task> GetAllForRepository(string owner, string name) { Ensure.ArgumentNotNullOrEmptyString(owner, "owner"); Ensure.ArgumentNotNullOrEmptyString(name, "name"); diff --git a/Octokit/Clients/IssuesLabelsClient.cs b/Octokit/Clients/IssuesLabelsClient.cs index ee640419..36a68c19 100644 --- a/Octokit/Clients/IssuesLabelsClient.cs +++ b/Octokit/Clients/IssuesLabelsClient.cs @@ -20,7 +20,7 @@ namespace Octokit /// The name of the repository /// The number of the issue /// The list of labels - public Task> GetForIssue(string owner, string repo, int number) + public Task> GetAllForIssue(string owner, string repo, int number) { Ensure.ArgumentNotNullOrEmptyString(owner, "owner"); Ensure.ArgumentNotNullOrEmptyString(repo, "repo"); @@ -37,7 +37,7 @@ namespace Octokit /// The owner of the repository /// The name of the repository /// The list of labels - public Task> GetForRepository(string owner, string repo) + public Task> GetAllForRepository(string owner, string repo) { Ensure.ArgumentNotNullOrEmptyString(owner, "owner"); Ensure.ArgumentNotNullOrEmptyString(repo, "repo"); @@ -211,7 +211,7 @@ namespace Octokit /// The name of the repository /// The number of the milestone /// - public Task> GetForMilestone(string owner, string repo, int number) + public Task> GetAllForMilestone(string owner, string repo, int number) { Ensure.ArgumentNotNullOrEmptyString(owner, "owner"); Ensure.ArgumentNotNullOrEmptyString(repo, "repo"); diff --git a/Octokit/Clients/MilestonesClient.cs b/Octokit/Clients/MilestonesClient.cs index c6f1cb58..61b07386 100644 --- a/Octokit/Clients/MilestonesClient.cs +++ b/Octokit/Clients/MilestonesClient.cs @@ -43,9 +43,9 @@ namespace Octokit /// The owner of the repository /// The name of the repository /// - public Task> GetForRepository(string owner, string name) + public Task> GetAllForRepository(string owner, string name) { - return GetForRepository(owner, name, new MilestoneRequest()); + return GetAllForRepository(owner, name, new MilestoneRequest()); } /// @@ -58,7 +58,7 @@ namespace Octokit /// The name of the repository /// Used to filter and sort the list of Milestones returned /// - public Task> GetForRepository(string owner, string name, MilestoneRequest request) + public Task> GetAllForRepository(string owner, string name, MilestoneRequest request) { Ensure.ArgumentNotNullOrEmptyString(owner, "owner"); Ensure.ArgumentNotNullOrEmptyString(name, "name"); diff --git a/Octokit/Clients/MiscellaneousClient.cs b/Octokit/Clients/MiscellaneousClient.cs index 76dac9ae..05025a36 100644 --- a/Octokit/Clients/MiscellaneousClient.cs +++ b/Octokit/Clients/MiscellaneousClient.cs @@ -34,7 +34,7 @@ namespace Octokit /// /// Thrown when a general API error occurs. /// An of emoji and their URI. - public async Task> GetEmojis() + public async Task> GetAllEmojis() { var endpoint = new Uri("emojis", UriKind.Relative); var response = await _connection.Get>(endpoint, null, null) @@ -61,7 +61,7 @@ namespace Octokit /// List all templates available to pass as an option when creating a repository. /// /// A list of template names - public async Task> GetGitIgnoreTemplates() + public async Task> GetAllGitIgnoreTemplates() { var endpoint = new Uri("gitignore/templates", UriKind.Relative); @@ -92,7 +92,7 @@ namespace Octokit /// /// This is a PREVIEW API! Use it at your own risk. /// A list of licenses available on the site - public async Task> GetLicenses() + public async Task> GetAllLicenses() { const string previewAcceptsHeader = "application/vnd.github.drax-preview+json"; var endpoint = new Uri("licenses", UriKind.Relative); diff --git a/Octokit/Clients/OrganizationMembersClient.cs b/Octokit/Clients/OrganizationMembersClient.cs index 76a5e756..d8fe75cf 100644 --- a/Octokit/Clients/OrganizationMembersClient.cs +++ b/Octokit/Clients/OrganizationMembersClient.cs @@ -118,7 +118,7 @@ namespace Octokit /// http://developer.github.com/v3/orgs/members/#public-members-list /// The login for the organization /// - public Task> GetPublic(string org) + public Task> GetAllPublic(string org) { Ensure.ArgumentNotNullOrEmptyString(org, "org"); diff --git a/Octokit/Clients/PullRequestReviewCommentsClient.cs b/Octokit/Clients/PullRequestReviewCommentsClient.cs index b171a61f..5d8363b2 100644 --- a/Octokit/Clients/PullRequestReviewCommentsClient.cs +++ b/Octokit/Clients/PullRequestReviewCommentsClient.cs @@ -40,9 +40,9 @@ namespace Octokit /// The owner of the repository /// The name of the repository /// The list of s for the specified repository - public Task> GetForRepository(string owner, string name) + public Task> GetAllForRepository(string owner, string name) { - return GetForRepository(owner, name, new PullRequestReviewCommentRequest()); + return GetAllForRepository(owner, name, new PullRequestReviewCommentRequest()); } /// @@ -53,7 +53,7 @@ namespace Octokit /// The name of the repository /// The sorting parameters /// The list of s for the specified repository - public Task> GetForRepository(string owner, string name, PullRequestReviewCommentRequest request) + public Task> GetAllForRepository(string owner, string name, PullRequestReviewCommentRequest request) { Ensure.ArgumentNotNullOrEmptyString(owner, "owner"); Ensure.ArgumentNotNullOrEmptyString(name, "name"); diff --git a/Octokit/Clients/PullRequestsClient.cs b/Octokit/Clients/PullRequestsClient.cs index bb449f9d..90c035f1 100644 --- a/Octokit/Clients/PullRequestsClient.cs +++ b/Octokit/Clients/PullRequestsClient.cs @@ -40,9 +40,9 @@ namespace Octokit /// The owner of the repository /// The name of the repository /// A of s which are currently open - public Task> GetForRepository(string owner, string name) + public Task> GetAllForRepository(string owner, string name) { - return GetForRepository(owner, name, new PullRequestRequest()); + return GetAllForRepository(owner, name, new PullRequestRequest()); } /// @@ -55,7 +55,7 @@ namespace Octokit /// The name of the repository /// Used to filter and sort the list of pull requests returned /// A of s which match the criteria - public Task> GetForRepository(string owner, string name, PullRequestRequest request) + public Task> GetAllForRepository(string owner, string name, PullRequestRequest request) { Ensure.ArgumentNotNullOrEmptyString(owner, "owner"); Ensure.ArgumentNotNullOrEmptyString(name, "name"); diff --git a/Octokit/Clients/ReleasesClient.cs b/Octokit/Clients/ReleasesClient.cs index 934ba1b6..d832de92 100644 --- a/Octokit/Clients/ReleasesClient.cs +++ b/Octokit/Clients/ReleasesClient.cs @@ -134,7 +134,7 @@ namespace Octokit /// The id of the . /// Thrown when a general API error occurs. /// The list of for the specified release of the specified repository. - public Task> GetAssets(string owner, string name, int id) + public Task> GetAllAssets(string owner, string name, int id) { Ensure.ArgumentNotNullOrEmptyString(owner, "owner"); Ensure.ArgumentNotNullOrEmptyString(name, "name"); diff --git a/Octokit/Clients/RepositoryCommentsClient.cs b/Octokit/Clients/RepositoryCommentsClient.cs index f4017a2a..a196c287 100644 --- a/Octokit/Clients/RepositoryCommentsClient.cs +++ b/Octokit/Clients/RepositoryCommentsClient.cs @@ -44,7 +44,7 @@ namespace Octokit /// The owner of the repository /// The name of the repository /// - public Task> GetForRepository(string owner, string name) + public Task> GetAllForRepository(string owner, string name) { Ensure.ArgumentNotNullOrEmptyString(owner, "owner"); Ensure.ArgumentNotNullOrEmptyString(name, "name"); @@ -60,7 +60,7 @@ namespace Octokit /// The name of the repository /// The sha of the commit /// - public Task> GetForCommit(string owner, string name, string sha) + public Task> GetAllForCommit(string owner, string name, string sha) { Ensure.ArgumentNotNullOrEmptyString(owner, "owner"); Ensure.ArgumentNotNullOrEmptyString(name, "name"); diff --git a/Octokit/Clients/RepositoryContentsClient.cs b/Octokit/Clients/RepositoryContentsClient.cs index 5b08e43c..5cf1caae 100644 --- a/Octokit/Clients/RepositoryContentsClient.cs +++ b/Octokit/Clients/RepositoryContentsClient.cs @@ -24,7 +24,7 @@ namespace Octokit /// /// A collection of representing the content at the specified path /// - public async Task> GetContents(string owner, string name, string path) + public async Task> GetAllContents(string owner, string name, string path) { Ensure.ArgumentNotNullOrEmptyString(owner, "owner"); Ensure.ArgumentNotNullOrEmptyString(name, "name"); diff --git a/Octokit/Clients/TeamsClient.cs b/Octokit/Clients/TeamsClient.cs index e3287588..3cacc7dc 100644 --- a/Octokit/Clients/TeamsClient.cs +++ b/Octokit/Clients/TeamsClient.cs @@ -60,7 +60,7 @@ namespace Octokit /// https://developer.github.com/v3/orgs/teams/#list-team-members /// /// A list of the team's member s. - public Task> GetMembers(int id) + public Task> GetAllMembers(int id) { var endpoint = ApiUrls.TeamMembers(id); @@ -158,7 +158,7 @@ namespace Octokit /// /// Thrown when a general API error occurs. /// The team's repositories - public Task> GetRepositories(int id) + public Task> GetAllRepositories(int id) { var endpoint = ApiUrls.TeamRepositories(id); From 2427ab6922f87928bca18ff2a41574e655d3795b Mon Sep 17 00:00:00 2001 From: Henrik Andersson Date: Tue, 24 Mar 2015 00:12:41 +1000 Subject: [PATCH 05/13] Update observable clients --- .../Clients/IObservableAssigneesClient.cs | 2 +- Octokit.Reactive/Clients/IObservableEventsClient.cs | 10 +++++----- .../Clients/IObservableFollowersClient.cs | 4 ++-- .../Clients/IObservableGistCommentsClient.cs | 2 +- .../Clients/IObservableIssueCommentsClient.cs | 4 ++-- Octokit.Reactive/Clients/IObservableIssuesClient.cs | 4 ++-- .../Clients/IObservableIssuesEventsClient.cs | 4 ++-- .../Clients/IObservableIssuesLabelsClient.cs | 6 +++--- .../Clients/IObservableMilestonesClient.cs | 4 ++-- .../Clients/IObservableMiscellaneousClient.cs | 6 +++--- .../Clients/IObservableOrganizationMembersClient.cs | 2 +- .../IObservablePullRequestReviewCommentsClient.cs | 4 ++-- .../Clients/IObservablePullRequestsClient.cs | 4 ++-- .../Clients/IObservableReleasesClient.cs | 2 +- .../Clients/IObservableRepositoryCommentsClient.cs | 4 ++-- .../Clients/IObservableRepositoryContentsClient.cs | 2 +- Octokit.Reactive/Clients/IObservableTeamsClient.cs | 4 ++-- .../Clients/ObservableAssigneesClient.cs | 2 +- Octokit.Reactive/Clients/ObservableEventsClient.cs | 10 +++++----- .../Clients/ObservableFollowersClient.cs | 4 ++-- .../Clients/ObservableGistCommentsClient.cs | 2 +- .../Clients/ObservableIssueCommentsClient.cs | 4 ++-- Octokit.Reactive/Clients/ObservableIssuesClient.cs | 6 +++--- .../Clients/ObservableIssuesEventsClient.cs | 4 ++-- .../Clients/ObservableIssuesLabelsClient.cs | 6 +++--- .../Clients/ObservableMilestonesClient.cs | 4 ++-- .../Clients/ObservableMiscellaneousClient.cs | 12 ++++++------ .../Clients/ObservableOrganizationMembersClient.cs | 2 +- .../ObservablePullRequestReviewCommentsClient.cs | 6 +++--- .../Clients/ObservablePullRequestsClient.cs | 4 ++-- Octokit.Reactive/Clients/ObservableReleasesClient.cs | 2 +- .../Clients/ObservableRepositoryCommentsClient.cs | 4 ++-- .../Clients/ObservableRepositoryContentsClient.cs | 2 +- Octokit.Reactive/Clients/ObservableTeamsClient.cs | 4 ++-- 34 files changed, 73 insertions(+), 73 deletions(-) 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/IObservableFollowersClient.cs b/Octokit.Reactive/Clients/IObservableFollowersClient.cs index bae85c30..b867e970 100644 --- a/Octokit.Reactive/Clients/IObservableFollowersClient.cs +++ b/Octokit.Reactive/Clients/IObservableFollowersClient.cs @@ -38,7 +38,7 @@ namespace Octokit.Reactive /// /// A of s that the authenticated user follows. [SuppressMessage("Microsoft.Design", "CA1024:UsePropertiesWhereAppropriate")] - IObservable GetFollowingForCurrent(); + IObservable GetAllFollowingForCurrent(); /// /// List who a user is following @@ -48,7 +48,7 @@ namespace Octokit.Reactive /// See the API documentation for more information. /// /// A of s that the passed user follows. - IObservable GetFollowing(string login); + IObservable GetAllFollowing(string login); /// /// Check if the authenticated user follows another user 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