mirror of
https://github.com/zoriya/octokit.net.git
synced 2025-12-06 07:16:09 +00:00
Merge pull request #1356 from dampir/add-repo-id-repo-forks-client
Add repositoryId overloads to methods on I(Observable)RepositoryForksClient
This commit is contained in:
@@ -18,9 +18,17 @@ namespace Octokit.Reactive
|
||||
/// </remarks>
|
||||
/// <param name="owner">The owner of the repository</param>
|
||||
/// <param name="name">The name of the repository</param>
|
||||
/// <returns>A <see cref="IObservable{Repository}"/> of <see cref="Repository"/>s representing forks of specified repository.</returns>
|
||||
IObservable<Repository> GetAll(string owner, string name);
|
||||
|
||||
/// <summary>
|
||||
/// Gets the list of forks defined for a repository
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// See <a href="http://developer.github.com/v3/repos/forks/#list-forks">API documentation</a> for more information.
|
||||
/// </remarks>
|
||||
/// <param name="repositoryId">The ID of the repository</param>
|
||||
IObservable<Repository> GetAll(int repositoryId);
|
||||
|
||||
/// <summary>
|
||||
/// Gets the list of forks defined for a repository
|
||||
/// </summary>
|
||||
@@ -30,9 +38,18 @@ namespace Octokit.Reactive
|
||||
/// <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="IObservable{Repository}"/> of <see cref="Repository"/>s representing forks of specified repository.</returns>
|
||||
IObservable<Repository> GetAll(string owner, string name, ApiOptions options);
|
||||
|
||||
/// <summary>
|
||||
/// Gets the list of forks defined for a repository
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// See <a href="http://developer.github.com/v3/repos/forks/#list-forks">API documentation</a> for more information.
|
||||
/// </remarks>
|
||||
/// <param name="repositoryId">The ID of the repository</param>
|
||||
/// <param name="options">Options for changing the API response</param>
|
||||
IObservable<Repository> GetAll(int repositoryId, ApiOptions options);
|
||||
|
||||
/// <summary>
|
||||
/// Gets the list of forks defined for a repository
|
||||
/// </summary>
|
||||
@@ -42,9 +59,18 @@ namespace Octokit.Reactive
|
||||
/// <param name="owner">The owner of the repository</param>
|
||||
/// <param name="name">The name of the repository</param>
|
||||
/// <param name="request">Used to request and filter a list of repository forks</param>
|
||||
/// <returns>A <see cref="IObservable{Repository}"/> of <see cref="Repository"/>s representing forks of specified repository.</returns>
|
||||
IObservable<Repository> GetAll(string owner, string name, RepositoryForksListRequest request);
|
||||
|
||||
/// <summary>
|
||||
/// Gets the list of forks defined for a repository
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// See <a href="http://developer.github.com/v3/repos/forks/#list-forks">API documentation</a> for more information.
|
||||
/// </remarks>
|
||||
/// <param name="repositoryId">The ID of the repository</param>
|
||||
/// <param name="request">Used to request and filter a list of repository forks</param>
|
||||
IObservable<Repository> GetAll(int repositoryId, RepositoryForksListRequest request);
|
||||
|
||||
/// <summary>
|
||||
/// Gets the list of forks defined for a repository
|
||||
/// </summary>
|
||||
@@ -55,9 +81,19 @@ namespace Octokit.Reactive
|
||||
/// <param name="name">The name of the repository</param>
|
||||
/// <param name="request">Used to request and filter a list of repository forks</param>
|
||||
/// <param name="options">Options for changing the API response</param>
|
||||
/// <returns>A <see cref="IObservable{Repository}"/> of <see cref="Repository"/>s representing forks of specified repository.</returns>
|
||||
IObservable<Repository> GetAll(string owner, string name, RepositoryForksListRequest request, ApiOptions options);
|
||||
|
||||
/// <summary>
|
||||
/// Gets the list of forks defined for a repository
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// See <a href="http://developer.github.com/v3/repos/forks/#list-forks">API documentation</a> for more information.
|
||||
/// </remarks>
|
||||
/// <param name="repositoryId">The ID of the repository</param>
|
||||
/// <param name="request">Used to request and filter a list of repository forks</param>
|
||||
/// <param name="options">Options for changing the API response</param>
|
||||
IObservable<Repository> GetAll(int repositoryId, RepositoryForksListRequest request, ApiOptions options);
|
||||
|
||||
/// <summary>
|
||||
/// Creates a fork for a repository. Specify organization in the fork parameter to create for an organization.
|
||||
/// </summary>
|
||||
@@ -67,7 +103,16 @@ namespace Octokit.Reactive
|
||||
/// <param name="owner">The owner of the repository</param>
|
||||
/// <param name="name">The name of the repository</param>
|
||||
/// <param name="fork">Used to fork a repository</param>
|
||||
/// <returns>A <see cref="IObservable{Repository}"/> of <see cref="Repository"/> representing the created fork of specified repository.</returns>
|
||||
IObservable<Repository> Create(string owner, string name, NewRepositoryFork fork);
|
||||
|
||||
/// <summary>
|
||||
/// Creates a fork for a repository. Specify organization in the fork parameter to create for an organization.
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// See <a href="http://developer.github.com/v3/repos/forks/#create-a-fork">API documentation</a> for more information.
|
||||
/// </remarks>
|
||||
/// <param name="repositoryId">The ID of the repository</param>
|
||||
/// <param name="fork">Used to fork a repository</param>
|
||||
IObservable<Repository> Create(int repositoryId, NewRepositoryFork fork);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -35,7 +35,6 @@ namespace Octokit.Reactive
|
||||
/// </remarks>
|
||||
/// <param name="owner">The owner of the repository</param>
|
||||
/// <param name="name">The name of the repository</param>
|
||||
/// <returns>A <see cref="IObservable{Repository}"/> of <see cref="Repository"/>s representing forks of specified repository.</returns>
|
||||
public IObservable<Repository> GetAll(string owner, string name)
|
||||
{
|
||||
Ensure.ArgumentNotNullOrEmptyString(owner, "owner");
|
||||
@@ -44,6 +43,18 @@ namespace Octokit.Reactive
|
||||
return GetAll(owner, name, ApiOptions.None);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Gets the list of forks defined for a repository
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// See <a href="http://developer.github.com/v3/repos/forks/#list-forks">API documentation</a> for more information.
|
||||
/// </remarks>
|
||||
/// <param name="repositoryId">The ID of the repository</param>
|
||||
public IObservable<Repository> GetAll(int repositoryId)
|
||||
{
|
||||
return GetAll(repositoryId, ApiOptions.None);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Gets the list of forks defined for a repository
|
||||
/// </summary>
|
||||
@@ -53,7 +64,6 @@ namespace Octokit.Reactive
|
||||
/// <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="IObservable{Repository}"/> of <see cref="Repository"/>s representing forks of specified repository.</returns>
|
||||
public IObservable<Repository> GetAll(string owner, string name, ApiOptions options)
|
||||
{
|
||||
Ensure.ArgumentNotNullOrEmptyString(owner, "owner");
|
||||
@@ -63,6 +73,21 @@ namespace Octokit.Reactive
|
||||
return _connection.GetAndFlattenAllPages<Repository>(ApiUrls.RepositoryForks(owner, name), options);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Gets the list of forks defined for a repository
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// See <a href="http://developer.github.com/v3/repos/forks/#list-forks">API documentation</a> for more information.
|
||||
/// </remarks>
|
||||
/// <param name="repositoryId">The ID of the repository</param>
|
||||
/// <param name="options">Options for changing the API response</param>
|
||||
public IObservable<Repository> GetAll(int repositoryId, ApiOptions options)
|
||||
{
|
||||
Ensure.ArgumentNotNull(options, "options");
|
||||
|
||||
return _connection.GetAndFlattenAllPages<Repository>(ApiUrls.RepositoryForks(repositoryId), options);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Gets the list of forks defined for a repository
|
||||
/// </summary>
|
||||
@@ -72,15 +97,30 @@ namespace Octokit.Reactive
|
||||
/// <param name="owner">The owner of the repository</param>
|
||||
/// <param name="name">The name of the repository</param>
|
||||
/// <param name="request">Used to request and filter a list of repository forks</param>
|
||||
/// <returns>A <see cref="IObservable{Repository}"/> of <see cref="Repository"/>s representing forks of specified repository.</returns>
|
||||
public IObservable<Repository> GetAll(string owner, string name, RepositoryForksListRequest request)
|
||||
{
|
||||
Ensure.ArgumentNotNullOrEmptyString(owner, "owner");
|
||||
Ensure.ArgumentNotNullOrEmptyString(name, "name");
|
||||
Ensure.ArgumentNotNull(request, "request");
|
||||
|
||||
return GetAll(owner, name, request, ApiOptions.None);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Gets the list of forks defined for a repository
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// See <a href="http://developer.github.com/v3/repos/forks/#list-forks">API documentation</a> for more information.
|
||||
/// </remarks>
|
||||
/// <param name="repositoryId">The ID of the repository</param>
|
||||
/// <param name="request">Used to request and filter a list of repository forks</param>
|
||||
public IObservable<Repository> GetAll(int repositoryId, RepositoryForksListRequest request)
|
||||
{
|
||||
Ensure.ArgumentNotNull(request, "request");
|
||||
|
||||
return GetAll(repositoryId, request, ApiOptions.None);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Gets the list of forks defined for a repository
|
||||
/// </summary>
|
||||
@@ -91,15 +131,31 @@ namespace Octokit.Reactive
|
||||
/// <param name="name">The name of the repository</param>
|
||||
/// <param name="request">Used to request and filter a list of repository forks</param>
|
||||
/// <param name="options">Options for changing the API response</param>
|
||||
/// <returns>A <see cref="IObservable{Repository}"/> of <see cref="Repository"/>s representing forks of specified repository.</returns>
|
||||
public IObservable<Repository> GetAll(string owner, string name, RepositoryForksListRequest request, ApiOptions options)
|
||||
{
|
||||
Ensure.ArgumentNotNullOrEmptyString(owner, "owner");
|
||||
Ensure.ArgumentNotNullOrEmptyString(name, "name");
|
||||
Ensure.ArgumentNotNull(request, "request");
|
||||
Ensure.ArgumentNotNull(options, "options");
|
||||
|
||||
return request == null ? _connection.GetAndFlattenAllPages<Repository>(ApiUrls.RepositoryForks(owner, name), options) :
|
||||
_connection.GetAndFlattenAllPages<Repository>(ApiUrls.RepositoryForks(owner, name), request.ToParametersDictionary(), options);
|
||||
return _connection.GetAndFlattenAllPages<Repository>(ApiUrls.RepositoryForks(owner, name), request.ToParametersDictionary(), options);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Gets the list of forks defined for a repository
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// See <a href="http://developer.github.com/v3/repos/forks/#list-forks">API documentation</a> for more information.
|
||||
/// </remarks>
|
||||
/// <param name="repositoryId">The ID of the repository</param>
|
||||
/// <param name="request">Used to request and filter a list of repository forks</param>
|
||||
/// <param name="options">Options for changing the API response</param>
|
||||
public IObservable<Repository> GetAll(int repositoryId, RepositoryForksListRequest request, ApiOptions options)
|
||||
{
|
||||
Ensure.ArgumentNotNull(request, "request");
|
||||
Ensure.ArgumentNotNull(options, "options");
|
||||
|
||||
return _connection.GetAndFlattenAllPages<Repository>(ApiUrls.RepositoryForks(repositoryId), request.ToParametersDictionary(), options);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
@@ -111,7 +167,6 @@ namespace Octokit.Reactive
|
||||
/// <param name="owner">The owner of the repository</param>
|
||||
/// <param name="name">The name of the repository</param>
|
||||
/// <param name="fork">Used to fork a repository</param>
|
||||
/// <returns>A <see cref="IObservable{Repository}"/> of <see cref="Repository"/> representing the created fork of specified repository.</returns>
|
||||
public IObservable<Repository> Create(string owner, string name, NewRepositoryFork fork)
|
||||
{
|
||||
Ensure.ArgumentNotNullOrEmptyString(owner, "owner");
|
||||
@@ -120,5 +175,20 @@ namespace Octokit.Reactive
|
||||
|
||||
return _client.Create(owner, name, fork).ToObservable();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Creates a fork for a repository. Specify organization in the fork parameter to create for an organization.
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// See <a href="http://developer.github.com/v3/repos/forks/#create-a-fork">API documentation</a> for more information.
|
||||
/// </remarks>
|
||||
/// <param name="repositoryId">The ID of the repository</param>
|
||||
/// <param name="fork">Used to fork a repository</param>
|
||||
public IObservable<Repository> Create(int repositoryId, NewRepositoryFork fork)
|
||||
{
|
||||
Ensure.ArgumentNotNull(fork, "fork");
|
||||
|
||||
return _client.Create(repositoryId, fork).ToObservable();
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user