Merge branch 'master' into api-paging-part-deux

This commit is contained in:
Brendan Forster
2016-02-24 11:40:43 +11:00
54 changed files with 2609 additions and 69 deletions
+15
View File
@@ -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>
+7
View File
@@ -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");
+9
View File
@@ -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>
+9
View File
@@ -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"/>