mirror of
https://github.com/zoriya/octokit.net.git
synced 2026-06-03 11:05:56 +00:00
modified xml docs
This commit is contained in:
committed by
maddin2016
parent
988a6490d6
commit
02a13df93b
@@ -2,41 +2,72 @@
|
||||
|
||||
namespace Octokit.Reactive
|
||||
{
|
||||
/// <summary>
|
||||
/// A client for GitHub's Repository Forks API.
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// See the <a href="https://developer.github.com/v3/repos/forks/">Forks API documentation</a> for more information.
|
||||
/// </remarks>
|
||||
public interface IObservableRepositoryForksClient
|
||||
{
|
||||
/// <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>
|
||||
/// <returns></returns>
|
||||
IObservable<Repository> GetAll(string owner, string repositoryName);
|
||||
|
||||
/// <remarks>
|
||||
/// See <a href="http://developer.github.com/v3/repos/forks/#list-forks">API documentation</a> for more information.
|
||||
/// </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>
|
||||
/// <returns></returns>
|
||||
IObservable<Repository> GetAll(string owner, string repositoryName, ApiOptions options);
|
||||
|
||||
/// <remarks>
|
||||
/// See <a href="http://developer.github.com/v3/repos/forks/#list-forks">API documentation</a> for more information.
|
||||
/// </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="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>
|
||||
/// <returns></returns>
|
||||
IObservable<Repository> GetAll(string owner, string repositoryName, RepositoryForksListRequest request);
|
||||
|
||||
/// <remarks>
|
||||
/// See <a href="http://developer.github.com/v3/repos/forks/#list-forks">API documentation</a> for more information.
|
||||
/// </remarks>
|
||||
/// <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>
|
||||
/// <returns></returns>
|
||||
IObservable<Repository> GetAll(string owner, string repositoryName, RepositoryForksListRequest request, ApiOptions options);
|
||||
/// <remarks>
|
||||
/// See <a href="http://developer.github.com/v3/repos/forks/#list-forks">API documentation</a> for more information.
|
||||
/// </remarks>
|
||||
/// <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>
|
||||
/// <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>
|
||||
/// 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>
|
||||
/// <returns></returns>
|
||||
IObservable<Repository> Create(string owner, string repositoryName, NewRepositoryFork fork);
|
||||
/// <remarks>
|
||||
/// See <a href="http://developer.github.com/v3/repos/forks/#create-a-fork">API documentation</a> for more information.
|
||||
/// </remarks>
|
||||
/// <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);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -4,6 +4,12 @@ using Octokit.Reactive.Internal;
|
||||
|
||||
namespace Octokit.Reactive
|
||||
{
|
||||
/// <summary>
|
||||
/// A client for GitHub's Repository Forks API.
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// See the <a href="https://developer.github.com/v3/repos/forks/">Forks API documentation</a> for more information.
|
||||
/// </remarks>
|
||||
public class ObservableRepositoryForksClient : IObservableRepositoryForksClient
|
||||
{
|
||||
readonly IRepositoryForksClient _client;
|
||||
@@ -24,70 +30,95 @@ namespace Octokit.Reactive
|
||||
/// <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>
|
||||
/// <returns></returns>
|
||||
public IObservable<Repository> GetAll(string owner, string repositoryName)
|
||||
/// <remarks>
|
||||
/// See <a href="http://developer.github.com/v3/repos/forks/#list-forks">API documentation</a> for more information.
|
||||
/// </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");
|
||||
Ensure.ArgumentNotNullOrEmptyString(repositoryName, "repositoryName");
|
||||
Ensure.ArgumentNotNullOrEmptyString(name, "name");
|
||||
|
||||
return GetAll(owner, repositoryName, ApiOptions.None);
|
||||
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>
|
||||
/// <returns></returns>
|
||||
public IObservable<Repository> GetAll(string owner, string repositoryName, ApiOptions options)
|
||||
/// <remarks>
|
||||
/// See <a href="http://developer.github.com/v3/repos/forks/#list-forks">API documentation</a> for more information.
|
||||
/// </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="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");
|
||||
Ensure.ArgumentNotNullOrEmptyString(repositoryName, "repositoryName");
|
||||
Ensure.ArgumentNotNullOrEmptyString(name, "name");
|
||||
Ensure.ArgumentNotNull(options, "options");
|
||||
|
||||
return _connection.GetAndFlattenAllPages<Repository>(ApiUrls.RepositoryForks(owner, repositoryName), options);
|
||||
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>
|
||||
/// <returns></returns>
|
||||
public IObservable<Repository> GetAll(string owner, string repositoryName, RepositoryForksListRequest request)
|
||||
/// <remarks>
|
||||
/// See <a href="http://developer.github.com/v3/repos/forks/#list-forks">API documentation</a> for more information.
|
||||
/// </remarks>
|
||||
/// <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(repositoryName, "repositoryName");
|
||||
Ensure.ArgumentNotNullOrEmptyString(name, "name");
|
||||
|
||||
return GetAll(owner, repositoryName, request, ApiOptions.None);
|
||||
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>
|
||||
/// <returns></returns>
|
||||
public IObservable<Repository> GetAll(string owner, string repositoryName, RepositoryForksListRequest request, ApiOptions options)
|
||||
/// <remarks>
|
||||
/// See <a href="http://developer.github.com/v3/repos/forks/#list-forks">API documentation</a> for more information.
|
||||
/// </remarks>
|
||||
/// <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>
|
||||
/// <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(repositoryName, "repositoryName");
|
||||
Ensure.ArgumentNotNullOrEmptyString(name, "name");
|
||||
Ensure.ArgumentNotNull(options, "options");
|
||||
|
||||
return request == null ? _connection.GetAndFlattenAllPages<Repository>(ApiUrls.RepositoryForks(owner, repositoryName), options) :
|
||||
_connection.GetAndFlattenAllPages<Repository>(ApiUrls.RepositoryForks(owner, repositoryName), request.ToParametersDictionary(), options);
|
||||
return request == null ? _connection.GetAndFlattenAllPages<Repository>(ApiUrls.RepositoryForks(owner, name), options) :
|
||||
_connection.GetAndFlattenAllPages<Repository>(ApiUrls.RepositoryForks(owner, name), request.ToParametersDictionary(), options);
|
||||
}
|
||||
|
||||
/// <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>
|
||||
/// <returns></returns>
|
||||
public IObservable<Repository> Create(string owner, string repositoryName, NewRepositoryFork fork)
|
||||
/// <remarks>
|
||||
/// See <a href="http://developer.github.com/v3/repos/forks/#create-a-fork">API documentation</a> for more information.
|
||||
/// </remarks>
|
||||
/// <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");
|
||||
Ensure.ArgumentNotNullOrEmptyString(repositoryName, "repositoryName");
|
||||
Ensure.ArgumentNotNullOrEmptyString(name, "name");
|
||||
Ensure.ArgumentNotNull(fork, "fork");
|
||||
|
||||
return _client.Create(owner, repositoryName, fork).ToObservable();
|
||||
return _client.Create(owner, name, fork).ToObservable();
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -3,41 +3,72 @@ using System.Threading.Tasks;
|
||||
|
||||
namespace Octokit
|
||||
{
|
||||
/// <summary>
|
||||
/// A client for GitHub's Repository Forks API.
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// See the <a href="https://developer.github.com/v3/repos/forks/">Forks API documentation</a> for more information.
|
||||
/// </remarks>
|
||||
public interface IRepositoryForksClient
|
||||
{
|
||||
/// <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>
|
||||
/// <returns></returns>
|
||||
Task<IReadOnlyList<Repository>> GetAll(string owner, string repositoryName);
|
||||
|
||||
/// <remarks>
|
||||
/// See <a href="http://developer.github.com/v3/repos/forks/#list-forks">API documentation</a> for more information.
|
||||
/// </remarks>
|
||||
/// <param name="owner">The owner of the repository</param>
|
||||
/// <param name="name">The name 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(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>
|
||||
/// <returns></returns>
|
||||
Task<IReadOnlyList<Repository>> GetAll(string owner, string repositoryName, ApiOptions options);
|
||||
|
||||
/// <remarks>
|
||||
/// See <a href="http://developer.github.com/v3/repos/forks/#list-forks">API documentation</a> for more information.
|
||||
/// </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{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>
|
||||
/// <returns></returns>
|
||||
Task<IReadOnlyList<Repository>> GetAll(string owner, string repositoryName, RepositoryForksListRequest request);
|
||||
|
||||
/// <remarks>
|
||||
/// See <a href="http://developer.github.com/v3/repos/forks/#list-forks">API documentation</a> for more information.
|
||||
/// </remarks>
|
||||
/// <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="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>
|
||||
/// <returns></returns>
|
||||
Task<IReadOnlyList<Repository>> GetAll(string owner, string repositoryName, RepositoryForksListRequest request, ApiOptions options);
|
||||
/// <remarks>
|
||||
/// See <a href="http://developer.github.com/v3/repos/forks/#list-forks">API documentation</a> for more information.
|
||||
/// </remarks>
|
||||
/// <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>
|
||||
/// <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(string owner, string name, RepositoryForksListRequest request, ApiOptions options);
|
||||
|
||||
/// <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>
|
||||
/// <returns></returns>
|
||||
Task<Repository> Create(string owner, string repositoryName, NewRepositoryFork fork);
|
||||
/// <remarks>
|
||||
/// See <a href="http://developer.github.com/v3/repos/forks/#create-a-fork">API documentation</a> for more information.
|
||||
/// </remarks>
|
||||
/// <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="Repository"/> representing the created fork of specified repository.</returns>
|
||||
Task<Repository> Create(string owner, string name, NewRepositoryFork fork);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -3,6 +3,12 @@ using System.Threading.Tasks;
|
||||
|
||||
namespace Octokit
|
||||
{
|
||||
/// <summary>
|
||||
/// A client for GitHub's Repository Forks API.
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// See the <a href="https://developer.github.com/v3/repos/forks/">Forks API documentation</a> for more information.
|
||||
/// </remarks>
|
||||
public class RepositoryForksClient : ApiClient, IRepositoryForksClient
|
||||
{
|
||||
/// <summary>
|
||||
@@ -17,71 +23,96 @@ namespace Octokit
|
||||
/// <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>
|
||||
/// <returns></returns>
|
||||
public Task<IReadOnlyList<Repository>> GetAll(string owner, string repositoryName)
|
||||
/// <remarks>
|
||||
/// See <a href="http://developer.github.com/v3/repos/forks/#list-forks">API documentation</a> for more information.
|
||||
/// </remarks>
|
||||
/// <param name="owner">The owner of the repository</param>
|
||||
/// <param name="name">The name 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(string owner, string name)
|
||||
{
|
||||
Ensure.ArgumentNotNullOrEmptyString(owner, "owner");
|
||||
Ensure.ArgumentNotNullOrEmptyString(repositoryName, "repositoryName");
|
||||
Ensure.ArgumentNotNullOrEmptyString(name, "name");
|
||||
|
||||
return GetAll(owner, repositoryName, ApiOptions.None);
|
||||
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>
|
||||
/// <returns></returns>
|
||||
public Task<IReadOnlyList<Repository>> GetAll(string owner, string repositoryName, ApiOptions options)
|
||||
/// <remarks>
|
||||
/// See <a href="http://developer.github.com/v3/repos/forks/#list-forks">API documentation</a> for more information.
|
||||
/// </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{Repository}"/> of <see cref="Repository"/>s representing forks of specified repository.</returns>
|
||||
public Task<IReadOnlyList<Repository>> GetAll(string owner, string name, ApiOptions options)
|
||||
{
|
||||
Ensure.ArgumentNotNullOrEmptyString(owner, "owner");
|
||||
Ensure.ArgumentNotNullOrEmptyString(repositoryName, "repositoryName");
|
||||
Ensure.ArgumentNotNullOrEmptyString(name, "name");
|
||||
Ensure.ArgumentNotNull(options, "options");
|
||||
|
||||
return ApiConnection.GetAll<Repository>(ApiUrls.RepositoryForks(owner, repositoryName), options);
|
||||
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>
|
||||
/// <returns></returns>
|
||||
public Task<IReadOnlyList<Repository>> GetAll(string owner, string repositoryName, RepositoryForksListRequest request)
|
||||
/// <remarks>
|
||||
/// See <a href="http://developer.github.com/v3/repos/forks/#list-forks">API documentation</a> for more information.
|
||||
/// </remarks>
|
||||
/// <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="IReadOnlyList{Repository}"/> of <see cref="Repository"/>s representing forks of specified repository.</returns>
|
||||
public Task<IReadOnlyList<Repository>> GetAll(string owner, string name, RepositoryForksListRequest request)
|
||||
{
|
||||
Ensure.ArgumentNotNullOrEmptyString(owner, "owner");
|
||||
Ensure.ArgumentNotNullOrEmptyString(repositoryName, "repositoryName");
|
||||
Ensure.ArgumentNotNullOrEmptyString(name, "name");
|
||||
|
||||
return GetAll(owner, repositoryName, request, ApiOptions.None);
|
||||
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>
|
||||
/// <returns></returns>
|
||||
public Task<IReadOnlyList<Repository>> GetAll(string owner, string repositoryName, RepositoryForksListRequest request, ApiOptions options)
|
||||
/// <remarks>
|
||||
/// See <a href="http://developer.github.com/v3/repos/forks/#list-forks">API documentation</a> for more information.
|
||||
/// </remarks>
|
||||
/// <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>
|
||||
/// <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(string owner, string name, RepositoryForksListRequest request, ApiOptions options)
|
||||
{
|
||||
Ensure.ArgumentNotNullOrEmptyString(owner, "owner");
|
||||
Ensure.ArgumentNotNullOrEmptyString(repositoryName, "repositoryName");
|
||||
Ensure.ArgumentNotNullOrEmptyString(name, "name");
|
||||
Ensure.ArgumentNotNull(options, "options");
|
||||
|
||||
return request == null
|
||||
? ApiConnection.GetAll<Repository>(ApiUrls.RepositoryForks(owner, repositoryName), options) :
|
||||
ApiConnection.GetAll<Repository>(ApiUrls.RepositoryForks(owner, repositoryName), request.ToParametersDictionary(), options);
|
||||
return request == null
|
||||
? ApiConnection.GetAll<Repository>(ApiUrls.RepositoryForks(owner, name), options) :
|
||||
ApiConnection.GetAll<Repository>(ApiUrls.RepositoryForks(owner, name), request.ToParametersDictionary(), options);
|
||||
}
|
||||
|
||||
/// <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>
|
||||
/// <returns></returns>
|
||||
public Task<Repository> Create(string owner, string repositoryName, NewRepositoryFork fork)
|
||||
/// <remarks>
|
||||
/// See <a href="http://developer.github.com/v3/repos/forks/#create-a-fork">API documentation</a> for more information.
|
||||
/// </remarks>
|
||||
/// <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="Repository"/> representing the created fork of specified repository.</returns>
|
||||
public Task<Repository> Create(string owner, string name, NewRepositoryFork fork)
|
||||
{
|
||||
Ensure.ArgumentNotNullOrEmptyString(owner, "owner");
|
||||
Ensure.ArgumentNotNullOrEmptyString(repositoryName, "repositoryName");
|
||||
Ensure.ArgumentNotNullOrEmptyString(name, "name");
|
||||
Ensure.ArgumentNotNull(fork, "fork");
|
||||
|
||||
return ApiConnection.Post<Repository>(ApiUrls.RepositoryForks(owner, repositoryName), fork);
|
||||
return ApiConnection.Post<Repository>(ApiUrls.RepositoryForks(owner, name), fork);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user