Example #1
0
        /// <summary>
        /// Create a new instance of the GitHub API v3 client using the specified connection.
        /// </summary>
        /// <param name="connection">The underlying <seealso cref="IConnection"/> used to make requests</param>
        public GitHubClient(IConnection connection)
        {
            Ensure.ArgumentNotNull(connection, nameof(connection));

            Connection = connection;
            var apiConnection = new ApiConnection(connection);

            Activity      = new ActivitiesClient(apiConnection);
            Authorization = new AuthorizationsClient(apiConnection);
            Enterprise    = new EnterpriseClient(apiConnection);
            Gist          = new GistsClient(apiConnection);
            Git           = new GitDatabaseClient(apiConnection);
            GitHubApps    = new GitHubAppsClient(apiConnection);
            Issue         = new IssuesClient(apiConnection);
            Migration     = new MigrationClient(apiConnection);
            Miscellaneous = new MiscellaneousClient(apiConnection);
            Oauth         = new OauthClient(connection);
            Organization  = new OrganizationsClient(apiConnection);
            PullRequest   = new PullRequestsClient(apiConnection);
            Repository    = new RepositoriesClient(apiConnection);
            Search        = new SearchClient(apiConnection);
            User          = new UsersClient(apiConnection);
            Reaction      = new ReactionsClient(apiConnection);
            Check         = new ChecksClient(apiConnection);
        }
Example #2
0
        /// <summary>
        /// Create a new instance of the GitHub API v3 client using the specified connection.
        /// </summary>
        /// <param name="connection">The underlying <seealso cref="IConnection"/> used to make requests</param>
        public GitHubClient(IConnection connection)
        {
            Ensure.ArgumentNotNull(connection, "connection");

            Connection = connection;
            var apiConnection = new ApiConnection(connection);

            Activity      = new ActivitiesClient(apiConnection);
            Authorization = new AuthorizationsClient(apiConnection);
            Deployment    = new DeploymentsClient(apiConnection);
            Enterprise    = new EnterpriseClient(apiConnection);
            Gist          = new GistsClient(apiConnection);
            Git           = new GitDatabaseClient(apiConnection);
            Issue         = new IssuesClient(apiConnection);
            Migration     = new MigrationClient(apiConnection);
            Miscellaneous = new MiscellaneousClient(connection);
            Notification  = new NotificationsClient(apiConnection);
            Oauth         = new OauthClient(connection);
            Organization  = new OrganizationsClient(apiConnection);
            PullRequest   = new PullRequestsClient(apiConnection);
            Repository    = new RepositoriesClient(apiConnection);
            Search        = new SearchClient(apiConnection);
            SshKey        = new SshKeysClient(apiConnection);
            User          = new UsersClient(apiConnection);
            Reaction      = new ReactionsClient(apiConnection);
        }
Example #3
0
        /// <summary>
        /// Create a new instance of the GitHub API v3 client using the specified connection.
        /// </summary>
        /// <param name="connection">The underlying <seealso cref="IConnection"/> used to make requests</param>
        public GitHubClient(IConnection connection)
        {
            Ensure.ArgumentNotNull(connection, "connection");

            Connection = connection;
            var apiConnection = new ApiConnection(connection);
            Activity = new ActivitiesClient(apiConnection);
            Authorization = new AuthorizationsClient(apiConnection);
            Deployment = new DeploymentsClient(apiConnection);
            Enterprise = new EnterpriseClient(apiConnection);
            Gist = new GistsClient(apiConnection);
            Git = new GitDatabaseClient(apiConnection);
            Issue = new IssuesClient(apiConnection);
            Migration = new MigrationClient(apiConnection);
            Miscellaneous = new MiscellaneousClient(connection);
            Oauth = new OauthClient(connection);
            Organization = new OrganizationsClient(apiConnection);
            PullRequest = new PullRequestsClient(apiConnection);
            Repository = new RepositoriesClient(apiConnection);
            Search = new SearchClient(apiConnection);
            User = new UsersClient(apiConnection);
            Reaction = new ReactionsClient(apiConnection);
        }