🔥 ITeamsClient.IsMember()

This commit is contained in:
Mordechai Zuber
2016-03-27 11:29:57 +03:00
parent fe51d42c23
commit cacd6020f2
4 changed files with 0 additions and 60 deletions
@@ -125,16 +125,6 @@ namespace Octokit.Reactive
/// <returns><see langword="true"/> if the user was removed from the team; <see langword="false"/> otherwise.</returns>
IObservable<bool> RemoveMembership(int id, string login);
/// <summary>
/// Gets whether the user with the given <paramref name="login"/>
/// is a member of the team with the given <paramref name="id"/>.
/// </summary>
/// <param name="id">The team to check.</param>
/// <param name="login">The user to check.</param>
/// <returns><see langword="true"/> if the user is a member of the team; <see langword="false"/> otherwise.</returns>
[Obsolete("Use GetMembership(id, login) to detect pending memberships")]
IObservable<bool> IsMember(int id, string login);
/// <summary>
/// Gets whether the user with the given <paramref name="login"/>
/// is a member of the team with the given <paramref name="id"/>.
@@ -189,21 +189,6 @@ namespace Octokit.Reactive
return _client.RemoveMembership(id, login).ToObservable();
}
/// <summary>
/// Gets whether the user with the given <paramref name="login"/>
/// is a member of the team with the given <paramref name="id"/>.
/// </summary>
/// <param name="id">The team to check.</param>
/// <param name="login">The user to check.</param>
/// <returns><see langword="true"/> if the user is a member of the team; <see langword="false"/> otherwise.</returns>
[Obsolete("Use GetMembership(id, login) to detect pending memberships")]
public IObservable<bool> IsMember(int id, string login)
{
Ensure.ArgumentNotNullOrEmptyString(login, "login");
return _client.IsMember(id, login).ToObservable();
}
/// <summary>
/// Gets whether the user with the given <paramref name="login"/>
/// is a member of the team with the given <paramref name="id"/>.
-10
View File
@@ -126,16 +126,6 @@ namespace Octokit
/// <returns><see langword="true"/> if the user was removed from the team; <see langword="false"/> otherwise.</returns>
Task<bool> RemoveMembership(int id, string login);
/// <summary>
/// Gets whether the user with the given <paramref name="login"/>
/// is a member of the team with the given <paramref name="id"/>.
/// </summary>
/// <param name="id">The team to check.</param>
/// <param name="login">The user to check.</param>
/// <returns><see langword="true"/> if the user is a member of the team; <see langword="false"/> otherwise.</returns>
[Obsolete("Use GetMembership(id, login) as this will report on pending requests")]
Task<bool> IsMember(int id, string login);
/// <summary>
/// Gets whether the user with the given <paramref name="login"/>
/// is a member of the team with the given <paramref name="id"/>.
-25
View File
@@ -252,31 +252,6 @@ namespace Octokit
}
}
/// <summary>
/// Gets whether the user with the given <paramref name="login"/>
/// is a member of the team with the given <paramref name="id"/>.
/// </summary>
/// <param name="id">The team to check.</param>
/// <param name="login">The user to check.</param>
/// <returns><see langword="true"/> if the user is a member of the team; <see langword="false"/> otherwise.</returns>
[Obsolete("Use GetMembership(id, login) as this will report on pending requests")]
public async Task<bool> IsMember(int id, string login)
{
Ensure.ArgumentNotNullOrEmptyString(login, "login");
var endpoint = ApiUrls.TeamMember(id, login);
try
{
var response = await ApiConnection.Connection.GetResponse<string>(endpoint).ConfigureAwait(false);
return response.HttpResponse.StatusCode == HttpStatusCode.NoContent;
}
catch (NotFoundException)
{
return false;
}
}
/// <summary>
/// Returns all team's repositories.
/// </summary>