Files
octokit.net/Octokit.Reactive/Clients/IObservableRepositoryDeployKeysClient.cs
2015-08-04 21:12:37 -07:00

56 lines
2.5 KiB
C#

using System;
using System.Diagnostics.CodeAnalysis;
using System.Reactive;
namespace Octokit.Reactive
{
public interface IObservableRepositoryDeployKeysClient
{
/// <summary>
/// Get a single deploy key by number for a repository.
/// </summary>
/// <remarks>
/// See the <a href="https://developer.github.com/v3/repos/keys/#get"> 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="number">The id of the deploy key.</param>
[SuppressMessage("Microsoft.Naming", "CA1716:IdentifiersShouldNotMatchKeywords", MessageId = "Get")]
IObservable<DeployKey> Get(string owner, string name, int number);
/// <summary>
/// Get all deploy keys for a repository.
/// </summary>
/// <remarks>
/// See the <a href="https://developer.github.com/v3/repos/keys/#list"> 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>
IObservable<DeployKey> GetAll(string owner, string name);
/// <summary>
/// Creates a new deploy key for a repository.
/// </summary>
/// <remarks>
/// See the <a href="https://developer.github.com/v3/repos/keys/#create"> 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="newDeployKey">The deploy key to create for the repository.</param>
/// <returns></returns>
IObservable<DeployKey> Create(string owner, string name, NewDeployKey newDeployKey);
/// <summary>
/// Deletes a deploy key from a repository.
/// </summary>
/// <remarks>
/// See the <a href="https://developer.github.com/v3/repos/keys/#delete"> 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="number">The id of the deploy key to delete.</param>
/// <returns></returns>
IObservable<Unit> Delete(string owner, string name, int number);
}
}