diff --git a/Octokit.Reactive/Clients/IObservableRepositoriesClient.cs b/Octokit.Reactive/Clients/IObservableRepositoriesClient.cs index f587e23557..db7bd46db3 100644 --- a/Octokit.Reactive/Clients/IObservableRepositoriesClient.cs +++ b/Octokit.Reactive/Clients/IObservableRepositoriesClient.cs @@ -276,6 +276,7 @@ public interface IObservableRepositoriesClient /// /// See the Collaborators API documentation for more details /// + [Obsolete("Collaborator information is now available under the Collaborator property. This will be removed in a future update.")] IObservableRepoCollaboratorsClient RepoCollaborators { get; } /// diff --git a/Octokit.Reactive/Clients/ObservableRepoCollaboratorsClient.cs b/Octokit.Reactive/Clients/ObservableRepoCollaboratorsClient.cs index cf5f2a0e13..b54c8705f7 100644 --- a/Octokit.Reactive/Clients/ObservableRepoCollaboratorsClient.cs +++ b/Octokit.Reactive/Clients/ObservableRepoCollaboratorsClient.cs @@ -14,7 +14,7 @@ public ObservableRepoCollaboratorsClient(IGitHubClient client) { Ensure.ArgumentNotNull(client, "client"); - _client = client.Repository.RepoCollaborators; + _client = client.Repository.Collaborator; _connection = client.Connection; } diff --git a/Octokit.Reactive/Clients/ObservableRepositoriesClient.cs b/Octokit.Reactive/Clients/ObservableRepositoriesClient.cs index 9d0bb12831..54e5738864 100644 --- a/Octokit.Reactive/Clients/ObservableRepositoriesClient.cs +++ b/Octokit.Reactive/Clients/ObservableRepositoriesClient.cs @@ -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); @@ -412,8 +415,17 @@ public IObservable Compare(string owner, string name, string @bas /// /// See the Collaborators API documentation for more details /// + [Obsolete("Collaborator information is now available under the Collaborator property. This will be removed in a future update.")] public IObservableRepoCollaboratorsClient RepoCollaborators { get; private set; } + /// + /// A client for GitHub's Repo Collaborators. + /// + /// + /// See the Collaborators API documentation for more details + /// + public IObservableRepoCollaboratorsClient Collaborator { get; private set; } + /// /// Client for GitHub's Repository Commits API /// diff --git a/Octokit.Reactive/Octokit.Reactive.csproj b/Octokit.Reactive/Octokit.Reactive.csproj index b7c2ea0a24..d25d860ae6 100644 --- a/Octokit.Reactive/Octokit.Reactive.csproj +++ b/Octokit.Reactive/Octokit.Reactive.csproj @@ -201,4 +201,4 @@ --> - + \ No newline at end of file diff --git a/Octokit/Clients/IRepositoriesClient.cs b/Octokit/Clients/IRepositoriesClient.cs index 2243dcd94b..5e5d08b013 100644 --- a/Octokit/Clients/IRepositoriesClient.cs +++ b/Octokit/Clients/IRepositoriesClient.cs @@ -205,8 +205,17 @@ public interface IRepositoriesClient /// /// See the Collaborators API documentation for more details /// + [System.Obsolete("Collaborator information is now available under the Collaborator property. This will be removed in a future update.")] IRepoCollaboratorsClient RepoCollaborators { get; } + /// + /// A client for GitHub's Repo Collaborators. + /// + /// + /// See the Collaborators API documentation for more details + /// + IRepoCollaboratorsClient Collaborator { get; } + /// /// Client for GitHub's Repository Deployments API /// diff --git a/Octokit/Clients/RepositoriesClient.cs b/Octokit/Clients/RepositoriesClient.cs index 1f9f55e7ed..7f9bdb4928 100644 --- a/Octokit/Clients/RepositoriesClient.cs +++ b/Octokit/Clients/RepositoriesClient.cs @@ -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); @@ -326,8 +329,17 @@ public Task> GetAllForOrg(string organization) /// /// See the Collaborators API documentation for more details /// + [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; } + /// + /// A client for GitHub's Repo Collaborators. + /// + /// + /// See the Collaborators API documentation for more details + /// + public IRepoCollaboratorsClient Collaborator { get; private set; } + /// /// Client for GitHub's Repository Deployments API ///