diff --git a/Octokit/Http/IConnection.cs b/Octokit/Http/IConnection.cs index a7c01b13..94862b84 100644 --- a/Octokit/Http/IConnection.cs +++ b/Octokit/Http/IConnection.cs @@ -5,23 +5,100 @@ using System.Threading.Tasks; namespace Octokit { + /// + /// A connection for making HTTP requests against URI endpoints. + /// public interface IConnection { + /// + /// Performs an asynchronous HTTP GET request that expects a containing HTML. + /// + /// URI endpoint to send request to + /// Querystring parameters for the request + /// representing the received HTTP response Task> GetHtml(Uri uri, IDictionary parameters); + + /// + /// Performs an asynchronous HTTP GET request. + /// Attempts to map the response to an object of type + /// + /// The type to map the response to + /// URI endpoint to send request to + /// Querystring parameters for the request + /// Specifies accepted response media types. + /// representing the received HTTP response Task> GetAsync(Uri uri, IDictionary parameters, string accepts); + + /// + /// Performs an asynchronous HTTP PATCH request. + /// Attempts to map the response body to an object of type + /// + /// The type to map the response to + /// URI endpoint to send request to + /// The object to serialize as the body of the request + /// representing the received HTTP response Task> PatchAsync(Uri uri, object body); + + /// + /// Performs an asynchronous HTTP POST request. + /// Attempts to map the response body to an object of type + /// + /// The type to map the response to + /// URI endpoint to send request to + /// The object to serialize as the body of the request + /// Specifies accepted response media types. + /// Specifies the media type of the request body + /// representing the received HTTP response Task> PostAsync(Uri uri, object body, string accepts, string contentType); + + /// + /// Performs an asynchronous HTTP PUT request. + /// Attempts to map the response body to an object of type + /// + /// The type to map the response to + /// URI endpoint to send request to + /// The body of the request + /// representing the received HTTP response Task> PutAsync(Uri uri, object body); + + /// + /// Performs an asynchronous HTTP PUT request using the provided two factor authentication code. + /// Attempts to map the response body to an object of type + /// + /// The type to map the response to + /// URI endpoint to send request to + /// The object to serialize as the body of the request + /// Two factory authentication code to use + /// representing the received HTTP response Task> PutAsync(Uri uri, object body, string twoFactorAuthenticationCode); - + + /// + /// Performs an asynchronous HTTP PUT request that expects an empty response. + /// + /// URI endpoint to send request to + /// The returned Task PutAsync(Uri uri); + /// + /// Performs an asynchronous HTTP DELETE request that expects an empty response. + /// + /// URI endpoint to send request to + /// The returned Task DeleteAsync(Uri uri); + /// + /// Base address for the connection. + /// Uri BaseAddress { get; } + /// + /// Gets the used to provide credentials for the connection. + /// ICredentialStore CredentialStore { get; } + /// + /// Gets or sets the credentials used by the connection. + /// Credentials Credentials { get; set; } } }