Files
octokit.net/Octokit.Reactive/IObservableSshKeysClient.cs
Haacked 38264fcde5 Replace long with int
Turns out that we store these values as int(11) in MySql.
The 11 is irrelevant and pertains to display. int is a 4 byte
(aka 32 bit) integer. So this maps to a .NET Int32 (aka int).

While changing keeping it long might be future proofing, it also
requires changes to GHfW and I figure let's jump that hurdle
when we get there.
2013-09-24 14:12:50 -07:00

60 lines
2.5 KiB
C#

using System;
using System.Collections.Generic;
using System.Diagnostics.CodeAnalysis;
using System.Reactive;
namespace Octokit.Reactive
{
public interface IObservableSshKeysClient
{
/// <summary>
/// Retrieves the <see cref="SshKey"/> for the specified id.
/// </summary>
/// <param name="id">The ID of the SSH key.</param>
/// <returns>A <see cref="SshKey"/></returns>
[SuppressMessage("Microsoft.Naming", "CA1716:IdentifiersShouldNotMatchKeywords", MessageId = "Get")]
IObservable<SshKey> Get(int id);
/// <summary>
/// Retrieves the <see cref="SshKey"/> for the specified id.
/// </summary>
/// <param name="user">The login of the user.</param>
/// <returns>A <see cref="IReadOnlyPagedCollection{SshKey}"/> of <see cref="SshKey"/>.</returns>
IObservable<IReadOnlyCollection<SshKey>> GetAll(string user);
/// <summary>
/// Retrieves the <see cref="SshKey"/> for the specified id.
/// </summary>
/// <exception cref="AuthenticationException">Thrown if the client is not authenticated.</exception>
/// <returns>A <see cref="IReadOnlyPagedCollection{SshKey}"/> of <see cref="SshKey"/>.</returns>
[SuppressMessage("Microsoft.Design", "CA1024:UsePropertiesWhereAppropriate",
Justification = "Makes a network request")]
IObservable<IReadOnlyCollection<SshKey>> GetAllForCurrent();
/// <summary>
/// Update the specified <see cref="UserUpdate"/>.
/// </summary>
/// <param name="key"></param>
/// <exception cref="AuthenticationException">Thrown if the client is not authenticated.</exception>
/// <returns>A <see cref="User"/></returns>
IObservable<SshKey> Create(SshKeyUpdate key);
/// <summary>
/// Update the specified <see cref="UserUpdate"/>.
/// </summary>
/// <param name="id"></param>
/// <param name="key"></param>
/// <exception cref="AuthenticationException">Thrown if the client is not authenticated.</exception>
/// <returns>A <see cref="User"/></returns>
IObservable<SshKey> Update(int id, SshKeyUpdate key);
/// <summary>
/// Update the specified <see cref="UserUpdate"/>.
/// </summary>
/// <param name="id">The id of the SSH key</param>
/// <exception cref="AuthenticationException">Thrown if the client is not authenticated.</exception>
/// <returns>A <see cref="User"/></returns>
IObservable<Unit> Delete(int id);
}
}