mirror of
https://github.com/zoriya/octokit.net.git
synced 2025-12-20 22:25:12 +00:00
added new overloads
This commit is contained in:
@@ -21,6 +21,16 @@ namespace Octokit.Reactive
|
||||
/// <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>
|
||||
/// <returns>A <see cref="IObservable{Repository}"/> of <see cref="Repository"/>s representing forks of specified repository.</returns>
|
||||
IObservable<Repository> GetAll(int repositoryId);
|
||||
|
||||
/// <summary>
|
||||
/// Gets the list of forks defined for a repository
|
||||
/// </summary>
|
||||
@@ -33,6 +43,17 @@ namespace Octokit.Reactive
|
||||
/// <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>
|
||||
/// <returns>A <see cref="IObservable{Repository}"/> of <see cref="Repository"/>s representing forks of specified repository.</returns>
|
||||
IObservable<Repository> GetAll(int repositoryId, ApiOptions options);
|
||||
|
||||
/// <summary>
|
||||
/// Gets the list of forks defined for a repository
|
||||
/// </summary>
|
||||
@@ -45,6 +66,17 @@ namespace Octokit.Reactive
|
||||
/// <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>
|
||||
/// <returns>A <see cref="IObservable{Repository}"/> of <see cref="Repository"/>s representing forks of specified repository.</returns>
|
||||
IObservable<Repository> GetAll(int repositoryId, RepositoryForksListRequest request);
|
||||
|
||||
/// <summary>
|
||||
/// Gets the list of forks defined for a repository
|
||||
/// </summary>
|
||||
@@ -58,6 +90,18 @@ namespace Octokit.Reactive
|
||||
/// <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>
|
||||
/// <returns>A <see cref="IObservable{Repository}"/> of <see cref="Repository"/>s representing forks of specified repository.</returns>
|
||||
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>
|
||||
@@ -69,5 +113,16 @@ namespace Octokit.Reactive
|
||||
/// <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>
|
||||
/// <returns>A <see cref="IObservable{Repository}"/> of <see cref="Repository"/> representing the created fork of specified repository.</returns>
|
||||
IObservable<Repository> Create(int repositoryId, NewRepositoryFork fork);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -44,6 +44,19 @@ 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>
|
||||
/// <returns>A <see cref="IObservable{Repository}"/> of <see cref="Repository"/>s representing forks of specified repository.</returns>
|
||||
public IObservable<Repository> GetAll(int repositoryId)
|
||||
{
|
||||
return GetAll(repositoryId, ApiOptions.None);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Gets the list of forks defined for a repository
|
||||
/// </summary>
|
||||
@@ -63,6 +76,22 @@ 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>
|
||||
/// <returns>A <see cref="IObservable{Repository}"/> of <see cref="Repository"/>s representing forks of specified repository.</returns>
|
||||
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>
|
||||
@@ -81,6 +110,20 @@ namespace Octokit.Reactive
|
||||
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>
|
||||
/// <returns>A <see cref="IObservable{Repository}"/> of <see cref="Repository"/>s representing forks of specified repository.</returns>
|
||||
public IObservable<Repository> GetAll(int repositoryId, RepositoryForksListRequest request)
|
||||
{
|
||||
return GetAll(repositoryId, request, ApiOptions.None);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Gets the list of forks defined for a repository
|
||||
/// </summary>
|
||||
@@ -102,6 +145,24 @@ namespace Octokit.Reactive
|
||||
_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>
|
||||
/// <returns>A <see cref="IObservable{Repository}"/> of <see cref="Repository"/>s representing forks of specified repository.</returns>
|
||||
public IObservable<Repository> GetAll(int repositoryId, RepositoryForksListRequest request, ApiOptions options)
|
||||
{
|
||||
Ensure.ArgumentNotNull(options, "options");
|
||||
|
||||
return request == null ? _connection.GetAndFlattenAllPages<Repository>(ApiUrls.RepositoryForks(repositoryId), options) :
|
||||
_connection.GetAndFlattenAllPages<Repository>(ApiUrls.RepositoryForks(repositoryId), request.ToParametersDictionary(), options);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Creates a fork for a repository. Specify organization in the fork parameter to create for an organization.
|
||||
/// </summary>
|
||||
@@ -120,5 +181,21 @@ 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>
|
||||
/// <returns>A <see cref="IObservable{Repository}"/> of <see cref="Repository"/> representing the created fork of specified repository.</returns>
|
||||
public IObservable<Repository> Create(int repositoryId, NewRepositoryFork fork)
|
||||
{
|
||||
Ensure.ArgumentNotNull(fork, "fork");
|
||||
|
||||
return _client.Create(repositoryId, fork).ToObservable();
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -22,6 +22,16 @@ namespace Octokit
|
||||
/// <returns>A <see cref="IReadOnlyList{Repository}"/> of <see cref="Repository"/>s representing forks of specified repository.</returns>
|
||||
Task<IReadOnlyList<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>
|
||||
/// <returns>A <see cref="IReadOnlyList{Repository}"/> of <see cref="Repository"/>s representing forks of specified repository.</returns>
|
||||
Task<IReadOnlyList<Repository>> GetAll(int repositoryId);
|
||||
|
||||
/// <summary>
|
||||
/// Gets the list of forks defined for a repository
|
||||
/// </summary>
|
||||
@@ -34,6 +44,17 @@ namespace Octokit
|
||||
/// <returns>A <see cref="IReadOnlyList{Repository}"/> of <see cref="Repository"/>s representing forks of specified repository.</returns>
|
||||
Task<IReadOnlyList<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>
|
||||
/// <returns>A <see cref="IReadOnlyList{Repository}"/> of <see cref="Repository"/>s representing forks of specified repository.</returns>
|
||||
Task<IReadOnlyList<Repository>> GetAll(int repositoryId, ApiOptions options);
|
||||
|
||||
/// <summary>
|
||||
/// Gets the list of forks defined for a repository
|
||||
/// </summary>
|
||||
@@ -46,6 +67,17 @@ namespace Octokit
|
||||
/// <returns>A <see cref="IReadOnlyList{Repository}"/> of <see cref="Repository"/>s representing forks of specified repository.</returns>
|
||||
Task<IReadOnlyList<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>
|
||||
/// <returns>A <see cref="IReadOnlyList{Repository}"/> of <see cref="Repository"/>s representing forks of specified repository.</returns>
|
||||
Task<IReadOnlyList<Repository>> GetAll(int repositoryId, RepositoryForksListRequest request);
|
||||
|
||||
/// <summary>
|
||||
/// Gets the list of forks defined for a repository
|
||||
/// </summary>
|
||||
@@ -59,6 +91,18 @@ namespace Octokit
|
||||
/// <returns>A <see cref="IReadOnlyList{Repository}"/> of <see cref="Repository"/>s representing forks of specified repository.</returns>
|
||||
Task<IReadOnlyList<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>
|
||||
/// <returns>A <see cref="IReadOnlyList{Repository}"/> of <see cref="Repository"/>s representing forks of specified repository.</returns>
|
||||
Task<IReadOnlyList<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>
|
||||
@@ -70,5 +114,16 @@ namespace Octokit
|
||||
/// <param name="fork">Used to fork a repository</param>
|
||||
/// <returns>A <see cref="Repository"/> representing the created fork of specified repository.</returns>
|
||||
Task<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>
|
||||
/// <returns>A <see cref="Repository"/> representing the created fork of specified repository.</returns>
|
||||
Task<Repository> Create(int repositoryId, NewRepositoryFork fork);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -37,6 +37,19 @@ namespace Octokit
|
||||
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>
|
||||
/// <returns>A <see cref="IReadOnlyList{Repository}"/> of <see cref="Repository"/>s representing forks of specified repository.</returns>
|
||||
public Task<IReadOnlyList<Repository>> GetAll(int repositoryId)
|
||||
{
|
||||
return GetAll(repositoryId, ApiOptions.None);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Gets the list of forks defined for a repository
|
||||
/// </summary>
|
||||
@@ -56,6 +69,22 @@ namespace Octokit
|
||||
return ApiConnection.GetAll<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>
|
||||
/// <returns>A <see cref="IReadOnlyList{Repository}"/> of <see cref="Repository"/>s representing forks of specified repository.</returns>
|
||||
public Task<IReadOnlyList<Repository>> GetAll(int repositoryId, ApiOptions options)
|
||||
{
|
||||
Ensure.ArgumentNotNull(options, "options");
|
||||
|
||||
return ApiConnection.GetAll<Repository>(ApiUrls.RepositoryForks(repositoryId), options);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Gets the list of forks defined for a repository
|
||||
/// </summary>
|
||||
@@ -74,6 +103,20 @@ namespace Octokit
|
||||
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>
|
||||
/// <returns>A <see cref="IReadOnlyList{Repository}"/> of <see cref="Repository"/>s representing forks of specified repository.</returns>
|
||||
public Task<IReadOnlyList<Repository>> GetAll(int repositoryId, RepositoryForksListRequest request)
|
||||
{
|
||||
return GetAll(repositoryId, request, ApiOptions.None);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Gets the list of forks defined for a repository
|
||||
/// </summary>
|
||||
@@ -96,6 +139,25 @@ namespace Octokit
|
||||
ApiConnection.GetAll<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>
|
||||
/// <returns>A <see cref="IReadOnlyList{Repository}"/> of <see cref="Repository"/>s representing forks of specified repository.</returns>
|
||||
public Task<IReadOnlyList<Repository>> GetAll(int repositoryId, RepositoryForksListRequest request, ApiOptions options)
|
||||
{
|
||||
Ensure.ArgumentNotNull(options, "options");
|
||||
|
||||
return request == null
|
||||
? ApiConnection.GetAll<Repository>(ApiUrls.RepositoryForks(repositoryId), options) :
|
||||
ApiConnection.GetAll<Repository>(ApiUrls.RepositoryForks(repositoryId), request.ToParametersDictionary(), options);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Creates a fork for a repository. Specify organization in the fork parameter to create for an organization.
|
||||
/// </summary>
|
||||
@@ -114,5 +176,21 @@ namespace Octokit
|
||||
|
||||
return ApiConnection.Post<Repository>(ApiUrls.RepositoryForks(owner, name), 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>
|
||||
/// <returns>A <see cref="Repository"/> representing the created fork of specified repository.</returns>
|
||||
public Task<Repository> Create(int repositoryId, NewRepositoryFork fork)
|
||||
{
|
||||
Ensure.ArgumentNotNull(fork, "fork");
|
||||
|
||||
return ApiConnection.Post<Repository>(ApiUrls.RepositoryForks(repositoryId), fork);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user