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:
@@ -42,6 +42,19 @@ namespace Octokit.Reactive
|
||||
return _client.Get(owner, name).ToObservable();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Gets the page metadata for a given repository
|
||||
/// </summary>
|
||||
/// <param name="repositoryId">The ID of the repository</param>
|
||||
/// <remarks>
|
||||
/// See the <a href="https://developer.github.com/v3/repos/pages/#get-information-about-a-pages-site">API documentation</a> for more information.
|
||||
/// </remarks>
|
||||
/// <returns>A <see cref="IObservable{Page}"/> of <see cref="Page"/> representing page metadata of specified repository.</returns>
|
||||
public IObservable<Page> Get(int repositoryId)
|
||||
{
|
||||
return _client.Get(repositoryId).ToObservable();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Gets all build metadata for a given repository
|
||||
/// </summary>
|
||||
@@ -59,6 +72,19 @@ namespace Octokit.Reactive
|
||||
return GetAll(owner, name, ApiOptions.None);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Gets all build metadata for a given repository
|
||||
/// </summary>
|
||||
/// <param name="repositoryId">The ID of the repository</param>
|
||||
/// <remarks>
|
||||
/// See the <a href="https://developer.github.com/v3/repos/pages/#list-pages-builds">API documentation</a> for more information.
|
||||
/// </remarks>
|
||||
/// <returns>A <see cref="IObservable{PagesBuild}"/> of <see cref="PagesBuild"/>s representing pages build metadata of specified repository.</returns>
|
||||
public IObservable<PagesBuild> GetAll(int repositoryId)
|
||||
{
|
||||
return GetAll(repositoryId, ApiOptions.None);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Gets all build metadata for a given repository
|
||||
/// </summary>
|
||||
@@ -78,6 +104,22 @@ namespace Octokit.Reactive
|
||||
return _connection.GetAndFlattenAllPages<PagesBuild>(ApiUrls.RepositoryPageBuilds(owner, name), options);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Gets all build metadata for a given repository
|
||||
/// </summary>
|
||||
/// <param name="repositoryId">The ID of the repository</param>
|
||||
/// <param name="options">Options to change the API response</param>
|
||||
/// <remarks>
|
||||
/// See the <a href="https://developer.github.com/v3/repos/pages/#list-pages-builds">API documentation</a> for more information.
|
||||
/// </remarks>
|
||||
/// <returns>A <see cref="IObservable{PagesBuild}"/> of <see cref="PagesBuild"/>s representing pages build metadata of specified repository.</returns>
|
||||
public IObservable<PagesBuild> GetAll(int repositoryId, ApiOptions options)
|
||||
{
|
||||
Ensure.ArgumentNotNull(options, "options");
|
||||
|
||||
return _connection.GetAndFlattenAllPages<PagesBuild>(ApiUrls.RepositoryPageBuilds(repositoryId), options);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Gets the build metadata for the last build for a given repository
|
||||
/// </summary>
|
||||
@@ -94,5 +136,18 @@ namespace Octokit.Reactive
|
||||
|
||||
return _client.GetLatest(owner, name).ToObservable();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Gets the build metadata for the last build for a given repository
|
||||
/// </summary>
|
||||
/// <param name="repositoryId">The ID of the repository</param>
|
||||
/// <remarks>
|
||||
/// See the <a href="https://developer.github.com/v3/repos/pages/#list-latest-pages-build">API documentation</a> for more information.
|
||||
/// </remarks>
|
||||
/// <returns>A <see cref="IObservable{Page}"/> of <see cref="Page"/> representing latest pages build metadata of specified repository.</returns>
|
||||
public IObservable<PagesBuild> GetLatest(int repositoryId)
|
||||
{
|
||||
return _client.GetLatest(repositoryId).ToObservable();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user