Files
octokit.net/Octokit.Reactive/Clients/IObservableFollowersClient.cs
2015-03-21 23:55:42 +10:00

97 lines
4.5 KiB
C#
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

using System;
using System.Collections.Generic;
using System.Diagnostics.CodeAnalysis;
using System.Linq;
using System.Reactive;
using System.Text;
using System.Threading.Tasks;
namespace Octokit.Reactive
{
public interface IObservableFollowersClient
{
/// <summary>
/// List the authenticated users followers
/// </summary>
/// <remarks>
/// See the <a href="http://developer.github.com/v3/users/followers/#list-followers-of-a-user">API documentation</a> for more information.
/// </remarks>
/// <returns>A <see cref="IObservable{User}"/> of <see cref="User"/>s that follow the authenticated user.</returns>
[SuppressMessage("Microsoft.Design", "CA1024:UsePropertiesWhereAppropriate")]
IObservable<User> GetAllForCurrent();
/// <summary>
/// List a users followers
/// </summary>
/// <param name="login">The login name for the user</param>
/// <remarks>
/// See the <a href="http://developer.github.com/v3/users/followers/#list-followers-of-a-user">API documentation</a> for more information.
/// </remarks>
/// <returns>A <see cref="IObservable{User}"/> of <see cref="User"/>s that follow the passed user.</returns>
IObservable<User> GetAll(string login);
/// <summary>
/// List who the authenticated user is following
/// </summary>
/// <remarks>
/// See the <a href="http://developer.github.com/v3/users/followers/#list-users-followed-by-another-user">API documentation</a> for more information.
/// </remarks>
/// <returns>A <see cref="IObservable{User}"/> of <see cref="User"/>s that the authenticated user follows.</returns>
[SuppressMessage("Microsoft.Design", "CA1024:UsePropertiesWhereAppropriate")]
IObservable<User> GetAllFollowingForCurrent();
/// <summary>
/// List who a user is following
/// </summary>
/// <param name="login">The login name of the user</param>
/// <remarks>
/// See the <a href="http://developer.github.com/v3/users/followers/#list-users-followed-by-another-user">API documentation</a> for more information.
/// </remarks>
/// <returns>A <see cref="IObservable{User}"/> of <see cref="User"/>s that the passed user follows.</returns>
IObservable<User> GetAllFollowing(string login);
/// <summary>
/// Check if the authenticated user follows another user
/// </summary>
/// <param name="following">The login name of the other user</param>
/// <remarks>
/// See the <a href="http://developer.github.com/v3/users/followers/#check-if-you-are-following-a-user">API documentation</a> for more information.
/// </remarks>
/// <returns>A <c>bool</c> representing the success of the operation.</returns>
IObservable<bool> IsFollowingForCurrent(string following);
/// <summary>
/// Check if one user follows another user
/// </summary>
/// <param name="login">The login name of the user</param>
/// <param name="following">The login name of the other user</param>
/// <remarks>
/// See the <a href="http://developer.github.com/v3/users/followers/#check-if-one-user-follows-another">API documentation</a> for more information.
/// </remarks>
/// <returns>A <c>bool</c> representing the success of the operation.</returns>
IObservable<bool> IsFollowing(string login, string following);
/// <summary>
/// Follow a user
/// </summary>
/// <param name="login">The login name of the user to follow</param>
/// <remarks>
/// See the <a href="http://developer.github.com/v3/users/followers/#follow-a-user">API documentation</a> for more information.
/// </remarks>
/// <returns>A <c>bool</c> representing the success of the operation.</returns>
IObservable<bool> Follow(string login);
/// <summary>
/// Unfollow a user
/// </summary>
/// <param name="login">The login name of the user to unfollow</param>
/// <remarks>
/// See the <a href="http://developer.github.com/v3/users/followers/#unfollow-a-user">API documentation</a> for more information.
/// </remarks>
/// <returns></returns>
[SuppressMessage("Microsoft.Naming", "CA1704:IdentifiersShouldBeSpelledCorrectly", MessageId = "Unfollow",
Justification = "Unfollow is consistent with the GitHub website")]
IObservable<Unit> Unfollow(string login);
}
}