C# Class Octokit.RepositoriesClient

A client for GitHub's Repositories API.
See the Repositories API documentation for more details.
Inheritance: Octokit.ApiClient, IRepositoriesClient
Exibir arquivo Open project: octokit/octokit.net Class Usage Examples

Private Properties

Property Type Description
Create Task
EditBranch Task
EditBranch Task
GetAllBranches Task>
GetAllBranches Task>
GetAllBranches Task>
GetAllBranches Task>
GetBranch Task
GetBranch Task

Public Methods

Method Description
Create ( Octokit.NewRepository newRepository ) : Task

Creates a new repository for the current user.

See the API documentation for more information.

Create ( string organizationLogin, Octokit.NewRepository newRepository ) : Task

Creates a new repository in the specified organization.

See the API documentation for more information.

Delete ( long repositoryId ) : System.Threading.Tasks.Task

Deletes the specified repository.

See the API documentation for more information. Deleting a repository requires admin access. If OAuth is used, the `delete_repo` scope is required.

Delete ( string owner, string name ) : System.Threading.Tasks.Task

Deletes the specified repository.

See the API documentation for more information. Deleting a repository requires admin access. If OAuth is used, the `delete_repo` scope is required.

Edit ( long repositoryId, Octokit.RepositoryUpdate update ) : Task

Updates the specified repository with the values given in update

Edit ( string owner, string name, Octokit.RepositoryUpdate update ) : Task

Updates the specified repository with the values given in update

Get ( long repositoryId ) : Task

Gets the specified repository.

See the API documentation for more information.

Get ( string owner, string name ) : Task

Gets the specified repository.

See the API documentation for more information.

GetAllContributors ( long repositoryId ) : Task>

Gets all contributors for the specified repository. Does not include anonymous contributors.

See the API documentation for more details

GetAllContributors ( long repositoryId, Octokit.ApiOptions options ) : Task>

Gets all contributors for the specified repository. Does not include anonymous contributors.

See the API documentation for more details

GetAllContributors ( long repositoryId, bool includeAnonymous ) : Task>

Gets all contributors for the specified repository. With the option to include anonymous contributors.

See the API documentation for more details

GetAllContributors ( long repositoryId, bool includeAnonymous, Octokit.ApiOptions options ) : Task>

Gets all contributors for the specified repository. With the option to include anonymous contributors.

See the API documentation for more details

GetAllContributors ( string owner, string name ) : Task>

Gets all contributors for the specified repository. Does not include anonymous contributors.

See the API documentation for more details

GetAllContributors ( string owner, string name, Octokit.ApiOptions options ) : Task>

Gets all contributors for the specified repository. Does not include anonymous contributors.

See the API documentation for more details

GetAllContributors ( string owner, string name, bool includeAnonymous ) : Task>

Gets all contributors for the specified repository. With the option to include anonymous contributors.

See the API documentation for more details

GetAllContributors ( string owner, string name, bool includeAnonymous, Octokit.ApiOptions options ) : Task>

Gets all contributors for the specified repository. With the option to include anonymous contributors.

See the API documentation for more details

GetAllForCurrent ( ) : Task>

Gets all repositories owned by the current user.

See the API documentation for more information. The default page size on GitHub.com is 30.

GetAllForCurrent ( Octokit.ApiOptions options ) : Task>

Gets all repositories owned by the current user.

See the API documentation for more information.

GetAllForCurrent ( Octokit.RepositoryRequest request ) : Task>

Gets all repositories owned by the current user.

See the API documentation for more information. The default page size on GitHub.com is 30.

GetAllForCurrent ( Octokit.RepositoryRequest request, Octokit.ApiOptions options ) : Task>
GetAllForOrg ( string organization ) : Task>

Gets all repositories owned by the specified organization.

See the API documentation for more information. The default page size on GitHub.com is 30.

GetAllForOrg ( string organization, Octokit.ApiOptions options ) : Task>

Gets all repositories owned by the specified organization.

See the API documentation for more information.

GetAllForUser ( string login ) : Task>

Gets all repositories owned by the specified user.

See the API documentation for more information. The default page size on GitHub.com is 30.

GetAllForUser ( string login, Octokit.ApiOptions options ) : Task>

Gets all repositories owned by the specified user.

