added new overloads

This commit is contained in:
aedampir@gmail.com
2016-06-09 17:43:08 +07:00
parent 9859faeb0e
commit 36d7d2cf24
4 changed files with 195 additions and 0 deletions

View File

@@ -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();
}
}
}