mirror of
https://github.com/zoriya/octokit.net.git
synced 2026-06-05 11:40:42 +00:00
Add client for organization outside collaborators (#1639)
* Add client for organization outside collaborators * Add unit/integration tests * Add methods for removing an outside collaborator * Add unit/integration tests * Add new Put method to Connection which accepts a preview header * Add methods for converting an org member to an outside collaborator * Fix copy paste errors in new exceptions * According to API docs, a 403 should be returned if the member is not a member of the org, but a 404 is actually returned * Add unit/integration tests * Remove unused using directives * Got a bit overzealous with my removal of using directives * Fix integration tests by using the configured Organization and test username rather than henrik's :) * Remove ApiOptions overloads as it isn't currently supported * Fix XML doc grammar * Fix failing unit tests * Missed a couple of nameof replacements
This commit is contained in:
committed by
Ryan Gribble
parent
cda714bef6
commit
1d1ca0a572
@@ -430,6 +430,21 @@ namespace Octokit
|
||||
return response.HttpResponse.StatusCode;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Performs an asynchronous HTTP PUT request that expects an empty response.
|
||||
/// </summary>
|
||||
/// <param name="uri">URI endpoint to send request to</param>
|
||||
/// <param name="accepts">Specifies accepted response media types.</param>
|
||||
/// <returns>The returned <seealso cref="HttpStatusCode"/></returns>
|
||||
public async Task<HttpStatusCode> Put(Uri uri, string accepts)
|
||||
{
|
||||
Ensure.ArgumentNotNull(uri, nameof(uri));
|
||||
Ensure.ArgumentNotNull(accepts, nameof(accepts));
|
||||
|
||||
var response = await SendData<object>(uri, HttpMethod.Put, null, accepts, null, CancellationToken.None).ConfigureAwait(false);
|
||||
return response.HttpResponse.StatusCode;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Performs an asynchronous HTTP DELETE request that expects an empty response.
|
||||
/// </summary>
|
||||
|
||||
@@ -214,6 +214,14 @@ namespace Octokit
|
||||
/// <returns>The returned <seealso cref="HttpStatusCode"/></returns>
|
||||
Task<HttpStatusCode> Put(Uri uri);
|
||||
|
||||
/// <summary>
|
||||
/// Performs an asynchronous HTTP PUT request that expects an empty response.
|
||||
/// </summary>
|
||||
/// <param name="uri">URI endpoint to send request to</param>
|
||||
/// <param name="accepts">Specifies accepted response media types.</param>
|
||||
/// <returns>The returned <seealso cref="HttpStatusCode"/></returns>
|
||||
Task<HttpStatusCode> Put(Uri uri, string accepts);
|
||||
|
||||
/// <summary>
|
||||
/// Performs an asynchronous HTTP DELETE request that expects an empty response.
|
||||
/// </summary>
|
||||
|
||||
Reference in New Issue
Block a user