See the API documentation for more information.

GetAllLanguages ( long repositoryId ) : Task>

Gets all languages for the specified repository.

See the API documentation for more details

GetAllLanguages ( string owner, string name ) : Task>

Gets all languages for the specified repository.

See the API documentation for more details

GetAllPublic ( ) : Task>

Gets all public repositories.

See the API documentation for more information. The default page size on GitHub.com is 30.

GetAllPublic ( Octokit.PublicRepositoryRequest request ) : Task>

Gets all public repositories since the integer Id of the last Repository that you've seen.

See the API documentation for more information. The default page size on GitHub.com is 30.

GetAllTags ( long repositoryId ) : Task>

Gets all tags for the specified repository.

See the API documentation for more details

GetAllTags ( long repositoryId, Octokit.ApiOptions options ) : Task>

Gets all tags for the specified repository.

See the API documentation for more details

GetAllTags ( string owner, string name ) : Task>

Gets all tags for the specified repository.

See the API documentation for more details

GetAllTags ( string owner, string name, Octokit.ApiOptions options ) : Task>

Gets all tags for the specified repository.

See the API documentation for more details

GetAllTeams ( long repositoryId ) : Task>

Gets all teams for the specified repository.

See the API documentation for more details

GetAllTeams ( long repositoryId, Octokit.ApiOptions options ) : Task>

Gets all teams for the specified repository.

See the API documentation for more details

GetAllTeams ( string owner, string name ) : Task>

Gets all teams for the specified repository.

See the API documentation for more details

GetAllTeams ( string owner, string name, Octokit.ApiOptions options ) : Task>

Gets all teams for the specified repository.

See the API documentation for more details

RepositoriesClient ( IApiConnection apiConnection ) : System

Initializes a new GitHub Repos API client.

Private Methods

Method Description
Create ( Uri url, string organizationLogin, Octokit.NewRepository newRepository ) : Task
EditBranch ( long repositoryId, string branch, Octokit.BranchUpdate update ) : Task
EditBranch ( string owner, string name, string branch, Octokit.BranchUpdate update ) : Task
GetAllBranches ( long repositoryId ) : Task>
GetAllBranches ( long repositoryId, Octokit.ApiOptions options ) : Task>
GetAllBranches ( string owner, string name ) : Task>
GetAllBranches ( string owner, string name, Octokit.ApiOptions options ) : Task>
GetBranch ( long repositoryId, string branchName ) : Task
GetBranch ( string owner, string name, string branchName ) : Task

Method Details

Create() public method

Creates a new repository for the current user.
See the API documentation for more information.
Thrown when a general API error occurs.
public Create ( Octokit.NewRepository newRepository ) : Task
newRepository Octokit.NewRepository A instance describing the new repository to create
return Task

Create() public method

Creates a new repository in the specified organization.
See the API documentation for more information.
Thrown when a general API error occurs.
public Create ( string organizationLogin, Octokit.NewRepository newRepository ) : Task
organizationLogin string Login of the organization in which to create the repository
newRepository Octokit.NewRepository A instance describing the new repository to create
return Task

Delete() public method

Deletes the specified repository.
See the API documentation for more information. Deleting a repository requires admin access. If OAuth is used, the `delete_repo` scope is required.
Thrown when a general API error occurs.
public Delete ( long repositoryId ) : System.Threading.Tasks.Task
repositoryId long The Id of the repository
return System.Threading.Tasks.Task

Delete() public method

Deletes the specified repository.
See the API documentation for more information. Deleting a repository requires admin access. If OAuth is used, the `delete_repo` scope is required.
Thrown when a general API error occurs.
public Delete ( string owner, string name ) : System.Threading.Tasks.Task
owner string The owner of the repository
name string The name of the repository
return System.Threading.Tasks.Task

Edit() public method

Updates the specified repository with the values given in update
public Edit ( long repositoryId, Octokit.RepositoryUpdate update ) : Task
repositoryId long The Id of the repository
update Octokit.RepositoryUpdate New values to update the repository with
return Task

Edit() public method

Updates the specified repository with the values given in update
public Edit ( string owner, string name, Octokit.RepositoryUpdate update ) : Task
owner string The owner of the repository
name string The name of the repository
update Octokit.RepositoryUpdate New values to update the repository with
return Task

