mirror of
https://github.com/zoriya/octokit.net.git
synced 2026-06-06 03:55:55 +00:00
Merge branch 'master' into api-paging-part-deux
This commit is contained in:
@@ -199,6 +199,21 @@ namespace Octokit
|
||||
return Connection.Post(uri);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Creates a new API resource in the list at the specified URI.
|
||||
/// </summary>
|
||||
/// <typeparam name="T">The API resource's type.</typeparam>
|
||||
/// <param name="uri">URI of the API resource to get</param>
|
||||
/// <returns>The created API resource.</returns>
|
||||
/// <exception cref="ApiException">Thrown when an API error occurs.</exception>
|
||||
public async Task<T> Post<T>(Uri uri)
|
||||
{
|
||||
Ensure.ArgumentNotNull(uri, "uri");
|
||||
|
||||
var response = await Connection.Post<T>(uri).ConfigureAwait(false);
|
||||
return response.Body;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Creates a new API resource in the list at the specified URI.
|
||||
/// </summary>
|
||||
|
||||
@@ -237,6 +237,13 @@ namespace Octokit
|
||||
return response.HttpResponse.StatusCode;
|
||||
}
|
||||
|
||||
public Task<IApiResponse<T>> Post<T>(Uri uri)
|
||||
{
|
||||
Ensure.ArgumentNotNull(uri, "uri");
|
||||
|
||||
return SendData<T>(uri, HttpMethod.Post, null, null, null, CancellationToken.None);
|
||||
}
|
||||
|
||||
public Task<IApiResponse<T>> Post<T>(Uri uri, object body, string accepts, string contentType)
|
||||
{
|
||||
Ensure.ArgumentNotNull(uri, "uri");
|
||||
|
||||
@@ -133,6 +133,15 @@ namespace Octokit
|
||||
/// <exception cref="ApiException">Thrown when an API error occurs.</exception>
|
||||
Task Post(Uri uri);
|
||||
|
||||
/// <summary>
|
||||
/// Creates a new API resource in the list at the specified URI.
|
||||
/// </summary>
|
||||
/// <typeparam name="T">The API resource's type.</typeparam>
|
||||
/// <param name="uri">URI endpoint to send request to</param>
|
||||
/// <returns>The created API resource.</returns>
|
||||
/// <exception cref="ApiException">Thrown when an API error occurs.</exception>
|
||||
Task<T> Post<T>(Uri uri);
|
||||
|
||||
/// <summary>
|
||||
/// Creates a new API resource in the list at the specified URI.
|
||||
/// </summary>
|
||||
|
||||
@@ -105,6 +105,15 @@ namespace Octokit
|
||||
/// <returns><seealso cref="IResponse"/> representing the received HTTP response</returns>
|
||||
Task<HttpStatusCode> Post(Uri uri);
|
||||
|
||||
/// <summary>
|
||||
/// Performs an asynchronous HTTP POST request.
|
||||
/// Attempts to map the response body to an object of type <typeparamref name="T"/>
|
||||
/// </summary>
|
||||
/// <typeparam name="T">The type to map the response to</typeparam>
|
||||
/// <param name="uri">URI endpoint to send request to</param>
|
||||
/// <returns><seealso cref="IResponse"/> representing the received HTTP response</returns>
|
||||
Task<IApiResponse<T>> Post<T>(Uri uri);
|
||||
|
||||
/// <summary>
|
||||
/// Performs an asynchronous HTTP POST request.
|
||||
/// Attempts to map the response body to an object of type <typeparamref name="T"/>
|
||||
|
||||
Reference in New Issue
Block a user