mirror of
https://github.com/zoriya/octokit.net.git
synced 2026-06-03 03:01:31 +00:00
Generate documentation comments for the
`Reactive` project
This commit is contained in:
@@ -4,6 +4,12 @@ using Octokit.Reactive.Internal;
|
||||
|
||||
namespace Octokit.Reactive
|
||||
{
|
||||
/// <summary>
|
||||
/// A client for GitHub's Feeds API.
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// See the <a href="http://developer.github.com/v3/activity/feeds/">Feeds API documentation</a> for more information
|
||||
/// </remarks>
|
||||
public class ObservableFeedsClient : IObservableFeedsClient
|
||||
{
|
||||
readonly IFeedsClient _client;
|
||||
|
||||
@@ -21,9 +21,7 @@ namespace Octokit.Reactive
|
||||
/// <summary>
|
||||
/// Gets a single comment by gist- and comment id.
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// http://developer.github.com/v3/gists/comments/#get-a-single-comment
|
||||
/// </remarks>
|
||||
/// <remarks>http://developer.github.com/v3/gists/comments/#get-a-single-comment</remarks>
|
||||
/// <param name="gistId">The id of the gist</param>
|
||||
/// <param name="commentId">The id of the comment</param>
|
||||
/// <returns>IObservable{GistComment}.</returns>
|
||||
@@ -35,9 +33,7 @@ namespace Octokit.Reactive
|
||||
/// <summary>
|
||||
/// Gets all comments for the gist with the specified id.
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// http://developer.github.com/v3/gists/comments/#list-comments-on-a-gist
|
||||
/// </remarks>
|
||||
/// <remarks>http://developer.github.com/v3/gists/comments/#list-comments-on-a-gist</remarks>
|
||||
/// <param name="gistId">The id of the gist</param>
|
||||
/// <returns>IObservable{GistComment}.</returns>
|
||||
public IObservable<GistComment> GetForGist(int gistId)
|
||||
@@ -48,9 +44,7 @@ namespace Octokit.Reactive
|
||||
/// <summary>
|
||||
/// Creates a comment for the gist with the specified id.
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// http://developer.github.com/v3/gists/comments/#create-a-comment
|
||||
/// </remarks>
|
||||
/// <remarks>http://developer.github.com/v3/gists/comments/#create-a-comment</remarks>
|
||||
/// <param name="gistId">The id of the gist</param>
|
||||
/// <param name="comment">The body of the comment</param>
|
||||
/// <returns>IObservable{GistComment}.</returns>
|
||||
@@ -64,9 +58,7 @@ namespace Octokit.Reactive
|
||||
/// <summary>
|
||||
/// Updates the comment with the specified gist- and comment id.
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// http://developer.github.com/v3/gists/comments/#edit-a-comment
|
||||
/// </remarks>
|
||||
/// <remarks>http://developer.github.com/v3/gists/comments/#edit-a-comment</remarks>
|
||||
/// <param name="gistId">The id of the gist</param>
|
||||
/// <param name="commentId">The id of the comment</param>
|
||||
/// <param name="comment">The updated body of the comment</param>
|
||||
@@ -81,9 +73,7 @@ namespace Octokit.Reactive
|
||||
/// <summary>
|
||||
/// Deletes the comment with the specified gist- and comment id.
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// http://developer.github.com/v3/gists/comments/#delete-a-comment
|
||||
/// </remarks>
|
||||
/// <remarks>http://developer.github.com/v3/gists/comments/#delete-a-comment</remarks>
|
||||
/// <param name="gistId">The id of the gist</param>
|
||||
/// <param name="commentId">The id of the comment</param>
|
||||
/// <returns>IObservable{Unit}.</returns>
|
||||
|
||||
@@ -29,7 +29,6 @@ namespace Octokit.Reactive
|
||||
/// http://developer.github.com/v3/gists/#get-a-single-gist
|
||||
/// </remarks>
|
||||
/// <param name="id">The id of the gist</param>
|
||||
/// <returns>IObservable{Gist}.</returns>
|
||||
public IObservable<Gist> Get(string id)
|
||||
{
|
||||
Ensure.ArgumentNotNullOrEmptyString(id, "id");
|
||||
|
||||
@@ -1,5 +1,8 @@
|
||||
namespace Octokit.Reactive
|
||||
{
|
||||
/// <summary>
|
||||
/// Used to maintain api structure therefore contains no methods
|
||||
/// </summary>
|
||||
public class ObservableGitDatabaseClient : IObservableGitDatabaseClient
|
||||
{
|
||||
public ObservableGitDatabaseClient(IGitHubClient client)
|
||||
|
||||
@@ -21,9 +21,7 @@ namespace Octokit.Reactive
|
||||
/// <summary>
|
||||
/// Gets a single Issue Comment by number.
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// http://developer.github.com/v3/issues/comments/#get-a-single-comment
|
||||
/// </remarks>
|
||||
/// <remarks>http://developer.github.com/v3/issues/comments/#get-a-single-comment</remarks>
|
||||
/// <param name="owner">The owner of the repository</param>
|
||||
/// <param name="name">The name of the repository</param>
|
||||
/// <param name="number">The issue comment number</param>
|
||||
@@ -37,11 +35,9 @@ namespace Octokit.Reactive
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Gets a list of the Issue Comments in a specified repository.
|
||||
/// Gets Issue Comments for a repository.
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// http://developer.github.com/v3/issues/comments/#list-comments-in-a-repository
|
||||
/// </remarks>
|
||||
/// <remarks>http://developer.github.com/v3/issues/comments/#list-comments-in-a-repository</remarks>
|
||||
/// <param name="owner">The owner of the repository</param>
|
||||
/// <param name="name">The name of the repository</param>
|
||||
/// <returns>The list of <see cref="IssueComment"/>s for the specified Repository.</returns>
|
||||
@@ -54,11 +50,9 @@ namespace Octokit.Reactive
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Gets a list of the Issue Comments for a specified issue.
|
||||
/// Gets Issue Comments for a specified Issue.
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// http://developer.github.com/v3/issues/comments/#list-comments-on-an-issue
|
||||
/// </remarks>
|
||||
/// <remarks>http://developer.github.com/v3/issues/comments/#list-comments-on-an-issue</remarks>
|
||||
/// <param name="owner">The owner of the repository</param>
|
||||
/// <param name="name">The name of the repository</param>
|
||||
/// <param name="number">The issue number</param>
|
||||
@@ -72,16 +66,14 @@ namespace Octokit.Reactive
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Creates a new Issue Comment in the specified Issue
|
||||
/// Creates a new Issue Comment for a specified Issue.
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// http://developer.github.com/v3/issues/comments/#create-a-comment
|
||||
/// </remarks>
|
||||
/// <remarks>http://developer.github.com/v3/issues/comments/#create-a-comment</remarks>
|
||||
/// <param name="owner">The owner of the repository</param>
|
||||
/// <param name="name">The name of the repository</param>
|
||||
/// <param name="number">The issue number</param>
|
||||
/// <param name="number">The number of the issue</param>
|
||||
/// <param name="newComment">The text of the new comment</param>
|
||||
/// <returns>The <see cref="IssueComment"/>s for that was just created.</returns>
|
||||
/// <returns>The <see cref="IssueComment"/> that was just created.</returns>
|
||||
public IObservable<IssueComment> Create(string owner, string name, int number, string newComment)
|
||||
{
|
||||
Ensure.ArgumentNotNullOrEmptyString(owner, "owner");
|
||||
@@ -92,16 +84,14 @@ namespace Octokit.Reactive
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Updates a specified Issue Comment
|
||||
/// Updates a specified Issue Comment.
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// http://developer.github.com/v3/issues/comments/#edit-a-comment
|
||||
/// </remarks>
|
||||
/// <remarks>http://developer.github.com/v3/issues/comments/#edit-a-comment</remarks>
|
||||
/// <param name="owner">The owner of the repository</param>
|
||||
/// <param name="name">The name of the repository</param>
|
||||
/// <param name="number">The issue number</param>
|
||||
/// <param name="commentUpdate">The text of the updated comment</param>
|
||||
/// <returns>The <see cref="IssueComment"/>s for that was just updated.</returns>
|
||||
/// <param name="number">The comment number</param>
|
||||
/// <param name="commentUpdate">The modified comment</param>
|
||||
/// <returns>The <see cref="IssueComment"/> that was just updated.</returns>
|
||||
public IObservable<IssueComment> Update(string owner, string name, int number, string commentUpdate)
|
||||
{
|
||||
Ensure.ArgumentNotNullOrEmptyString(owner, "owner");
|
||||
|
||||
@@ -9,10 +9,27 @@ namespace Octokit.Reactive
|
||||
readonly IIssuesClient _client;
|
||||
readonly IConnection _connection;
|
||||
|
||||
/// <summary>
|
||||
/// Client for managing assignees.
|
||||
/// </summary>
|
||||
public IObservableAssigneesClient Assignee { get; private set; }
|
||||
/// <summary>
|
||||
/// Client for managing comments.
|
||||
/// </summary>
|
||||
public IObservableIssueCommentsClient Comment { get; private set; }
|
||||
/// <summary>
|
||||
/// Client for reading various event information associated with issues/pull requests.
|
||||
/// This is useful both for display on issue/pull request information pages and also to
|
||||
/// determine who should be notified of comments.
|
||||
/// </summary>
|
||||
public IObservableIssuesEventsClient Events { get; private set; }
|
||||
/// <summary>
|
||||
/// Client for managing labels.
|
||||
/// </summary>
|
||||
public IObservableIssuesLabelsClient Labels { get; private set; }
|
||||
/// <summary>
|
||||
/// Client for managing milestones.
|
||||
/// </summary>
|
||||
public IObservableMilestonesClient Milestone { get; private set; }
|
||||
|
||||
public ObservableIssuesClient(IGitHubClient client)
|
||||
@@ -29,7 +46,8 @@ namespace Octokit.Reactive
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Gets a single Issue by number./// </summary>
|
||||
/// Gets a single Issue by number.
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// http://developer.github.com/v3/issues/#get-a-single-issue
|
||||
/// </remarks>
|
||||
|
||||
@@ -103,7 +103,7 @@ namespace Octokit.Reactive
|
||||
/// <param name="repo">The name of the repository</param>
|
||||
/// <param name="name">The name of the label</param>
|
||||
/// <param name="labelUpdate">The data for the label to be updated</param>
|
||||
/// <returns>The updated label</returns>'
|
||||
/// <returns>The updated label</returns>
|
||||
public IObservable<Label> Update(string owner, string repo, string name, LabelUpdate labelUpdate)
|
||||
{
|
||||
return _client.Update(owner, repo, name, labelUpdate).ToObservable();
|
||||
|
||||
@@ -68,7 +68,7 @@ namespace Octokit.Reactive
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Creates an Milestone for the specified repository. Any user with pull access to a repository can create an
|
||||
/// Creates a milestone for the specified repository. Any user with pull access to a repository can create a
|
||||
/// Milestone.
|
||||
/// </summary>
|
||||
/// <remarks>http://developer.github.com/v3/issues/milestones/#create-a-milestone</remarks>
|
||||
@@ -86,10 +86,10 @@ namespace Octokit.Reactive
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Creates an Milestone for the specified repository. Any user with pull access to a repository can create an
|
||||
/// Updates a milestone for the specified repository. Any user with pull access to a repository can create a
|
||||
/// Milestone.
|
||||
/// </summary>
|
||||
/// <remarks>http://developer.github.com/v3/issues/milestones/#create-a-milestone</remarks>
|
||||
/// <remarks>http://developer.github.com/v3/issues/milestones/#update-a-milestone</remarks>
|
||||
/// <param name="owner">The owner of the repository</param>
|
||||
/// <param name="name">The name of the repository</param>
|
||||
/// <param name="number">The Milestone number</param>
|
||||
|
||||
@@ -47,14 +47,14 @@ namespace Octokit.Reactive
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Gets all open pull requests for the repository.
|
||||
/// Query pull requests for the repository based on criteria
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// http://developer.github.com/v3/pulls/#list-pull-requests
|
||||
/// </remarks>
|
||||
/// <param name="owner">The owner of the repository</param>
|
||||
/// <param name="name">The name of the repository</param>
|
||||
/// <param name="request">Used to filter the list of Pull Requests returned</param>
|
||||
/// <param name="request">Used to filter and sort the list of pull requests returned</param>
|
||||
/// <returns>A collection of <see cref="PullRequest"/> results</returns>
|
||||
public IObservable<PullRequest> GetForRepository(string owner, string name, PullRequestRequest request)
|
||||
{
|
||||
@@ -67,7 +67,7 @@ namespace Octokit.Reactive
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Creates a Pull Request for the specified repository.
|
||||
/// Creates a pull request for the specified repository.
|
||||
/// </summary>
|
||||
/// <remarks>http://developer.github.com/v3/pulls/#create-a-pull-request</remarks>
|
||||
/// <param name="owner">The owner of the repository</param>
|
||||
@@ -84,7 +84,7 @@ namespace Octokit.Reactive
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Update a Pull Request for the specified repository.
|
||||
/// Update a pull request for the specified repository.
|
||||
/// </summary>
|
||||
/// <remarks>http://developer.github.com/v3/pulls/#update-a-pull-request</remarks>
|
||||
/// <param name="owner">The owner of the repository</param>
|
||||
@@ -121,9 +121,9 @@ namespace Octokit.Reactive
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Merges a pull request.
|
||||
/// Gets the pull request merge status.
|
||||
/// </summary>
|
||||
/// <remarks>http://developer.github.com/v3/pulls/#merge-a-pull-request-merge-buttontrade</remarks>
|
||||
/// <remarks>http://developer.github.com/v3/pulls/#get-if-a-pull-request-has-been-merged</remarks>
|
||||
/// <param name="owner">The owner of the repository</param>
|
||||
/// <param name="name">The name of the repository</param>
|
||||
/// <param name="number">The pull request number</param>
|
||||
|
||||
@@ -137,15 +137,16 @@ namespace Octokit.Reactive
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Uploads a <see cref="ReleaseAsset"/> for the specified release.
|
||||
/// Gets the specified <see cref="ReleaseAsset"/> for the specified release of the specified repository.
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// See the <a href="http://developer.github.com/v3/repos/releases/#upload-a-release-asset">API documentation</a> for more information.
|
||||
/// See the <a href="http://developer.github.com/v3/repos/releases/#get-a-single-release-asset">API documentation</a> for more information.
|
||||
/// </remarks>
|
||||
/// <param name="release">The <see cref="Release"/> to attach the uploaded asset to</param>
|
||||
/// <param name="data">Description of the asset with its data</param>
|
||||
/// <exception cref="ApiException">Thrown when a general API error occurs.</exception>
|
||||
/// <returns>The created <see cref="ReleaseAsset"/>.</returns>
|
||||
/// <param name="owner">The repository's owner</param>
|
||||
/// <param name="name">The repository's name</param>
|
||||
/// <param name="releaseId">The id of the <see cref="Release"/></param>
|
||||
/// <param name="assetId">The id of the <see cref="ReleaseAsset"/></param>
|
||||
/// <returns>The <see cref="ReleaseAsset"/> specified by the asset id.</returns>
|
||||
public IObservable<ReleaseAsset> GetAsset(string owner, string name, int releaseId, int assetId)
|
||||
{
|
||||
Ensure.ArgumentNotNullOrEmptyString(owner, "owner");
|
||||
@@ -157,16 +158,15 @@ namespace Octokit.Reactive
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Gets the specified <see cref="ReleaseAsset"/> for the specified release of the specified repository.
|
||||
/// Uploads a <see cref="ReleaseAsset"/> for the specified release.
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// See the <a href="http://developer.github.com/v3/repos/releases/#get-a-single-release-asset">API documentation</a> for more information.
|
||||
/// See the <a href="http://developer.github.com/v3/repos/releases/#upload-a-release-asset">API documentation</a> for more information.
|
||||
/// </remarks>
|
||||
/// <param name="owner">The repository's owner</param>
|
||||
/// <param name="name">The repository's name</param>
|
||||
/// <param name="releaseId">The id of the <see cref="Release"/></param>
|
||||
/// <param name="assetId">The id of the <see cref="ReleaseAsset"/></param>
|
||||
/// <returns>The <see cref="ReleaseAsset"/> specified by the asset id.</returns>
|
||||
/// <param name="release">The <see cref="Release"/> to attach the uploaded asset to</param>
|
||||
/// <param name="data">Description of the asset with its data</param>
|
||||
/// <exception cref="ApiException">Thrown when a general API error occurs.</exception>
|
||||
/// <returns>The created <see cref="ReleaseAsset"/>.</returns>
|
||||
public IObservable<ReleaseAsset> UploadAsset(Release release, ReleaseAssetUpload data)
|
||||
{
|
||||
Ensure.ArgumentNotNull(release, "release");
|
||||
|
||||
@@ -5,6 +5,9 @@ using Octokit.Reactive.Internal;
|
||||
|
||||
namespace Octokit.Reactive
|
||||
{
|
||||
/// <summary>
|
||||
/// GitHub Search Api Client
|
||||
/// </summary>
|
||||
public class ObservableSearchClient : IObservableSearchClient
|
||||
{
|
||||
readonly IConnection _connection;
|
||||
|
||||
@@ -37,7 +37,9 @@ namespace Octokit.Reactive
|
||||
/// Retrieves all of the starred <see cref="Repository"/>(ies) for the current user
|
||||
/// </summary>
|
||||
/// <exception cref="AuthorizationException">Thrown if the client is not authenticated</exception>
|
||||
/// <returns>A <see cref="IObservable{Repository}"/> of <see cref="Repository"/></returns>
|
||||
/// <returns>
|
||||
/// A <see cref="IObservable{Repository}"/> of <see cref="Repository"/>(ies) starred by the current user
|
||||
/// </returns>
|
||||
public IObservable<Repository> GetAllForCurrent()
|
||||
{
|
||||
return _connection.GetAndFlattenAllPages<Repository>(ApiUrls.Starred());
|
||||
@@ -48,7 +50,10 @@ namespace Octokit.Reactive
|
||||
/// </summary>
|
||||
/// <param name="request">Star-specific request parameters that sort the results</param>
|
||||
/// <exception cref="AuthorizationException">Thrown if the client is not authenticated</exception>
|
||||
/// <returns>A <see cref="IObservable{Repository}"/> of <see cref="Repository"/>(ies) starred by the current user</returns>
|
||||
/// <returns>
|
||||
/// A <see cref="IObservable{Repository}"/> of <see cref="Repository"/>(ies) starred by the current user,
|
||||
/// sorted according to the passed request parameters
|
||||
/// </returns>
|
||||
[System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Design", "CA1011:ConsiderPassingBaseTypesAsParameters")]
|
||||
public IObservable<Repository> GetAllForCurrent(StarredRequest request)
|
||||
{
|
||||
@@ -91,7 +96,7 @@ namespace Octokit.Reactive
|
||||
/// </summary>
|
||||
/// <param name="owner">The owner of the repository</param>
|
||||
/// <param name="name">The name of the repository</param>
|
||||
/// <exception cref="AuthorizationException">Thrown if the client is not authenticated</exception>
|
||||
/// <exception cref="AuthorizationException">Thrown if the client is not authenticated.</exception>
|
||||
/// <returns>A <c>bool</c> representing the success of the operation</returns>
|
||||
public IObservable<bool> CheckStarred(string owner, string name)
|
||||
{
|
||||
@@ -102,7 +107,7 @@ namespace Octokit.Reactive
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Stars a repository for the authenticated user.
|
||||
/// Stars a repository for the authenticated user
|
||||
/// </summary>
|
||||
/// <param name="owner">The owner of the repository to star</param>
|
||||
/// <param name="name">The name of the repository to star</param>
|
||||
@@ -116,7 +121,7 @@ namespace Octokit.Reactive
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Unstars a repository for the authenticated user.
|
||||
/// Unstars a repository for the authenticated user
|
||||
/// </summary>
|
||||
/// <param name="owner">The owner of the repository to unstar</param>
|
||||
/// <param name="name">The name of the repository to unstar</param>
|
||||
|
||||
@@ -15,6 +15,12 @@ namespace Octokit.Reactive
|
||||
_client = client;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Returns a list of <see cref="Contributor"/> for the given repository
|
||||
/// </summary>
|
||||
/// <param name="owner">The owner of the repository</param>
|
||||
/// <param name="repositoryName">The name of the repository</param>
|
||||
/// <returns>A list of <see cref="Contributor"/></returns>
|
||||
public IObservable<IEnumerable<Contributor>> GetContributors(string owner, string repositoryName)
|
||||
{
|
||||
Ensure.ArgumentNotNullOrEmptyString(owner, "owner");
|
||||
@@ -23,6 +29,12 @@ namespace Octokit.Reactive
|
||||
return _client.Repository.Statistics.GetContributors(owner, repositoryName).ToObservable();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Returns the last year of commit activity grouped by week.
|
||||
/// </summary>
|
||||
/// <param name="owner">The owner of the repository</param>
|
||||
/// <param name="repositoryName">The name of the repository</param>
|
||||
/// <returns>The last year of <see cref="CommitActivity"/></returns>
|
||||
public IObservable<CommitActivity> GetCommitActivity(string owner, string repositoryName)
|
||||
{
|
||||
Ensure.ArgumentNotNullOrEmptyString(owner, "owner");
|
||||
@@ -31,6 +43,12 @@ namespace Octokit.Reactive
|
||||
return _client.Repository.Statistics.GetCommitActivity(owner, repositoryName).ToObservable();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Returns a weekly aggregate of the number of additions and deletions pushed to a repository.
|
||||
/// </summary>
|
||||
/// <param name="owner">The owner of the repository</param>
|
||||
/// <param name="repositoryName">The name of the repository</param>
|
||||
/// <returns>Returns a weekly aggregate of the number additions and deletion</returns>
|
||||
public IObservable<CodeFrequency> GetCodeFrequency(string owner, string repositoryName)
|
||||
{
|
||||
Ensure.ArgumentNotNullOrEmptyString(owner, "owner");
|
||||
@@ -39,6 +57,12 @@ namespace Octokit.Reactive
|
||||
return _client.Repository.Statistics.GetCodeFrequency(owner, repositoryName).ToObservable();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Returns the total commit counts for the owner and total commit counts in total.
|
||||
/// </summary>
|
||||
/// <param name="owner">The owner of the repository</param>
|
||||
/// <param name="repositoryName">The name of the repository</param>
|
||||
/// <returns>Returns <see cref="Participation"/>from oldest week to now</returns>
|
||||
public IObservable<Participation> GetParticipation(string owner, string repositoryName)
|
||||
{
|
||||
Ensure.ArgumentNotNullOrEmptyString(owner, "owner");
|
||||
@@ -47,6 +71,12 @@ namespace Octokit.Reactive
|
||||
return _client.Repository.Statistics.GetParticipation(owner, repositoryName).ToObservable();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Returns a list of the number of commits per hour in each day
|
||||
/// </summary>
|
||||
/// <param name="owner">The owner of the repository</param>
|
||||
/// <param name="repositoryName">The name of the repository</param>
|
||||
/// <returns>Returns commit counts per hour in each day</returns>
|
||||
public IObservable<PunchCard> GetPunchCard(string owner, string repositoryName)
|
||||
{
|
||||
Ensure.ArgumentNotNullOrEmptyString(owner, "owner");
|
||||
|
||||
@@ -5,6 +5,12 @@ using Octokit.Reactive.Internal;
|
||||
|
||||
namespace Octokit.Reactive
|
||||
{
|
||||
/// <summary>
|
||||
/// A client for GitHub's Org Teams API.
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// See the <a href="http://developer.github.com/v3/orgs/teams/">Orgs API documentation</a> for more information.
|
||||
/// </remarks>
|
||||
public class ObservableTeamsClient : IObservableTeamsClient
|
||||
{
|
||||
readonly IConnection _connection;
|
||||
|
||||
@@ -5,6 +5,12 @@ using System.Reactive.Threading.Tasks;
|
||||
|
||||
namespace Octokit.Reactive
|
||||
{
|
||||
/// <summary>
|
||||
/// A client for GitHub's User Emails API.
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// See the <a href="http://developer.github.com/v3/users/emails/">User Emails API documentation</a> for more information.
|
||||
/// </remarks>
|
||||
public class ObservableUserEmailsClient : IObservableUserEmailsClient
|
||||
{
|
||||
readonly IUserEmailsClient _client;
|
||||
@@ -18,11 +24,26 @@ namespace Octokit.Reactive
|
||||
_connection = client.Connection;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Gets all email addresses for the authenticated user.
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// http://developer.github.com/v3/users/emails/#list-email-addresses-for-a-user
|
||||
/// </remarks>
|
||||
/// <returns>The <see cref="EmailAddress"/>es for the authenticated user.</returns>
|
||||
public IObservable<EmailAddress> GetAll()
|
||||
{
|
||||
return _connection.GetAndFlattenAllPages<EmailAddress>(ApiUrls.Emails());
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Adds email addresses for the authenticated user.
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// http://developer.github.com/v3/users/emails/#add-email-addresses
|
||||
/// </remarks>
|
||||
/// <param name="emailAddresses">The email addresses to add.</param>
|
||||
/// <returns>Returns the added <see cref="EmailAddress"/>es.</returns>
|
||||
public IObservable<string> Add(params string[] emailAddresses)
|
||||
{
|
||||
return _client.Add(emailAddresses).ToObservable().SelectMany(a => a);
|
||||
|
||||
Reference in New Issue
Block a user