Get() public method

Gets the specified repository.
See the API documentation for more information.
Thrown when a general API error occurs.
public Get ( long repositoryId ) : Task
repositoryId long The Id of the repository
return Task

Get() public method

Gets the specified repository.
See the API documentation for more information.
Thrown when a general API error occurs.
public Get ( string owner, string name ) : Task
owner string The owner of the repository
name string The name of the repository
return Task

GetAllContributors() public method

Gets all contributors for the specified repository. Does not include anonymous contributors.
See the API documentation for more details
public GetAllContributors ( long repositoryId ) : Task>
repositoryId long The Id of the repository
return Task>

GetAllContributors() public method

Gets all contributors for the specified repository. Does not include anonymous contributors.
See the API documentation for more details
public GetAllContributors ( long repositoryId, Octokit.ApiOptions options ) : Task>
repositoryId long The Id of the repository
options Octokit.ApiOptions Options for changing the API response
return Task>

GetAllContributors() public method

Gets all contributors for the specified repository. With the option to include anonymous contributors.
See the API documentation for more details
public GetAllContributors ( long repositoryId, bool includeAnonymous ) : Task>
repositoryId long The Id of the repository
includeAnonymous bool True if anonymous contributors should be included in result; Otherwise false
return Task>

GetAllContributors() public method

Gets all contributors for the specified repository. With the option to include anonymous contributors.
See the API documentation for more details
public GetAllContributors ( long repositoryId, bool includeAnonymous, Octokit.ApiOptions options ) : Task>
repositoryId long The Id of the repository
includeAnonymous bool True if anonymous contributors should be included in result; Otherwise false
options Octokit.ApiOptions Options for changing the API response
return Task>

GetAllContributors() public method

Gets all contributors for the specified repository. Does not include anonymous contributors.
See the API documentation for more details
public GetAllContributors ( string owner, string name ) : Task>
owner string The owner of the repository
name string The name of the repository
return Task>

GetAllContributors() public method

Gets all contributors for the specified repository. Does not include anonymous contributors.
See the API documentation for more details
public GetAllContributors ( string owner, string name, Octokit.ApiOptions options ) : Task>
owner string The owner of the repository
name string The name of the repository
options Octokit.ApiOptions Options for changing the API response
return Task>

GetAllContributors() public method

Gets all contributors for the specified repository. With the option to include anonymous contributors.
See the API documentation for more details
public GetAllContributors ( string owner, string name, bool includeAnonymous ) : Task>
owner string The owner of the repository
name string The name of the repository
includeAnonymous bool True if anonymous contributors should be included in result; Otherwise false
return Task>

GetAllContributors() public method

Gets all contributors for the specified repository. With the option to include anonymous contributors.
See the API documentation for more details
public GetAllContributors ( string owner, string name, bool includeAnonymous, Octokit.ApiOptions options ) : Task>
owner string The owner of the repository
name string The name of the repository
includeAnonymous bool True if anonymous contributors should be included in result; Otherwise false
options Octokit.ApiOptions Options for changing the API response
return Task>

GetAllForCurrent() public method

Gets all repositories owned by the current user.
See the API documentation for more information. The default page size on GitHub.com is 30.
Thrown if the client is not authenticated. Thrown when a general API error occurs.
public GetAllForCurrent ( ) : Task>
return Task>

GetAllForCurrent() public method

Gets all repositories owned by the current user.
See the API documentation for more information.
Thrown if the client is not authenticated. Thrown when a general API error occurs.
public GetAllForCurrent ( Octokit.ApiOptions options ) : Task>
options Octokit.ApiOptions Options for changing the API response
return Task>

GetAllForCurrent() public method

Gets all repositories owned by the current user.
See the API documentation for more information. The default page size on GitHub.com is 30.
Thrown if the client is not authenticated. Thrown when a general API error occurs.
public GetAllForCurrent ( Octokit.RepositoryRequest request ) : Task>
request Octokit.RepositoryRequest Search parameters to filter results on
return Task>

GetAllForCurrent() public method

public GetAllForCurrent ( Octokit.RepositoryRequest request, Octokit.ApiOptions options ) : Task>
request Octokit.RepositoryRequest
options Octokit.ApiOptions
return Task>

GetAllForOrg() public method

