mirror of
https://github.com/zoriya/octokit.net.git
synced 2026-06-06 03:55:55 +00:00
feat: Adds 4 new Reaction delete routes and obsoleting existing routes (#2494)
This commit is contained in:
@@ -1,4 +1,5 @@
|
||||
using System;
|
||||
using System.Reactive;
|
||||
using System.Reactive.Threading.Tasks;
|
||||
using Octokit.Reactive.Internal;
|
||||
|
||||
@@ -107,5 +108,38 @@ namespace Octokit.Reactive
|
||||
|
||||
return _client.Create(repositoryId, number, reaction).ToObservable();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Deletes a reaction for a specified Issue
|
||||
/// </summary>
|
||||
/// <remarks>https://docs.github.com/en/rest/reactions#delete-an-issue-reaction</remarks>
|
||||
/// <param name="owner">The owner of the repository</param>
|
||||
/// <param name="name">The name of the repository</param>
|
||||
/// <param name="issueNumber">The issue number</param>
|
||||
/// <param name="reactionId">The reaction id</param>
|
||||
/// <returns></returns>
|
||||
public IObservable<Unit> Delete(string owner, string name, int issueNumber, int reactionId)
|
||||
{
|
||||
Ensure.ArgumentNotNullOrEmptyString(owner, nameof(owner));
|
||||
Ensure.ArgumentNotNullOrEmptyString(name, nameof(name));
|
||||
Ensure.ArgumentNotNull(reactionId, nameof(reactionId));
|
||||
|
||||
return _client.Delete(owner, name, issueNumber, reactionId).ToObservable();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Deletes a reaction for a specified Issue
|
||||
/// </summary>
|
||||
/// <remarks>https://docs.github.com/en/rest/reactions#delete-an-issue-reaction</remarks>
|
||||
/// <param name="repositoryId">The owner of the repository</param>
|
||||
/// <param name="issueNumber">The issue number</param>
|
||||
/// <param name="reactionId">The reaction id</param>
|
||||
/// <returns></returns>
|
||||
public IObservable<Unit> Delete(long repositoryId, int issueNumber, int reactionId)
|
||||
{
|
||||
Ensure.ArgumentNotNull(reactionId, nameof(reactionId));
|
||||
|
||||
return _client.Delete(repositoryId, issueNumber, reactionId).ToObservable();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user