mirror of
https://github.com/zoriya/octokit.net.git
synced 2025-12-19 05:35:11 +00:00
39 lines
1.5 KiB
C#
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();
|
|
}
|
|
}
|