Gets all repositories owned by the specified organization.
See the API documentation for more information. The default page size on GitHub.com is 30.
Thrown when a general API error occurs.
public GetAllForOrg ( string organization ) : Task>
organization string
return Task>

GetAllForOrg() public method

Gets all repositories owned by the specified organization.
See the API documentation for more information.
Thrown when a general API error occurs.
public GetAllForOrg ( string organization, Octokit.ApiOptions options ) : Task>
organization string The organization name to search for
options Octokit.ApiOptions Options for changing the API response
return Task>

GetAllForUser() public method

Gets all repositories owned by the specified user.
See the API documentation for more information. The default page size on GitHub.com is 30.
Thrown when a general API error occurs.
public GetAllForUser ( string login ) : Task>
login string The account name to search for
return Task>

GetAllForUser() public method

Gets all repositories owned by the specified user.
See the API documentation for more information.
Thrown when a general API error occurs.
public GetAllForUser ( string login, Octokit.ApiOptions options ) : Task>
login string The account name to search for
options Octokit.ApiOptions Options for changing the API response
return Task>

GetAllLanguages() public method

Gets all languages for the specified repository.
See the API documentation for more details
public GetAllLanguages ( long repositoryId ) : Task>
repositoryId long The Id of the repository
return Task>

GetAllLanguages() public method

Gets all languages for the specified repository.
See the API documentation for more details
public GetAllLanguages ( string owner, string name ) : Task>
owner string The owner of the repository
name string The name of the repository
return Task>

GetAllPublic() public method

Gets all public repositories.
See the API documentation for more information. The default page size on GitHub.com is 30.
Thrown if the client is not authenticated. Thrown when a general API error occurs.
public GetAllPublic ( ) : Task>
return Task>

GetAllPublic() public method

Gets all public repositories since the integer Id of the last Repository that you've seen.
See the API documentation for more information. The default page size on GitHub.com is 30.
Thrown if the client is not authenticated. Thrown when a general API error occurs.
public GetAllPublic ( Octokit.PublicRepositoryRequest request ) : Task>
request Octokit.PublicRepositoryRequest Search parameters of the last repository seen
return Task>

GetAllTags() public method

Gets all tags for the specified repository.
See the API documentation for more details
public GetAllTags ( long repositoryId ) : Task>
repositoryId long The Id of the repository
return Task>

GetAllTags() public method

Gets all tags for the specified repository.
See the API documentation for more details
public GetAllTags ( long repositoryId, Octokit.ApiOptions options ) : Task>
repositoryId long The Id of the repository
options Octokit.ApiOptions Options for changing the API response
return Task>

GetAllTags() public method

Gets all tags for the specified repository.
See the API documentation for more details
public GetAllTags ( string owner, string name ) : Task>
owner string The owner of the repository
name string The name of the repository
return Task>

GetAllTags() public method

Gets all tags for the specified repository.
See the API documentation for more details
public GetAllTags ( string owner, string name, Octokit.ApiOptions options ) : Task>
owner string The owner of the repository
name string The name of the repository
options Octokit.ApiOptions Options for changing the API response
return Task>

GetAllTeams() public method

Gets all teams for the specified repository.
See the API documentation for more details
public GetAllTeams ( long repositoryId ) : Task>
repositoryId long The Id of the repository
return Task>

GetAllTeams() public method

Gets all teams for the specified repository.
See the API documentation for more details
public GetAllTeams ( long repositoryId, Octokit.ApiOptions options ) : Task>
repositoryId long The Id of the repository
options Octokit.ApiOptions Options for changing the API response
return Task>

GetAllTeams() public method

Gets all teams for the specified repository.
See the API documentation for more details
public GetAllTeams ( string owner, string name ) : Task>
owner string The owner of the repository
name string The name of the repository
return Task>

GetAllTeams() public method

Gets all teams for the specified repository.
See the API documentation for more details
public GetAllTeams ( string owner, string name, Octokit.ApiOptions options ) : Task>
owner string The owner of the repository
name string The name of the repository
options Octokit.ApiOptions Options for changing the API response
return Task>

RepositoriesClient() public method

Initializes a new GitHub Repos API client.
public RepositoriesClient ( IApiConnection apiConnection ) : System
apiConnection IApiConnection An API connection
return System