Files
octokit.net/Octokit.Reactive/IObservableUsersClient.cs
2013-10-03 16:02:53 -07:00

39 lines
1.5 KiB
C#

using System;
using System.Diagnostics.CodeAnalysis;
namespace Octokit.Reactive
{
public interface IObservableUsersClient
{
/// <summary>
/// Returns the user specified by the login.
/// </summary>
/// <param name="login">The login name for the user</param>
[SuppressMessage("Microsoft.Naming", "CA1716:IdentifiersShouldNotMatchKeywords", MessageId = "Get")]
[SuppressMessage("Microsoft.Naming", "CA1726:UsePreferredTerms", MessageId = "login")]
IObservable<User> Get(string login);
/// <summary>
/// Returns a <see cref="User"/> for the current authenticated user.
/// </summary>
/// <exception cref="AuthorizationException">Thrown if the client is not authenticated.</exception>
/// <returns>A <see cref="User"/></returns>
IObservable<User> Current();
/// <summary>
/// Update the specified <see cref="UserUpdate"/>.
/// </summary>
/// <param name="user"></param>
/// <exception cref="AuthorizationException">Thrown if the client is not authenticated.</exception>
/// <returns>A <see cref="User"/></returns>
IObservable<User> Update(UserUpdate user);
/// <summary>
/// Returns emails for the current user.
/// </summary>
/// <returns></returns>
[SuppressMessage("Microsoft.Design", "CA1024:UsePropertiesWhereAppropriate")]
IObservable<IReadOnlyList<EmailAddress>> GetEmails();
}
}