added missing method/property to IObservableRepositoriesClient

This commit is contained in:
Brendan Forster
2014-02-07 11:23:04 +11:00
parent 32b894c3a0
commit b080595657
2 changed files with 44 additions and 0 deletions
@@ -98,5 +98,25 @@ namespace Octokit.Reactive
/// that announced this feature.
/// </remarks>
IObservableCommitStatusClient CommitStatus { 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>
IObservableRepoCollaboratorsClient RepoCollaborators { get; }
/// <summary>
/// Gets all the branches for the specified repository.
/// </summary>
/// <remarks>
/// See the <a href="http://developer.github.com/v3/repos/#list-branches">API documentation</a> for more details
/// </remarks>
/// <param name="owner">The owner of the repository</param>
/// <param name="name">The name of the repository</param>
/// <exception cref="ApiException">Thrown when a general API error occurs.</exception>
/// <returns></returns>
IObservable<Branch> GetAllBranches(string owner, string name);
}
}
@@ -17,6 +17,7 @@ namespace Octokit.Reactive
_client = client.Repository;
_connection = client.Connection;
CommitStatus = new ObservableCommitStatusClient(client);
RepoCollaborators = new ObservableRepoCollaboratorsClient(client);
}
/// <summary>
@@ -147,6 +148,21 @@ namespace Octokit.Reactive
return _client.GetReadmeHtml(owner, name).ToObservable();
}
/// <summary>
/// Gets all the branches for the specified repository.
/// </summary>
/// <remarks>
/// See the <a href="http://developer.github.com/v3/repos/#list-branches">API documentation</a> for more details
/// </remarks>
/// <param name="owner">The owner of the repository</param>
/// <param name="name">The name of the repository</param>
/// <exception cref="ApiException">Thrown when a general API error occurs.</exception>
/// <returns></returns>
public IObservable<Branch> GetAllBranches(string owner, string name)
{
return _connection.GetAndFlattenAllPages<Branch>(ApiUrls.RepoBranches(owner, name));
}
/// <summary>
/// A client for GitHub's Commit Status API.
/// </summary>
@@ -156,5 +172,13 @@ namespace Octokit.Reactive
/// that announced this feature.
/// </remarks>
public IObservableCommitStatusClient CommitStatus { 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 RepoCollaborators { get; private set; }
}
}