diff --git a/Octokit/Http/IApiConnection.cs b/Octokit/Http/IApiConnection.cs
index 86811bf9..15168231 100644
--- a/Octokit/Http/IApiConnection.cs
+++ b/Octokit/Http/IApiConnection.cs
@@ -7,20 +7,101 @@ using System.Threading.Tasks;
namespace Octokit
{
///
- /// Provides type-friendly convenience methods the wrap methods.
+ /// A connection for making API requests against URI endpoints.
+ /// Provides type-friendly convenience methods that wrap methods.
///
public interface IApiConnection
{
+ ///
+ /// Gets the API resource at the specified URI.
+ ///
+ /// Type of the API resource to get.
+ /// URI of the API resource to get.
+ /// Parameters to add to the API request.
+ /// The API resource.
+ /// Thrown when an API error occurs.
[SuppressMessage("Microsoft.Naming", "CA1716:IdentifiersShouldNotMatchKeywords", MessageId = "Get",
Justification = "It's fiiiine. It's fine. Trust us.")]
Task Get(Uri uri, IDictionary parameters);
+
+ ///
+ /// Gets the HTML content of the API resource at the specified URI.
+ ///
+ /// URI of the API resource to get.
+ /// Parameters to add to the API request.
+ /// The API resource's HTML content.
+ /// Thrown when an API error occurs.
Task GetHtml(Uri uri, IDictionary parameters);
+
+ ///
+ /// Gets all API resources in the list at the specified URI.
+ ///
+ /// Type of the API resource in the list.
+ /// URI of the API resource to get.
+ /// Parameters to add to the API request.
+ /// of the The API resources in the list.
+ /// Thrown when an API error occurs.
Task> GetAll(Uri uri, IDictionary parameters);
+
+ ///
+ /// Creates a new API resource in the list at the specified URI.
+ ///
+ /// The API resource's type.
+ /// URI of the API resource to get.
+ /// Object that describes the new API resource; this will be serialized and used as the request's body.
+ /// The created API resource.
+ /// Thrown when an API error occurs.
Task Post(Uri uri, object data);
- Task Post(Uri uri, Stream rawData, string contentType, string accepts);
+
+ ///
+ /// Creates a new API resource in the list at the specified URI.
+ ///
+ /// The API resource's type.
+ /// URI of the API resource to get.
+ /// A to use as the API request's body.
+ /// Content type of the API request.
+ /// Accept header to use for the API request.
+ /// The created API resource.
+ /// Thrown when an API error occurs.
+ Task Post(Uri uri, Stream rawData, string contentType, string accepts);
+
+ ///
+ /// Creates or replaces the API resource at the specified URI.
+ ///
+ /// The API resource's type.
+ /// URI of the API resource to create or replace.
+ /// Object that describes the API resource; this will be serialized and used as the request's body.
+ /// The created API resource.
+ /// Thrown when an API error occurs.
Task Put(Uri uri, object data);
+
+ ///
+ /// Creates or replaces the API resource at the specified URI.
+ ///
+ /// The API resource's type.
+ /// URI of the API resource to create or replace.
+ /// Object that describes the API resource; this will be serialized and used as the request's body.
+ /// The two-factor authentication code in response to the current user's previous challenge.
+ /// The created API resource.
+ /// Thrown when an API error occurs.
Task Put(Uri uri, object data, string twoFactorAuthenticationCode);
+
+ ///
+ /// Updates the API resource at the specified URI.
+ ///
+ /// The API resource's type.
+ /// URI of the API resource to update.
+ /// /// Object that describes the API resource; this will be serialized and used as the request's body.
+ /// The updated API resource.
+ /// Thrown when an API error occurs.
Task Patch(Uri uri, object data);
+
+ ///
+ /// Deletes the API object at the specified URI.
+ ///
+ /// The API resource's type.
+ /// URI of the API resource to delete.
+ /// A for the request's execution.
[SuppressMessage("Microsoft.Design", "CA1004:GenericMethodsShouldProvideTypeParameter", Justification="Legitimate, but I'm not fixing it just yet.")]
Task Delete(Uri uri);
}