Added a get all organizations method (#1469)

* Update IOrganizationsClient.cs

* Added the Uri for the organizations

Renamed the existing organizations uri to userOrganizations and created a new organizations uri.

* Implementation of the GetAllOrganizations

* Interface modification for the GetAllOrganizations

* Implementation of the GetAllOrganizations

* Created the tests for the two new methods

* remove new line

* Reverted the changes i did to the ApiUrls class to be backward compatible.
Created new client method and marked the old one [Obsolete] to be removed in a futur release.
Created a new request class to support the since attribute.
Updated the Unit Tests
Updated all the csproj to have the proper references.

* Renamed test

* Deprecated the Organizations method to be replaced by the new UserOrganizations method.

* Created 2 new test for the getAll method.
Renamed the existing one to make it clear they test the user organization.

* tweaks to integration tests
This commit is contained in:
malamour-work
2016-11-21 08:54:27 -05:00
committed by Ryan Gribble
parent 88e5342562
commit 195de689ff
15 changed files with 424 additions and 29 deletions

View File

@@ -46,6 +46,7 @@ namespace Octokit.Reactive
/// </summary>
/// <param name="user">The login for the user</param>
/// <returns></returns>
[Obsolete("Please use IObservableOrganizationsClient.GetAllForUser() instead. This method will be removed in a future version")]
IObservable<Organization> GetAll(string user);
/// <summary>
@@ -54,8 +55,37 @@ namespace Octokit.Reactive
/// <param name="user">The login for the user</param>
/// <param name="options">Options for changing the API response</param>
/// <returns></returns>
[Obsolete("Please use IObservableOrganizationsClient.GetAllForUser() instead. This method will be removed in a future version")]
IObservable<Organization> GetAll(string user, ApiOptions options);
/// <summary>
/// Returns all the organizations for the specified user
/// </summary>
/// <param name="user">The login for the user</param>
/// <returns></returns>
IObservable<Organization> GetAllForUser(string user);
/// <summary>
/// Returns all the organizations for the specified user
/// </summary>
/// <param name="user">The login for the user</param>
/// <param name="options">Options for changing the API response</param>
/// <returns></returns>
IObservable<Organization> GetAllForUser(string user, ApiOptions options);
/// <summary>
/// Returns all the organizations
/// </summary>
/// <returns></returns>
IObservable<Organization> GetAll();
/// <summary>
/// Returns all the organizations
/// </summary>
/// <param name="request">Search parameters of the last organization seen</param>
/// <returns></returns>
IObservable<Organization> GetAll(OrganizationRequest request);
/// <summary>
/// Update the specified organization with data from <see cref="OrganizationUpdate"/>.
/// </summary>