From c96b00650eeb03b9f15430d450089098d9aa44cf Mon Sep 17 00:00:00 2001 From: Haacked Date: Wed, 11 Dec 2013 14:22:39 -0800 Subject: [PATCH] Add comments to concrete types We now have a build task that copies comments from interface to implementation. --- Octokit/Clients/ActivitiesClient.cs | 6 +++ Octokit/Clients/AssigneesClient.cs | 6 +++ Octokit/Clients/BlobsClient.cs | 6 +++ Octokit/Clients/CommitStatusClient.cs | 6 +-- Octokit/Clients/CommitsClient.cs | 6 +++ Octokit/Clients/EventsClient.cs | 6 +++ Octokit/Clients/GistCommentsClient.cs | 6 +++ Octokit/Clients/GistsClient.cs | 6 +++ Octokit/Clients/GitDatabaseClient.cs | 6 +++ Octokit/Clients/IssueCommentsClient.cs | 54 +++++++++----------- Octokit/Clients/IssuesClient.cs | 23 ++++++++- Octokit/Clients/IssuesEventsClient.cs | 6 +++ Octokit/Clients/MilestonesClient.cs | 14 +++-- Octokit/Clients/MiscellaneousClient.cs | 4 +- Octokit/Clients/NotificationsClient.cs | 6 +++ Octokit/Clients/OrganizationMembersClient.cs | 6 +++ Octokit/Clients/OrganizationsClient.cs | 3 ++ Octokit/Clients/ReferencesClient.cs | 6 +++ Octokit/Clients/SshKeysClient.cs | 6 +++ Octokit/Clients/StarredClient.cs | 50 ++++++++++-------- Octokit/Clients/TagsClient.cs | 6 +++ Octokit/Clients/TeamsClient.cs | 4 +- Octokit/Clients/TreesClient.cs | 6 +++ Octokit/Clients/UsersClient.cs | 12 ++--- Octokit/Helpers/IApiPagination.cs | 6 +++ Octokit/Http/ApiConnection.cs | 2 +- Octokit/Http/Connection.cs | 27 +++++++++- Octokit/Http/HttpClientAdapter.cs | 6 +++ Octokit/Http/IConnection.cs | 7 +++ Octokit/IGitHubClient.cs | 3 ++ 30 files changed, 240 insertions(+), 71 deletions(-) diff --git a/Octokit/Clients/ActivitiesClient.cs b/Octokit/Clients/ActivitiesClient.cs index fd98cd78..36748ec8 100644 --- a/Octokit/Clients/ActivitiesClient.cs +++ b/Octokit/Clients/ActivitiesClient.cs @@ -1,5 +1,11 @@ namespace Octokit { + /// + /// A client for GitHub's Activity API. + /// + /// + /// See the Activity API documentation for more information. + /// public class ActivitiesClient : ApiClient, IActivitiesClient { /// diff --git a/Octokit/Clients/AssigneesClient.cs b/Octokit/Clients/AssigneesClient.cs index aef05783..a717dade 100644 --- a/Octokit/Clients/AssigneesClient.cs +++ b/Octokit/Clients/AssigneesClient.cs @@ -4,6 +4,12 @@ using System.Threading.Tasks; namespace Octokit { + /// + /// A client for GitHub's Issue Assignees API. + /// + /// + /// See the Issue Assignees API documentation for more information. + /// public class AssigneesClient : ApiClient, IAssigneesClient { /// diff --git a/Octokit/Clients/BlobsClient.cs b/Octokit/Clients/BlobsClient.cs index 59370809..0e0d9562 100644 --- a/Octokit/Clients/BlobsClient.cs +++ b/Octokit/Clients/BlobsClient.cs @@ -2,6 +2,12 @@ namespace Octokit { + /// + /// A client for GitHub's Git Blobs API. + /// + /// + /// See the Git Blobs API documentation for more information. + /// public class BlobsClient : ApiClient, IBlobsClient { /// diff --git a/Octokit/Clients/CommitStatusClient.cs b/Octokit/Clients/CommitStatusClient.cs index 322139a9..fae61f38 100644 --- a/Octokit/Clients/CommitStatusClient.cs +++ b/Octokit/Clients/CommitStatusClient.cs @@ -4,12 +4,10 @@ using System.Threading.Tasks; namespace Octokit { /// - /// A client for GitHub's Commit Status API. + /// A client for GitHub's Git Repository Status API. /// /// - /// See the Commit Status API documentation for more - /// details. Also check out the blog post - /// that announced this feature. + /// See the Repository Statuses API documentation for more information. /// public class CommitStatusClient : ApiClient, ICommitStatusClient { diff --git a/Octokit/Clients/CommitsClient.cs b/Octokit/Clients/CommitsClient.cs index f159fe8d..4776760f 100644 --- a/Octokit/Clients/CommitsClient.cs +++ b/Octokit/Clients/CommitsClient.cs @@ -2,6 +2,12 @@ namespace Octokit { + /// + /// A client for GitHub's Git Commits API. + /// + /// + /// See the Git Commits API documentation for more information. + /// public class CommitsClient : ApiClient, ICommitsClient { /// diff --git a/Octokit/Clients/EventsClient.cs b/Octokit/Clients/EventsClient.cs index d26aa4f0..c5808349 100644 --- a/Octokit/Clients/EventsClient.cs +++ b/Octokit/Clients/EventsClient.cs @@ -3,6 +3,12 @@ using System.Threading.Tasks; namespace Octokit { + /// + /// A client for GitHub's Activity Events API. + /// + /// + /// See the Activity Events API documentation for more information + /// public class EventsClient : ApiClient, IEventsClient { /// diff --git a/Octokit/Clients/GistCommentsClient.cs b/Octokit/Clients/GistCommentsClient.cs index cc3caa2f..67b0cf1f 100644 --- a/Octokit/Clients/GistCommentsClient.cs +++ b/Octokit/Clients/GistCommentsClient.cs @@ -3,6 +3,12 @@ using System.Threading.Tasks; namespace Octokit { + /// + /// A client for GitHub's Gist Comments API. + /// + /// + /// See the Gist Comments API documentation for more information. + /// public class GistCommentsClient : ApiClient, IGistCommentsClient { /// diff --git a/Octokit/Clients/GistsClient.cs b/Octokit/Clients/GistsClient.cs index 425e20cc..44a62b69 100644 --- a/Octokit/Clients/GistsClient.cs +++ b/Octokit/Clients/GistsClient.cs @@ -2,6 +2,12 @@ namespace Octokit { + /// + /// A client for GitHub's Gists API. + /// + /// + /// See the Gists API documentation for more information. + /// public class GistsClient : ApiClient, IGistsClient { /// diff --git a/Octokit/Clients/GitDatabaseClient.cs b/Octokit/Clients/GitDatabaseClient.cs index 9d03a451..6ec39b7b 100644 --- a/Octokit/Clients/GitDatabaseClient.cs +++ b/Octokit/Clients/GitDatabaseClient.cs @@ -1,5 +1,11 @@ namespace Octokit { + /// + /// A client for GitHub's Git Database API. Gives you access to read and write raw Git objects and to list and update your references. + /// + /// + /// See the Git API documentation for more information. + /// public class GitDatabaseClient : ApiClient, IGitDatabaseClient { /// diff --git a/Octokit/Clients/IssueCommentsClient.cs b/Octokit/Clients/IssueCommentsClient.cs index b3df3a69..daf6808e 100644 --- a/Octokit/Clients/IssueCommentsClient.cs +++ b/Octokit/Clients/IssueCommentsClient.cs @@ -4,6 +4,12 @@ using System.Threading.Tasks; namespace Octokit { + /// + /// A client for GitHub's Issue Comments API. + /// + /// + /// See the Issue Comments API documentation for more information. + /// public class IssueCommentsClient : ApiClient, IIssueCommentsClient { /// @@ -17,13 +23,11 @@ namespace Octokit /// /// Gets a single Issue Comment by number. /// - /// - /// http://developer.github.com/v3/issues/comments/#get-a-single-comment - /// + /// http://developer.github.com/v3/issues/comments/#get-a-single-comment /// The owner of the repository /// The name of the repository - /// The issue comment number - /// The s for the specified Issue Comment. + /// The issue number + /// public Task Get(string owner, string name, int number) { Ensure.ArgumentNotNullOrEmptyString(owner, "owner"); @@ -33,14 +37,12 @@ namespace Octokit } /// - /// Gets a list of the Issue Comments in a specified repository. + /// Gets Issue Comments for a repository. /// - /// - /// http://developer.github.com/v3/issues/comments/#list-comments-in-a-repository - /// + /// http://developer.github.com/v3/issues/comments/#list-comments-in-a-repository /// The owner of the repository /// The name of the repository - /// The list of s for the specified Repository. + /// public Task> GetForRepository(string owner, string name) { Ensure.ArgumentNotNullOrEmptyString(owner, "owner"); @@ -50,15 +52,13 @@ namespace Octokit } /// - /// Gets a list of the Issue Comments for a specified issue. + /// Gets Issue Comments for a specified Issue. /// - /// - /// http://developer.github.com/v3/issues/comments/#list-comments-on-an-issue - /// + /// http://developer.github.com/v3/issues/comments/#list-comments-on-an-issue /// The owner of the repository /// The name of the repository /// The issue number - /// The list of s for the specified Issue. + /// public Task> GetForIssue(string owner, string name, int number) { Ensure.ArgumentNotNullOrEmptyString(owner, "owner"); @@ -68,16 +68,14 @@ namespace Octokit } /// - /// Creates a new Issue Comment in the specified Issue + /// Creates a new Issue Comment for a specified Issue. /// - /// - /// http://developer.github.com/v3/issues/comments/#create-a-comment - /// + /// http://developer.github.com/v3/issues/comments/#create-a-comment /// The owner of the repository /// The name of the repository - /// The issue number - /// The text of the new comment - /// The s for that was just created. + /// The number of the issue + /// The new comment to add to the issue + /// public Task Create(string owner, string name, int number, string newComment) { Ensure.ArgumentNotNullOrEmptyString(owner, "owner"); @@ -88,16 +86,14 @@ namespace Octokit } /// - /// Updates a specified Issue Comment + /// Updates a specified Issue Comment. /// - /// - /// http://developer.github.com/v3/issues/comments/#edit-a-comment - /// + /// http://developer.github.com/v3/issues/comments/#edit-a-comment /// The owner of the repository /// The name of the repository - /// The issue number - /// The text of the updated comment - /// The s for that was just updated. + /// The comment number + /// The modified comment + /// public Task Update(string owner, string name, int number, string commentUpdate) { Ensure.ArgumentNotNullOrEmptyString(owner, "owner"); diff --git a/Octokit/Clients/IssuesClient.cs b/Octokit/Clients/IssuesClient.cs index fe710eae..85cded5a 100644 --- a/Octokit/Clients/IssuesClient.cs +++ b/Octokit/Clients/IssuesClient.cs @@ -3,6 +3,12 @@ using System.Threading.Tasks; namespace Octokit { + /// + /// A client for GitHub's Issues API. + /// + /// + /// See the Issues API documentation for more information. + /// public class IssuesClient : ApiClient, IIssuesClient { /// @@ -19,13 +25,28 @@ namespace Octokit } public IAssigneesClient Assignee { get; private set; } + /// + /// Client for reading various event information associated with issues/pull requests. + /// This is useful both for display on issue/pull request information pages and also to + /// determine who should be notified of comments. + /// public IIssuesEventsClient Events { get; private set; } + /// + /// Client for managing labels. + /// public IIssuesLabelsClient Labels { get; private set; } + /// + /// Client for managing milestones. + /// public IMilestonesClient Milestone { get; private set; } + /// + /// Client for managing comments. + /// public IIssueCommentsClient Comment { get; private set; } /// - /// Gets a single Issue by number./// + /// Gets a single Issue by number. + /// /// /// http://developer.github.com/v3/issues/#get-a-single-issue /// diff --git a/Octokit/Clients/IssuesEventsClient.cs b/Octokit/Clients/IssuesEventsClient.cs index 640d816a..53de9af9 100644 --- a/Octokit/Clients/IssuesEventsClient.cs +++ b/Octokit/Clients/IssuesEventsClient.cs @@ -6,6 +6,12 @@ using System.Threading.Tasks; namespace Octokit { + /// + /// A client for GitHub's Issue Events API. + /// + /// + /// See the Issue Events API documentation for more information. + /// public class IssuesEventsClient : ApiClient, IIssuesEventsClient { public IssuesEventsClient(IApiConnection apiConnection) : base(apiConnection) diff --git a/Octokit/Clients/MilestonesClient.cs b/Octokit/Clients/MilestonesClient.cs index bb59cd09..c6f1cb58 100644 --- a/Octokit/Clients/MilestonesClient.cs +++ b/Octokit/Clients/MilestonesClient.cs @@ -3,6 +3,12 @@ using System.Threading.Tasks; namespace Octokit { + /// + /// A client for GitHub's Issue Milestones API. + /// + /// + /// See the Issue Milestones API documentation for more information. + /// public class MilestonesClient : ApiClient, IMilestonesClient { /// @@ -17,7 +23,7 @@ namespace Octokit /// Gets a single Milestone by number. /// /// - /// http://developer.github.com/v3/issues/milestones/#get-a-single-Milestone + /// http://developer.github.com/v3/issues/milestones/#get-a-single-milestone /// /// public Task Get(string owner, string name, int number) @@ -63,7 +69,7 @@ namespace Octokit } /// - /// Creates an Milestone for the specified repository. Any user with pull access to a repository can create a + /// Creates a milestone for the specified repository. Any user with pull access to a repository can create an /// Milestone. /// /// http://developer.github.com/v3/issues/milestones/#create-a-milestone @@ -81,7 +87,7 @@ namespace Octokit } /// - /// Updates an Milestone for the specified repository. Any user with pull access to a repository can update a + /// Creates a milestone for the specified repository. Any user with pull access to a repository can create an /// Milestone. /// /// http://developer.github.com/v3/issues/milestones/#update-a-milestone @@ -101,7 +107,7 @@ namespace Octokit } /// - /// Deletes a milestone for the specified repository. Any user with pull access to a repository can create a + /// Deletes a milestone for the specified repository. Any user with pull access to a repository can create an /// Milestone. /// /// http://developer.github.com/v3/issues/milestones/#delete-a-milestone diff --git a/Octokit/Clients/MiscellaneousClient.cs b/Octokit/Clients/MiscellaneousClient.cs index 22dece5a..c2f4b0d6 100644 --- a/Octokit/Clients/MiscellaneousClient.cs +++ b/Octokit/Clients/MiscellaneousClient.cs @@ -9,10 +9,10 @@ using System.Threading.Tasks; namespace Octokit { /// - /// /// A client for GitHub's miscellaneous APIs. + /// A client for GitHub's miscellaneous APIs. /// /// - /// See the miscellaneous API documentation for more details. + /// See the Miscellaneous API documentation for more details. /// public class MiscellaneousClient : IMiscellaneousClient { diff --git a/Octokit/Clients/NotificationsClient.cs b/Octokit/Clients/NotificationsClient.cs index ae500c9e..b0bdc5ce 100644 --- a/Octokit/Clients/NotificationsClient.cs +++ b/Octokit/Clients/NotificationsClient.cs @@ -4,6 +4,12 @@ using System.Threading.Tasks; namespace Octokit { + /// + /// A client for GitHub's Activity Notifications API. + /// + /// + /// See the Activity Notifications API documentation for more information. + /// public class NotificationsClient : ApiClient, INotificationsClient { /// diff --git a/Octokit/Clients/OrganizationMembersClient.cs b/Octokit/Clients/OrganizationMembersClient.cs index 1a0df2e5..027a013d 100644 --- a/Octokit/Clients/OrganizationMembersClient.cs +++ b/Octokit/Clients/OrganizationMembersClient.cs @@ -4,6 +4,12 @@ using System.Threading.Tasks; namespace Octokit { + /// + /// A client for GitHub's Organization Members API. + /// + /// + /// See the Orgs API documentation for more information. + /// public class OrganizationMembersClient : ApiClient, IOrganizationMembersClient { /// diff --git a/Octokit/Clients/OrganizationsClient.cs b/Octokit/Clients/OrganizationsClient.cs index ba7f7c5f..b04ffb04 100644 --- a/Octokit/Clients/OrganizationsClient.cs +++ b/Octokit/Clients/OrganizationsClient.cs @@ -24,6 +24,9 @@ namespace Octokit Team = new TeamsClient(apiConnection); } + /// + /// Returns a client to manage members of an organization. + /// public IOrganizationMembersClient Member { get; private set; } /// diff --git a/Octokit/Clients/ReferencesClient.cs b/Octokit/Clients/ReferencesClient.cs index 783e150e..3ccacf93 100644 --- a/Octokit/Clients/ReferencesClient.cs +++ b/Octokit/Clients/ReferencesClient.cs @@ -3,6 +3,12 @@ using System.Threading.Tasks; namespace Octokit { + /// + /// A client for GitHub's References API. + /// + /// + /// See the References API documentation for more information. + /// public class ReferencesClient : ApiClient, IReferencesClient { /// diff --git a/Octokit/Clients/SshKeysClient.cs b/Octokit/Clients/SshKeysClient.cs index a89b78b9..48f50feb 100644 --- a/Octokit/Clients/SshKeysClient.cs +++ b/Octokit/Clients/SshKeysClient.cs @@ -6,6 +6,12 @@ using System.Threading.Tasks; namespace Octokit { + /// + /// A client for GitHub's User Keys API. + /// + /// + /// See the Users API documentation for more information. + /// public class SshKeysClient : ApiClient, ISshKeysClient { /// diff --git a/Octokit/Clients/StarredClient.cs b/Octokit/Clients/StarredClient.cs index c8b1ea24..5f3b9d27 100644 --- a/Octokit/Clients/StarredClient.cs +++ b/Octokit/Clients/StarredClient.cs @@ -5,6 +5,12 @@ using System.Threading.Tasks; namespace Octokit { + /// + /// A client for GitHub's Activity Starring API. + /// + /// + /// See the Activity Starring API documentation for more information. + /// public class StarredClient : ApiClient, IStarredClient { /// @@ -16,12 +22,12 @@ namespace Octokit } /// - /// Retrieves all of the stargazers for the passed repository + /// Retrieves all of the stargazers for the passed repository. /// /// The owner of the repository /// The name of the repository - /// Thrown if the client is not authenticated - /// A of s starring the passed repository + /// Thrown if the client is not authenticated. + /// A of s starring the passed repository. public Task> GetAllStargazers(string owner, string name) { Ensure.ArgumentNotNullOrEmptyString(owner, "owner"); @@ -31,11 +37,11 @@ namespace Octokit } /// - /// Retrieves all of the starred (ies) for the current user + /// Retrieves all of the starred (ies) for the current user. /// - /// Thrown if the client is not authenticated + /// Thrown if the client is not authenticated. /// - /// A of (ies) starred by the current user + /// A of (ies) starred by the current authenticated user. /// public Task> GetAllForCurrent() { @@ -43,13 +49,13 @@ namespace Octokit } /// - /// Retrieves all of the starred (ies) for the current user + /// Retrieves all of the starred (ies) for the current user. /// /// Star-specific request parameters that sort the results - /// Thrown if the client is not authenticated + /// Thrown if the client is not authenticated. /// /// A of (ies) starred by the current user, - /// sorted according to the passed request parameters + /// sorted according to the passed request parameters. /// [System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Design", "CA1011:ConsiderPassingBaseTypesAsParameters", Justification = "But i think i do need star-specific request parameters")] @@ -61,11 +67,13 @@ namespace Octokit } /// - /// Retrieves all of the (ies) starred by the specified user + /// Retrieves all of the (ies) starred by the specified user. /// /// The login of the user - /// Thrown if the client is not authenticated - /// A starred by the specified user + /// Thrown if the client is not authenticated. + /// + /// A (ies) starred by the specified user. + /// public Task> GetAllForUser(string user) { Ensure.ArgumentNotNullOrEmptyString(user, "user"); @@ -74,12 +82,12 @@ namespace Octokit } /// - /// Retrieves all of the (ies) starred by the specified user + /// Retrieves all of the (ies) starred by the specified user. /// /// The login of the user /// Star-specific request parameters that sort the results - /// Thrown if the client is not authenticated - /// A starred by the specified user + /// Thrown if the client is not authenticated. + /// A starred by the specified user. [System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Design", "CA1011:ConsiderPassingBaseTypesAsParameters")] public Task> GetAllForUser(string user, StarredRequest request) { @@ -90,11 +98,11 @@ namespace Octokit } /// - /// Check if a repository is starred by the current authenticated user + /// Check if a repository is starred by the current authenticated user. /// /// The owner of the repository /// The name of the repository - /// Thrown if the client is not authenticated + /// Thrown if the client is not authenticated. /// A bool representing the success of the operation public async Task CheckStarred(string owner, string name) { @@ -115,11 +123,11 @@ namespace Octokit } /// - /// Stars a repository for the authenticated user + /// Stars a repository for the authenticated user. /// /// The owner of the repository to star /// The name of the repository to star - /// A bool representing the success of starring the repository + /// A bool representing the success of starring public async Task StarRepo(string owner, string name) { Ensure.ArgumentNotNullOrEmptyString(owner, "owner"); @@ -139,11 +147,11 @@ namespace Octokit } /// - /// Unstars a repository for the authenticated user + /// Unstars a repository for the authenticated user. /// /// The owner of the repository to unstar /// The name of the repository to unstar - /// A bool representing the success of unstarring the repository + /// A bool representing the success of the operation public async Task RemoveStarFromRepo(string owner, string name) { Ensure.ArgumentNotNullOrEmptyString(owner, "owner"); diff --git a/Octokit/Clients/TagsClient.cs b/Octokit/Clients/TagsClient.cs index b43e76b3..4756bc41 100644 --- a/Octokit/Clients/TagsClient.cs +++ b/Octokit/Clients/TagsClient.cs @@ -2,6 +2,12 @@ namespace Octokit { + /// + /// A client for GitHub's Git Tags API. + /// + /// + /// See the Git Tags API documentation for more information. + /// public class TagsClient : ApiClient, ITagsClient { /// diff --git a/Octokit/Clients/TeamsClient.cs b/Octokit/Clients/TeamsClient.cs index 47e1dab0..0af67320 100644 --- a/Octokit/Clients/TeamsClient.cs +++ b/Octokit/Clients/TeamsClient.cs @@ -8,10 +8,10 @@ namespace Octokit { /// - /// A client for GitHub's Org Teams API. + /// A client for GitHub's Organization Teams API. /// /// - /// See the Orgs API documentation for more information. + /// See the Organization Teams API documentation for more information. /// public class TeamsClient : ApiClient, ITeamsClient { diff --git a/Octokit/Clients/TreesClient.cs b/Octokit/Clients/TreesClient.cs index 80b8361f..736e37da 100644 --- a/Octokit/Clients/TreesClient.cs +++ b/Octokit/Clients/TreesClient.cs @@ -4,6 +4,12 @@ using System.Threading.Tasks; namespace Octokit { + /// + /// A client for GitHub's Git Trees API. + /// + /// + /// See the Git Trees API documentation for more information. + /// public class TreesClient : ApiClient, ITreesClient { /// diff --git a/Octokit/Clients/UsersClient.cs b/Octokit/Clients/UsersClient.cs index 8263ed37..8d4e856b 100644 --- a/Octokit/Clients/UsersClient.cs +++ b/Octokit/Clients/UsersClient.cs @@ -8,9 +8,11 @@ using System.Threading.Tasks; namespace Octokit { /// - /// Supports the ability to get and update users via the GitHub API v3. - /// http://developer.github.com/v3/users/ + /// A client for GitHub's Users API. /// + /// + /// See the Users API documentation for more information. + /// public class UsersClient : ApiClient, IUsersClient { static readonly Uri _userEndpoint = new Uri("user", UriKind.Relative); @@ -24,11 +26,9 @@ namespace Octokit } /// - /// Returns a for the specified login (username). Returns the - /// Authenticated if no login (username) is given. + /// Returns the user specified by the login. /// - /// Optional GitHub login (username) - /// A + /// The login name for the user public Task Get(string login) { Ensure.ArgumentNotNullOrEmptyString(login, "login"); diff --git a/Octokit/Helpers/IApiPagination.cs b/Octokit/Helpers/IApiPagination.cs index c7d3e6c2..024d502b 100644 --- a/Octokit/Helpers/IApiPagination.cs +++ b/Octokit/Helpers/IApiPagination.cs @@ -6,6 +6,12 @@ using System.Threading.Tasks; namespace Octokit { + /// + /// Used to paginate through API response results. + /// + /// + /// This is meant to be internal, but I factored it out so we can change our mind more easily later. + /// public interface IApiPagination { Task> GetAllPages(Func>> getFirstPage); diff --git a/Octokit/Http/ApiConnection.cs b/Octokit/Http/ApiConnection.cs index c3c9e4bd..25afe422 100644 --- a/Octokit/Http/ApiConnection.cs +++ b/Octokit/Http/ApiConnection.cs @@ -36,7 +36,7 @@ namespace Octokit } /// - /// Gets the connection for making HTTP requests. + /// The underlying connection. /// public IConnection Connection { get; private set; } diff --git a/Octokit/Http/Connection.cs b/Octokit/Http/Connection.cs index d39fd142..a330736c 100644 --- a/Octokit/Http/Connection.cs +++ b/Octokit/Http/Connection.cs @@ -12,6 +12,9 @@ namespace Octokit { // NOTE: Every request method must go through the `RunRequest` code path. So if you need to add a new method // ensure it goes through there. :) + /// + /// A connection for making HTTP requests against URI endpoints. + /// public class Connection : IConnection { static readonly Uri _defaultGitHubApiUrl = GitHubClient.GitHubApiUrl; @@ -124,6 +127,12 @@ namespace Octokit return SendData(uri.ApplyParameters(parameters), HttpMethod.Get, null, accepts, null); } + /// + /// 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 public Task> GetHtml(Uri uri, IDictionary parameters) { Ensure.ArgumentNotNull(uri, "uri"); @@ -205,6 +214,11 @@ namespace Octokit return Run(request); } + /// + /// Performs an asynchronous HTTP PUT request that expects an empty response. + /// + /// URI endpoint to send request to + /// The returned public async Task PutAsync(Uri uri) { Ensure.ArgumentNotNull(uri, "uri"); @@ -218,6 +232,11 @@ namespace Octokit return response.StatusCode; } + /// + /// Performs an asynchronous HTTP DELETE request that expects an empty response. + /// + /// URI endpoint to send request to + /// The returned public async Task DeleteAsync(Uri uri) { Ensure.ArgumentNotNull(uri, "uri"); @@ -231,17 +250,23 @@ namespace Octokit return response.StatusCode; } + /// + /// Base address for the connection. + /// public Uri BaseAddress { get; private set; } public string UserAgent { get; private set; } + /// + /// Gets the used to provide credentials for the connection. + /// public ICredentialStore CredentialStore { get { return _authenticator.CredentialStore; } } /// - /// Convenience property for getting and setting credentials. + /// Gets or sets the credentials used by the connection. /// /// /// You can use this property if you only have a single hard-coded credential. Otherwise, pass in an diff --git a/Octokit/Http/HttpClientAdapter.cs b/Octokit/Http/HttpClientAdapter.cs index 8fc40088..5540c676 100644 --- a/Octokit/Http/HttpClientAdapter.cs +++ b/Octokit/Http/HttpClientAdapter.cs @@ -10,6 +10,12 @@ using System.Threading.Tasks; namespace Octokit.Internal { + /// + /// Generic Http client. Useful for those who want to swap out System.Net.HttpClient with something else. + /// + /// + /// Most folks won't ever need to swap this out. But if you're trying to run this on Windows Phone, you might. + /// public class HttpClientAdapter : IHttpClient { public async Task> Send(IRequest request) diff --git a/Octokit/Http/IConnection.cs b/Octokit/Http/IConnection.cs index 94862b84..43392809 100644 --- a/Octokit/Http/IConnection.cs +++ b/Octokit/Http/IConnection.cs @@ -2,6 +2,7 @@ using System.Collections.Generic; using System.Net; using System.Threading.Tasks; +using Octokit.Internal; namespace Octokit { @@ -99,6 +100,12 @@ namespace Octokit /// /// Gets or sets the credentials used by the connection. /// + /// + /// You can use this property if you only have a single hard-coded credential. Otherwise, pass in an + /// to the constructor. + /// Setting this property will change the to use + /// the default with just these credentials. + /// Credentials Credentials { get; set; } } } diff --git a/Octokit/IGitHubClient.cs b/Octokit/IGitHubClient.cs index 9bcf6314..5f364239 100644 --- a/Octokit/IGitHubClient.cs +++ b/Octokit/IGitHubClient.cs @@ -2,6 +2,9 @@ namespace Octokit { + /// + /// A Client for the GitHub API v3. You can read more about the api here: http://developer.github.com. + /// public interface IGitHubClient { IConnection Connection { get; }