New GetAll overload added for ObservableDeploymentsClient

This commit is contained in:
aedampir@gmail.com
2016-03-25 15:51:37 +07:00
parent e328911fc6
commit ad15e05471
2 changed files with 34 additions and 0 deletions

View File

@@ -16,6 +16,19 @@ namespace Octokit.Reactive
/// <returns>All the <see cref="Deployment"/>s for the specified repository.</returns>
IObservable<Deployment> GetAll(string owner, string name);
/// <summary>
/// Gets all the deployments for the specified repository. Any user with pull access
/// to a repository can view deployments.
/// </summary>
/// <remarks>
/// http://developer.github.com/v3/repos/deployments/#list-deployments
/// </remarks>
/// <param name="owner">The owner of the repository</param>
/// <param name="name">The name of the repository</param>
/// <param name="options">Options for changing the API response</param>
/// <returns>All the <see cref="Deployment"/>s for the specified repository.</returns>
IObservable<Deployment> GetAll(string owner, string name, ApiOptions options);
/// <summary>
/// Creates a new deployment for the specified repository.
/// Users with push access can create a deployment for a given ref.

View File

@@ -38,6 +38,27 @@ namespace Octokit.Reactive.Clients
ApiUrls.Deployments(owner, name));
}
/// <summary>
/// Gets all the deployments for the specified repository. Any user with pull access
/// to a repository can view deployments.
/// </summary>
/// <remarks>
/// http://developer.github.com/v3/repos/deployments/#list-deployments
/// </remarks>
/// <param name="owner">The owner of the repository</param>
/// <param name="name">The name of the repository</param>
/// <param name="options">Options for changing the API response</param>
/// <returns>All the <see cref="Deployment"/>s for the specified repository.</returns>
public IObservable<Deployment> GetAll(string owner, string name, ApiOptions options)
{
Ensure.ArgumentNotNullOrEmptyString(owner, "owner");
Ensure.ArgumentNotNullOrEmptyString(name, "name");
Ensure.ArgumentNotNull(options, "options");
return _connection.GetAndFlattenAllPages<Deployment>(
ApiUrls.Deployments(owner, name), options);
}
/// <summary>
/// Creates a new deployment for the specified repository.
/// Users with push access can create a deployment for a given ref.