mirror of
https://github.com/zoriya/octokit.net.git
synced 2025-12-20 06:05:12 +00:00
added new overloads
This commit is contained in:
@@ -32,6 +32,18 @@ namespace Octokit.Reactive
|
|||||||
/// <returns>A collection of <see cref="PullRequest"/> results</returns>
|
/// <returns>A collection of <see cref="PullRequest"/> results</returns>
|
||||||
IObservable<PullRequest> GetAllForRepository(string owner, string name);
|
IObservable<PullRequest> GetAllForRepository(string owner, string name);
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Gets all open pull requests for the repository.
|
||||||
|
/// </summary>
|
||||||
|
/// <remarks>
|
||||||
|
/// http://developer.github.com/v3/pulls/#list-pull-requests
|
||||||
|
/// </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>A collection of <see cref="PullRequest"/> results</returns>
|
||||||
|
IObservable<PullRequest> GetAllForRepository(string owner, string name, ApiOptions options);
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Query pull requests for the repository based on criteria
|
/// Query pull requests for the repository based on criteria
|
||||||
/// </summary>
|
/// </summary>
|
||||||
@@ -44,6 +56,19 @@ namespace Octokit.Reactive
|
|||||||
/// <returns>A collection of <see cref="PullRequest"/> results</returns>
|
/// <returns>A collection of <see cref="PullRequest"/> results</returns>
|
||||||
IObservable<PullRequest> GetAllForRepository(string owner, string name, PullRequestRequest request);
|
IObservable<PullRequest> GetAllForRepository(string owner, string name, PullRequestRequest request);
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Query pull requests for the repository based on criteria
|
||||||
|
/// </summary>
|
||||||
|
/// <remarks>
|
||||||
|
/// http://developer.github.com/v3/pulls/#list-pull-requests
|
||||||
|
/// </remarks>
|
||||||
|
/// <param name="owner">The owner of the repository</param>
|
||||||
|
/// <param name="name">The name of the repository</param>
|
||||||
|
/// <param name="request">Used to filter and sort the list of pull requests returned</param>
|
||||||
|
/// <param name="options">Options for changing the API response</param>
|
||||||
|
/// <returns>A collection of <see cref="PullRequest"/> results</returns>
|
||||||
|
IObservable<PullRequest> GetAllForRepository(string owner, string name, PullRequestRequest request, ApiOptions options);
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Creates a pull request for the specified repository.
|
/// Creates a pull request for the specified repository.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
|
|||||||
@@ -49,7 +49,29 @@ namespace Octokit.Reactive
|
|||||||
/// <returns>A collection of <see cref="PullRequest"/> results</returns>
|
/// <returns>A collection of <see cref="PullRequest"/> results</returns>
|
||||||
public IObservable<PullRequest> GetAllForRepository(string owner, string name)
|
public IObservable<PullRequest> GetAllForRepository(string owner, string name)
|
||||||
{
|
{
|
||||||
return _connection.GetAndFlattenAllPages<PullRequest>(ApiUrls.PullRequests(owner, name));
|
Ensure.ArgumentNotNullOrEmptyString(owner, "owner");
|
||||||
|
Ensure.ArgumentNotNullOrEmptyString(name, "name");
|
||||||
|
|
||||||
|
return GetAllForRepository(owner, name, ApiOptions.None);
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Gets all open pull requests for the repository.
|
||||||
|
/// </summary>
|
||||||
|
/// <remarks>
|
||||||
|
/// http://developer.github.com/v3/pulls/#list-pull-requests
|
||||||
|
/// </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>A collection of <see cref="PullRequest"/> results</returns>
|
||||||
|
public IObservable<PullRequest> GetAllForRepository(string owner, string name, ApiOptions options)
|
||||||
|
{
|
||||||
|
Ensure.ArgumentNotNullOrEmptyString(owner, "owner");
|
||||||
|
Ensure.ArgumentNotNullOrEmptyString(name, "name");
|
||||||
|
Ensure.ArgumentNotNull(options, "options");
|
||||||
|
|
||||||
|
return _connection.GetAndFlattenAllPages<PullRequest>(ApiUrls.PullRequests(owner, name), options);
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
@@ -68,8 +90,29 @@ namespace Octokit.Reactive
|
|||||||
Ensure.ArgumentNotNullOrEmptyString(name, "name");
|
Ensure.ArgumentNotNullOrEmptyString(name, "name");
|
||||||
Ensure.ArgumentNotNull(request, "request");
|
Ensure.ArgumentNotNull(request, "request");
|
||||||
|
|
||||||
|
return GetAllForRepository(owner, name, request, ApiOptions.None);
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Query pull requests for the repository based on criteria
|
||||||
|
/// </summary>
|
||||||
|
/// <remarks>
|
||||||
|
/// http://developer.github.com/v3/pulls/#list-pull-requests
|
||||||
|
/// </remarks>
|
||||||
|
/// <param name="owner">The owner of the repository</param>
|
||||||
|
/// <param name="name">The name of the repository</param>
|
||||||
|
/// <param name="request">Used to filter and sort the list of pull requests returned</param>
|
||||||
|
/// <param name="options">Options for changing the API response</param>
|
||||||
|
/// <returns>A collection of <see cref="PullRequest"/> results</returns>
|
||||||
|
public IObservable<PullRequest> GetAllForRepository(string owner, string name, PullRequestRequest request, ApiOptions options)
|
||||||
|
{
|
||||||
|
Ensure.ArgumentNotNullOrEmptyString(owner, "owner");
|
||||||
|
Ensure.ArgumentNotNullOrEmptyString(name, "name");
|
||||||
|
Ensure.ArgumentNotNull(request, "request");
|
||||||
|
Ensure.ArgumentNotNull(options, "options");
|
||||||
|
|
||||||
return _connection.GetAndFlattenAllPages<PullRequest>(ApiUrls.PullRequests(owner, name),
|
return _connection.GetAndFlattenAllPages<PullRequest>(ApiUrls.PullRequests(owner, name),
|
||||||
request.ToParametersDictionary());
|
request.ToParametersDictionary(), options);
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
|
|||||||
@@ -33,6 +33,18 @@ namespace Octokit
|
|||||||
/// <returns>A <see cref="IReadOnlyList{PullRequest}"/> of <see cref="PullRequest"/>s which are currently open</returns>
|
/// <returns>A <see cref="IReadOnlyList{PullRequest}"/> of <see cref="PullRequest"/>s which are currently open</returns>
|
||||||
Task<IReadOnlyList<PullRequest>> GetAllForRepository(string owner, string name);
|
Task<IReadOnlyList<PullRequest>> GetAllForRepository(string owner, string name);
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Get all open pull requests for the repository.
|
||||||
|
/// </summary>
|
||||||
|
/// <remarks>
|
||||||
|
/// http://developer.github.com/v3/pulls/#list-pull-requests
|
||||||
|
/// </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>A <see cref="IReadOnlyList{PullRequest}"/> of <see cref="PullRequest"/>s which are currently open</returns>
|
||||||
|
Task<IReadOnlyList<PullRequest>> GetAllForRepository(string owner, string name, ApiOptions options);
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Query pull requests for the repository based on criteria
|
/// Query pull requests for the repository based on criteria
|
||||||
/// </summary>
|
/// </summary>
|
||||||
@@ -45,6 +57,19 @@ namespace Octokit
|
|||||||
/// <returns>A <see cref="IReadOnlyList{PullRequest}"/> of <see cref="PullRequest"/>s which match the criteria</returns>
|
/// <returns>A <see cref="IReadOnlyList{PullRequest}"/> of <see cref="PullRequest"/>s which match the criteria</returns>
|
||||||
Task<IReadOnlyList<PullRequest>> GetAllForRepository(string owner, string name, PullRequestRequest request);
|
Task<IReadOnlyList<PullRequest>> GetAllForRepository(string owner, string name, PullRequestRequest request);
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Query pull requests for the repository based on criteria
|
||||||
|
/// </summary>
|
||||||
|
/// <remarks>
|
||||||
|
/// http://developer.github.com/v3/pulls/#list-pull-requests
|
||||||
|
/// </remarks>
|
||||||
|
/// <param name="owner">The owner of the repository</param>
|
||||||
|
/// <param name="name">The name of the repository</param>
|
||||||
|
/// <param name="request">Used to filter and sort the list of pull requests returned</param>
|
||||||
|
/// <param name="options">Options for changing the API response</param>
|
||||||
|
/// <returns>A <see cref="IReadOnlyList{PullRequest}"/> of <see cref="PullRequest"/>s which match the criteria</returns>
|
||||||
|
Task<IReadOnlyList<PullRequest>> GetAllForRepository(string owner, string name, PullRequestRequest request, ApiOptions options);
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Create a pull request for the specified repository.
|
/// Create a pull request for the specified repository.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
|
|||||||
@@ -42,7 +42,29 @@ namespace Octokit
|
|||||||
/// <returns>A <see cref="IReadOnlyList{PullRequest}"/> of <see cref="PullRequest"/>s which are currently open</returns>
|
/// <returns>A <see cref="IReadOnlyList{PullRequest}"/> of <see cref="PullRequest"/>s which are currently open</returns>
|
||||||
public Task<IReadOnlyList<PullRequest>> GetAllForRepository(string owner, string name)
|
public Task<IReadOnlyList<PullRequest>> GetAllForRepository(string owner, string name)
|
||||||
{
|
{
|
||||||
return GetAllForRepository(owner, name, new PullRequestRequest());
|
Ensure.ArgumentNotNullOrEmptyString(owner, "owner");
|
||||||
|
Ensure.ArgumentNotNullOrEmptyString(name, "name");
|
||||||
|
|
||||||
|
return GetAllForRepository(owner, name, new PullRequestRequest(), ApiOptions.None);
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Get all open pull requests for the repository.
|
||||||
|
/// </summary>
|
||||||
|
/// <remarks>
|
||||||
|
/// http://developer.github.com/v3/pulls/#list-pull-requests
|
||||||
|
/// </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>A <see cref="IReadOnlyList{PullRequest}"/> of <see cref="PullRequest"/>s which are currently open</returns>
|
||||||
|
public Task<IReadOnlyList<PullRequest>> GetAllForRepository(string owner, string name, ApiOptions options)
|
||||||
|
{
|
||||||
|
Ensure.ArgumentNotNullOrEmptyString(owner, "owner");
|
||||||
|
Ensure.ArgumentNotNullOrEmptyString(name, "name");
|
||||||
|
Ensure.ArgumentNotNull(options, "options");
|
||||||
|
|
||||||
|
return GetAllForRepository(owner, name, new PullRequestRequest(), options);
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
@@ -61,8 +83,29 @@ namespace Octokit
|
|||||||
Ensure.ArgumentNotNullOrEmptyString(name, "name");
|
Ensure.ArgumentNotNullOrEmptyString(name, "name");
|
||||||
Ensure.ArgumentNotNull(request, "request");
|
Ensure.ArgumentNotNull(request, "request");
|
||||||
|
|
||||||
|
return GetAllForRepository(owner, name, request, ApiOptions.None);
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Query pull requests for the repository based on criteria
|
||||||
|
/// </summary>
|
||||||
|
/// <remarks>
|
||||||
|
/// http://developer.github.com/v3/pulls/#list-pull-requests
|
||||||
|
/// </remarks>
|
||||||
|
/// <param name="owner">The owner of the repository</param>
|
||||||
|
/// <param name="name">The name of the repository</param>
|
||||||
|
/// <param name="request">Used to filter and sort the list of pull requests returned</param>
|
||||||
|
/// <param name="options">Options for changing the API response</param>
|
||||||
|
/// <returns>A <see cref="IReadOnlyList{PullRequest}"/> of <see cref="PullRequest"/>s which match the criteria</returns>
|
||||||
|
public Task<IReadOnlyList<PullRequest>> GetAllForRepository(string owner, string name, PullRequestRequest request, ApiOptions options)
|
||||||
|
{
|
||||||
|
Ensure.ArgumentNotNullOrEmptyString(owner, "owner");
|
||||||
|
Ensure.ArgumentNotNullOrEmptyString(name, "name");
|
||||||
|
Ensure.ArgumentNotNull(request, "request");
|
||||||
|
Ensure.ArgumentNotNull(options, "options");
|
||||||
|
|
||||||
return ApiConnection.GetAll<PullRequest>(ApiUrls.PullRequests(owner, name),
|
return ApiConnection.GetAll<PullRequest>(ApiUrls.PullRequests(owner, name),
|
||||||
request.ToParametersDictionary());
|
request.ToParametersDictionary(), options);
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
|
|||||||
Reference in New Issue
Block a user