[WIP] Add new Project API Preview (#1480)

Add Projects API client (preview)
This commit is contained in:
Martin Scholz
2017-07-23 00:18:34 +02:00
committed by Ryan Gribble
parent fc5bc947aa
commit 329ef960ed
45 changed files with 5821 additions and 2 deletions
+8
View File
@@ -222,6 +222,14 @@ namespace Octokit
return response.HttpResponse.StatusCode;
}
public async Task<HttpStatusCode> Post(Uri uri, object body, string accepts)
{
Ensure.ArgumentNotNull(uri, "uri");
var response = await SendData<object>(uri, HttpMethod.Post, body, accepts, null, CancellationToken.None).ConfigureAwait(false);
return response.HttpResponse.StatusCode;
}
public Task<IApiResponse<T>> Post<T>(Uri uri)
{
Ensure.ArgumentNotNull(uri, "uri");
+10 -1
View File
@@ -96,9 +96,18 @@ namespace Octokit
/// Performs an asynchronous HTTP POST request.
/// </summary>
/// <param name="uri">URI endpoint to send request to</param>
/// <returns><seealso cref="IResponse"/> representing the received HTTP response</returns>
/// <returns>The returned <seealso cref="HttpStatusCode"/></returns>
Task<HttpStatusCode> Post(Uri uri);
/// <summary>
/// Performs an asynchronous HTTP POST request.
/// </summary>
/// <param name="uri">URI endpoint to send request to</param>
/// <param name="body">The object to serialize as the body of the request</param>
/// <param name="accepts">Specifies accepted response media types.</param>
/// <returns>The returned <seealso cref="HttpStatusCode"/></returns>
Task<HttpStatusCode> Post(Uri uri, object body, string accepts);
/// <summary>
/// Performs an asynchronous HTTP POST request.
/// Attempts to map the response body to an object of type <typeparamref name="T"/>