Skip to content

Commit

Permalink
IRepositoriesClient.RepoCollaborators -> IRepositoriesClient.Collabor…
Browse files Browse the repository at this point in the history
…ator
  • Loading branch information
M-Zuber committed Dec 23, 2015
1 parent 2ede6e2 commit a7a1c01
Show file tree
Hide file tree
Showing 6 changed files with 36 additions and 2 deletions.
1 change: 1 addition & 0 deletions Octokit.Reactive/Clients/IObservableRepositoriesClient.cs
Original file line number Diff line number Diff line change
Expand Up @@ -276,6 +276,7 @@ public interface IObservableRepositoriesClient
/// <remarks>
/// See the <a href="http://developer.github.com/v3/repos/collaborators/">Collaborators API documentation</a> for more details
/// </remarks>
[Obsolete("Collaborator information is now available under the Collaborator property. This will be removed in a future update.")]
IObservableRepoCollaboratorsClient RepoCollaborators { get; }

/// <summary>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ public ObservableRepoCollaboratorsClient(IGitHubClient client)
{
Ensure.ArgumentNotNull(client, "client");

_client = client.Repository.RepoCollaborators;
_client = client.Repository.Collaborator;
_connection = client.Connection;
}

Expand Down
12 changes: 12 additions & 0 deletions Octokit.Reactive/Clients/ObservableRepositoriesClient.cs
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,10 @@ public ObservableRepositoriesClient(IGitHubClient client)
CommitStatus = new ObservableCommitStatusClient(client);
Hooks = new ObservableRepositoryHooksClient(client);
Forks = new ObservableRepositoryForksClient(client);
#pragma warning disable CS0618 // Type or member is obsolete
RepoCollaborators = new ObservableRepoCollaboratorsClient(client);
#pragma warning restore CS0618 // Type or member is obsolete
Collaborator = new ObservableRepoCollaboratorsClient(client);
Deployment = new ObservableDeploymentsClient(client);
Statistics = new ObservableStatisticsClient(client);
PullRequest = new ObservablePullRequestsClient(client);
Expand Down Expand Up @@ -412,8 +415,17 @@ public IObservable<CompareResult> Compare(string owner, string name, string @bas
/// <remarks>
/// See the <a href="http://developer.github.com/v3/repos/collaborators/">Collaborators API documentation</a> for more details
/// </remarks>
[Obsolete("Collaborator information is now available under the Collaborator property. This will be removed in a future update.")]
public IObservableRepoCollaboratorsClient RepoCollaborators { get; private set; }

/// <summary>
/// A client for GitHub's Repo Collaborators.
/// </summary>
/// <remarks>
/// See the <a href="http://developer.github.com/v3/repos/collaborators/">Collaborators API documentation</a> for more details
/// </remarks>
public IObservableRepoCollaboratorsClient Collaborator { get; private set; }

/// <summary>
/// Client for GitHub's Repository Commits API
/// </summary>
Expand Down
2 changes: 1 addition & 1 deletion Octokit.Reactive/Octokit.Reactive.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -201,4 +201,4 @@
<Target Name="AfterBuild">
</Target>
-->
</Project>
</Project>
9 changes: 9 additions & 0 deletions Octokit/Clients/IRepositoriesClient.cs
Original file line number Diff line number Diff line change
Expand Up @@ -205,8 +205,17 @@ public interface IRepositoriesClient
/// <remarks>
/// See the <a href="http://developer.github.com/v3/repos/collaborators/">Collaborators API documentation</a> for more details
/// </remarks>
[System.Obsolete("Collaborator information is now available under the Collaborator property. This will be removed in a future update.")]
IRepoCollaboratorsClient RepoCollaborators { get; }

/// <summary>
/// A client for GitHub's Repo Collaborators.
/// </summary>
/// <remarks>
/// See the <a href="http://developer.github.com/v3/repos/collaborators/">Collaborators API documentation</a> for more details
/// </remarks>
IRepoCollaboratorsClient Collaborator { get; }

/// <summary>
/// Client for GitHub's Repository Deployments API
/// </summary>
Expand Down
12 changes: 12 additions & 0 deletions Octokit/Clients/RepositoriesClient.cs
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,10 @@ public RepositoriesClient(IApiConnection apiConnection) : base(apiConnection)
CommitStatus = new CommitStatusClient(apiConnection);
Hooks = new RepositoryHooksClient(apiConnection);
Forks = new RepositoryForksClient(apiConnection);
#pragma warning disable CS0618 // Type or member is obsolete
RepoCollaborators = new RepoCollaboratorsClient(apiConnection);
#pragma warning restore CS0618 // Type or member is obsolete
Collaborator = new RepoCollaboratorsClient(apiConnection);
Statistics = new StatisticsClient(apiConnection);
Deployment = new DeploymentsClient(apiConnection);
PullRequest = new PullRequestsClient(apiConnection);
Expand Down Expand Up @@ -326,8 +329,17 @@ public Task<IReadOnlyList<Repository>> GetAllForOrg(string organization)
/// <remarks>
/// See the <a href="http://developer.github.com/v3/repos/collaborators/">Collaborators API documentation</a> for more details
/// </remarks>
[System.Obsolete("Collaborator information is now available under the Collaborator property. This will be removed in a future update.")]
public IRepoCollaboratorsClient RepoCollaborators { get; private set; }

/// <summary>
/// A client for GitHub's Repo Collaborators.
/// </summary>
/// <remarks>
/// See the <a href="http://developer.github.com/v3/repos/collaborators/">Collaborators API documentation</a> for more details
/// </remarks>
public IRepoCollaboratorsClient Collaborator { get; private set; }

/// <summary>
/// Client for GitHub's Repository Deployments API
/// </summary>
Expand Down

0 comments on commit a7a1c01

Please sign in to comment.