pub struct Client { /* private fields */ }Expand description
HTTP клиент для GitVerse API
Implementations§
Source§impl Client
impl Client
Sourcepub async fn list_org_runners(
&self,
org: &str,
opts: Option<&QueryOptions>,
) -> Result<ActionRunners, Error>
pub async fn list_org_runners( &self, org: &str, opts: Option<&QueryOptions>, ) -> Result<ActionRunners, Error>
Returns a list of self-hosted runners for an organization
Sourcepub async fn create_org_runner_registration_token(
&self,
org: &str,
) -> Result<RegistrationToken, Error>
pub async fn create_org_runner_registration_token( &self, org: &str, ) -> Result<RegistrationToken, Error>
Creates a registration token for an organization runner
Sourcepub async fn get_org_runner(
&self,
org: &str,
runner_id: f64,
) -> Result<ActionRunner, Error>
pub async fn get_org_runner( &self, org: &str, runner_id: f64, ) -> Result<ActionRunner, Error>
Gets a specific self-hosted runner for an organization
Sourcepub async fn delete_org_runner(
&self,
org: &str,
runner_id: f64,
) -> Result<(), Error>
pub async fn delete_org_runner( &self, org: &str, runner_id: f64, ) -> Result<(), Error>
Deletes a specific self-hosted runner from the organization
Sourcepub async fn list_org_variables(
&self,
org: &str,
opts: Option<&QueryOptions>,
) -> Result<VariableList, Error>
pub async fn list_org_variables( &self, org: &str, opts: Option<&QueryOptions>, ) -> Result<VariableList, Error>
List organization variables
Sourcepub async fn create_org_variable(
&self,
org: &str,
params: &CreateVariableParams,
) -> Result<(), Error>
pub async fn create_org_variable( &self, org: &str, params: &CreateVariableParams, ) -> Result<(), Error>
Create an organization variable
Sourcepub async fn get_org_variable(
&self,
org: &str,
name: &str,
) -> Result<Variable, Error>
pub async fn get_org_variable( &self, org: &str, name: &str, ) -> Result<Variable, Error>
Get an organization variable
Sourcepub async fn update_org_variable(
&self,
org: &str,
name: &str,
params: &CreateVariableParams,
) -> Result<(), Error>
pub async fn update_org_variable( &self, org: &str, name: &str, params: &CreateVariableParams, ) -> Result<(), Error>
Update an organization variable
Sourcepub async fn delete_org_variable(
&self,
org: &str,
name: &str,
) -> Result<(), Error>
pub async fn delete_org_variable( &self, org: &str, name: &str, ) -> Result<(), Error>
Delete an organization variable
Sourcepub async fn list_artifacts(
&self,
owner: &str,
repo: &str,
opts: Option<&QueryOptions>,
) -> Result<ActionArtifactList, Error>
pub async fn list_artifacts( &self, owner: &str, repo: &str, opts: Option<&QueryOptions>, ) -> Result<ActionArtifactList, Error>
Returns a list of artifacts in the repository
Sourcepub async fn get_artifact(
&self,
owner: &str,
repo: &str,
artifact_id: &str,
) -> Result<ActionArtifact, Error>
pub async fn get_artifact( &self, owner: &str, repo: &str, artifact_id: &str, ) -> Result<ActionArtifact, Error>
Returns a specific artifact from the repository
Sourcepub async fn delete_artifact(
&self,
owner: &str,
repo: &str,
artifact_id: &str,
) -> Result<(), Error>
pub async fn delete_artifact( &self, owner: &str, repo: &str, artifact_id: &str, ) -> Result<(), Error>
Deletes a specific artifact
Sourcepub async fn download_artifact(
&self,
owner: &str,
repo: &str,
artifact_id: &str,
) -> Result<(), Error>
pub async fn download_artifact( &self, owner: &str, repo: &str, artifact_id: &str, ) -> Result<(), Error>
Downloads a specific artifact as a ZIP archive
Sourcepub async fn download_artifact_raw(
&self,
owner: &str,
repo: &str,
artifact_id: &str,
) -> Result<String, Error>
pub async fn download_artifact_raw( &self, owner: &str, repo: &str, artifact_id: &str, ) -> Result<String, Error>
Downloads the artifact ZIP archive directly
Sourcepub async fn get_workflow_job(
&self,
owner: &str,
repo: &str,
job_id: f64,
) -> Result<ActionRunJob, Error>
pub async fn get_workflow_job( &self, owner: &str, repo: &str, job_id: f64, ) -> Result<ActionRunJob, Error>
Get a workflow run job
Sourcepub async fn get_workflow_job_logs(
&self,
owner: &str,
repo: &str,
job_id: f64,
) -> Result<(), Error>
pub async fn get_workflow_job_logs( &self, owner: &str, repo: &str, job_id: f64, ) -> Result<(), Error>
Get workflow run job logs
Sourcepub async fn create_action_link(
&self,
owner: &str,
repo: &str,
params: &CreateActionLinkParams,
) -> Result<ActionLink, Error>
pub async fn create_action_link( &self, owner: &str, repo: &str, params: &CreateActionLinkParams, ) -> Result<ActionLink, Error>
Adds a link to an action run
Sourcepub async fn list_repo_runners(
&self,
owner: &str,
repo: &str,
opts: Option<&QueryOptions>,
) -> Result<ActionRunners, Error>
pub async fn list_repo_runners( &self, owner: &str, repo: &str, opts: Option<&QueryOptions>, ) -> Result<ActionRunners, Error>
Returns a list of runners for the repository
Sourcepub async fn create_repo_runner_registration_token(
&self,
owner: &str,
repo: &str,
) -> Result<RegistrationToken, Error>
pub async fn create_repo_runner_registration_token( &self, owner: &str, repo: &str, ) -> Result<RegistrationToken, Error>
Creates a registration token for a repository runner
Sourcepub async fn get_repo_runner(
&self,
owner: &str,
repo: &str,
runner_id: f64,
) -> Result<ActionRunner, Error>
pub async fn get_repo_runner( &self, owner: &str, repo: &str, runner_id: f64, ) -> Result<ActionRunner, Error>
Gets a specific runner for a repository
Sourcepub async fn delete_repo_runner(
&self,
owner: &str,
repo: &str,
runner_id: f64,
) -> Result<(), Error>
pub async fn delete_repo_runner( &self, owner: &str, repo: &str, runner_id: f64, ) -> Result<(), Error>
Deletes a specific self-hosted runner from the repository
Sourcepub async fn list_workflow_runs(
&self,
owner: &str,
repo: &str,
opts: Option<&QueryOptions>,
) -> Result<RunsResponse, Error>
pub async fn list_workflow_runs( &self, owner: &str, repo: &str, opts: Option<&QueryOptions>, ) -> Result<RunsResponse, Error>
List workflow runs
Sourcepub async fn get_workflow_run_by_index(
&self,
owner: &str,
repo: &str,
run_index: f64,
) -> Result<ActionRun, Error>
pub async fn get_workflow_run_by_index( &self, owner: &str, repo: &str, run_index: f64, ) -> Result<ActionRun, Error>
Get a workflow run by index
Sourcepub async fn list_workflow_run_jobs_by_index(
&self,
owner: &str,
repo: &str,
run_index: f64,
opts: Option<&QueryOptions>,
) -> Result<JobsResponse, Error>
pub async fn list_workflow_run_jobs_by_index( &self, owner: &str, repo: &str, run_index: f64, opts: Option<&QueryOptions>, ) -> Result<JobsResponse, Error>
List workflow run jobs by index
Sourcepub async fn get_workflow_run(
&self,
owner: &str,
repo: &str,
run_id: f64,
) -> Result<ActionRun, Error>
pub async fn get_workflow_run( &self, owner: &str, repo: &str, run_id: f64, ) -> Result<ActionRun, Error>
Get a workflow run
Sourcepub async fn list_workflow_run_jobs(
&self,
owner: &str,
repo: &str,
run_id: f64,
opts: Option<&QueryOptions>,
) -> Result<JobsResponse, Error>
pub async fn list_workflow_run_jobs( &self, owner: &str, repo: &str, run_id: f64, opts: Option<&QueryOptions>, ) -> Result<JobsResponse, Error>
List workflow run jobs
Sourcepub async fn list_repo_variables(
&self,
owner: &str,
repo: &str,
opts: Option<&QueryOptions>,
) -> Result<VariableList, Error>
pub async fn list_repo_variables( &self, owner: &str, repo: &str, opts: Option<&QueryOptions>, ) -> Result<VariableList, Error>
List repository variables
Sourcepub async fn create_repo_variable(
&self,
owner: &str,
repo: &str,
params: &CreateVariableParams,
) -> Result<(), Error>
pub async fn create_repo_variable( &self, owner: &str, repo: &str, params: &CreateVariableParams, ) -> Result<(), Error>
Create a repository variable
Sourcepub async fn get_repo_variable(
&self,
owner: &str,
repo: &str,
name: &str,
) -> Result<Variable, Error>
pub async fn get_repo_variable( &self, owner: &str, repo: &str, name: &str, ) -> Result<Variable, Error>
Get a repository variable
Sourcepub async fn update_repo_variable(
&self,
owner: &str,
repo: &str,
name: &str,
params: &CreateVariableParams,
) -> Result<(), Error>
pub async fn update_repo_variable( &self, owner: &str, repo: &str, name: &str, params: &CreateVariableParams, ) -> Result<(), Error>
Update a repository variable
Sourcepub async fn delete_repo_variable(
&self,
owner: &str,
repo: &str,
name: &str,
) -> Result<(), Error>
pub async fn delete_repo_variable( &self, owner: &str, repo: &str, name: &str, ) -> Result<(), Error>
Delete a repository variable
Sourcepub async fn get_workflow_dispatch_inputs(
&self,
owner: &str,
repo: &str,
workflow: &str,
opts: Option<&QueryOptions>,
) -> Result<WorkflowDispatchInputList, Error>
pub async fn get_workflow_dispatch_inputs( &self, owner: &str, repo: &str, workflow: &str, opts: Option<&QueryOptions>, ) -> Result<WorkflowDispatchInputList, Error>
Get workflow_dispatch parameters
Source§impl Client
impl Client
Sourcepub async fn list_emails(
&self,
opts: Option<&QueryOptions>,
) -> Result<Vec<Email>, Error>
pub async fn list_emails( &self, opts: Option<&QueryOptions>, ) -> Result<Vec<Email>, Error>
Get user email addresses
Sourcepub async fn create_emails(
&self,
params: &CreateEmailParams,
) -> Result<Vec<Email>, Error>
pub async fn create_emails( &self, params: &CreateEmailParams, ) -> Result<Vec<Email>, Error>
Add email addresses
Sourcepub async fn delete_emails(
&self,
params: &DeleteEmailParams,
) -> Result<(), Error>
pub async fn delete_emails( &self, params: &DeleteEmailParams, ) -> Result<(), Error>
Delete email addresses
Source§impl Client
impl Client
Sourcepub async fn list_issues(
&self,
owner: &str,
repo: &str,
opts: Option<&QueryOptions>,
) -> Result<Vec<Issue>, Error>
pub async fn list_issues( &self, owner: &str, repo: &str, opts: Option<&QueryOptions>, ) -> Result<Vec<Issue>, Error>
List issues and pull requests
Sourcepub async fn get_comment(
&self,
owner: &str,
repo: &str,
id: f64,
) -> Result<Comment, Error>
pub async fn get_comment( &self, owner: &str, repo: &str, id: f64, ) -> Result<Comment, Error>
Get a specific issue comment
Sourcepub async fn get_issues(
&self,
owner: &str,
repo: &str,
index: f64,
) -> Result<Issue, Error>
pub async fn get_issues( &self, owner: &str, repo: &str, index: f64, ) -> Result<Issue, Error>
Get issue or pull request
Sourcepub async fn list_comments(
&self,
owner: &str,
repo: &str,
index: f64,
opts: Option<&QueryOptions>,
) -> Result<Vec<Comment>, Error>
pub async fn list_comments( &self, owner: &str, repo: &str, index: f64, opts: Option<&QueryOptions>, ) -> Result<Vec<Comment>, Error>
List issue comments
Sourcepub async fn create_comment(
&self,
owner: &str,
repo: &str,
index: f64,
params: &CreateIssueCommentParams,
) -> Result<Comment, Error>
pub async fn create_comment( &self, owner: &str, repo: &str, index: f64, params: &CreateIssueCommentParams, ) -> Result<Comment, Error>
Create issue comment
Sourcepub async fn update_comment(
&self,
owner: &str,
repo: &str,
index: f64,
comment_id: f64,
params: &UpdateIssueCommentParams,
) -> Result<(), Error>
pub async fn update_comment( &self, owner: &str, repo: &str, index: f64, comment_id: f64, params: &UpdateIssueCommentParams, ) -> Result<(), Error>
Update issue comment
Sourcepub async fn delete_comment(
&self,
owner: &str,
repo: &str,
index: f64,
comment_id: f64,
) -> Result<(), Error>
pub async fn delete_comment( &self, owner: &str, repo: &str, index: f64, comment_id: f64, ) -> Result<(), Error>
Delete issue comment
Sourcepub async fn create_comment_reaction(
&self,
owner: &str,
repo: &str,
index: f64,
comment_id: f64,
params: &CreateIssueCommentReactionParams,
) -> Result<Reaction, Error>
pub async fn create_comment_reaction( &self, owner: &str, repo: &str, index: f64, comment_id: f64, params: &CreateIssueCommentReactionParams, ) -> Result<Reaction, Error>
Create reaction to issue comment
Sourcepub async fn delete_comment_reaction(
&self,
owner: &str,
repo: &str,
index: f64,
comment_id: f64,
reaction_id: f64,
) -> Result<(), Error>
pub async fn delete_comment_reaction( &self, owner: &str, repo: &str, index: f64, comment_id: f64, reaction_id: f64, ) -> Result<(), Error>
Delete reaction from issue comment
Sourcepub async fn list_labels(
&self,
owner: &str,
repo: &str,
index: f64,
) -> Result<Vec<Label>, Error>
pub async fn list_labels( &self, owner: &str, repo: &str, index: f64, ) -> Result<Vec<Label>, Error>
List issue labels
Sourcepub async fn list_timeline(
&self,
owner: &str,
repo: &str,
index: f64,
opts: Option<&QueryOptions>,
) -> Result<Vec<TimelineComment>, Error>
pub async fn list_timeline( &self, owner: &str, repo: &str, index: f64, opts: Option<&QueryOptions>, ) -> Result<Vec<TimelineComment>, Error>
List issue comments and timeline events
Source§impl Client
impl Client
Sourcepub async fn list_org_secrets(
&self,
org: &str,
opts: Option<&QueryOptions>,
) -> Result<SecretList, Error>
pub async fn list_org_secrets( &self, org: &str, opts: Option<&QueryOptions>, ) -> Result<SecretList, Error>
Gets a list of organization secrets
Sourcepub async fn get_org_secret(
&self,
org: &str,
secretname: &str,
) -> Result<Secret, Error>
pub async fn get_org_secret( &self, org: &str, secretname: &str, ) -> Result<Secret, Error>
Gets the metadata of a secret (without value) in an organization
Sourcepub async fn create_or_update_org_secret(
&self,
org: &str,
secretname: &str,
_opts: Option<&QueryOptions>,
) -> Result<Secret, Error>
pub async fn create_or_update_org_secret( &self, org: &str, secretname: &str, _opts: Option<&QueryOptions>, ) -> Result<Secret, Error>
Creates or updates a secret in the organization
Sourcepub async fn delete_org_secret(
&self,
org: &str,
secretname: &str,
) -> Result<(), Error>
pub async fn delete_org_secret( &self, org: &str, secretname: &str, ) -> Result<(), Error>
Removes a secret from an organization
Sourcepub async fn is_member(&self, org: &str, username: &str) -> Result<(), Error>
pub async fn is_member(&self, org: &str, username: &str) -> Result<(), Error>
Check organization membership for a user
Sourcepub async fn list_org_repositories(
&self,
org: &str,
opts: Option<&QueryOptions>,
) -> Result<Vec<Repository>, Error>
pub async fn list_org_repositories( &self, org: &str, opts: Option<&QueryOptions>, ) -> Result<Vec<Repository>, Error>
List organization repositories
Sourcepub async fn create_repository(
&self,
org: &str,
params: &CreateOrgRepositoryParams,
) -> Result<Repository, Error>
pub async fn create_repository( &self, org: &str, params: &CreateOrgRepositoryParams, ) -> Result<Repository, Error>
Create organization repository
Source§impl Client
impl Client
Sourcepub async fn delete_org_package(
&self,
org: &str,
package_type: &str,
package_name: &str,
) -> Result<(), Error>
pub async fn delete_org_package( &self, org: &str, package_type: &str, package_name: &str, ) -> Result<(), Error>
Delete package for organization
Sourcepub async fn list_org_package_versions(
&self,
org: &str,
package_type: &str,
package_name: &str,
opts: Option<&QueryOptions>,
) -> Result<Vec<PackageVersion>, Error>
pub async fn list_org_package_versions( &self, org: &str, package_type: &str, package_name: &str, opts: Option<&QueryOptions>, ) -> Result<Vec<PackageVersion>, Error>
Get package versions for organization
Sourcepub async fn delete_org_package_version(
&self,
org: &str,
package_type: &str,
package_name: &str,
package_version_id: &str,
) -> Result<(), Error>
pub async fn delete_org_package_version( &self, org: &str, package_type: &str, package_name: &str, package_version_id: &str, ) -> Result<(), Error>
Delete package version for organization
Sourcepub async fn delete_user_package(
&self,
username: &str,
package_type: &str,
package_name: &str,
) -> Result<(), Error>
pub async fn delete_user_package( &self, username: &str, package_type: &str, package_name: &str, ) -> Result<(), Error>
Delete package for user
Sourcepub async fn list_user_package_versions(
&self,
username: &str,
package_type: &str,
package_name: &str,
opts: Option<&QueryOptions>,
) -> Result<Vec<PackageVersion>, Error>
pub async fn list_user_package_versions( &self, username: &str, package_type: &str, package_name: &str, opts: Option<&QueryOptions>, ) -> Result<Vec<PackageVersion>, Error>
Get package versions for user
Source§impl Client
impl Client
Sourcepub async fn create_deployment(
&self,
owner: &str,
repo: &str,
params: &CreatePagesDeploymentParams,
) -> Result<PagesDeployment, Error>
pub async fn create_deployment( &self, owner: &str, repo: &str, params: &CreatePagesDeploymentParams, ) -> Result<PagesDeployment, Error>
Creates a deployment for GitVerse Pages
Sourcepub async fn get_deployment_status(
&self,
owner: &str,
repo: &str,
pages_deployment_id: &str,
) -> Result<PagesDeploymentStatus, Error>
pub async fn get_deployment_status( &self, owner: &str, repo: &str, pages_deployment_id: &str, ) -> Result<PagesDeploymentStatus, Error>
Gets the status of a GitVerse Pages deployment
Source§impl Client
impl Client
Sourcepub async fn create(
&self,
owner: &str,
repo: &str,
params: &CreatePullRequestParams,
) -> Result<PullRequest, Error>
pub async fn create( &self, owner: &str, repo: &str, params: &CreatePullRequestParams, ) -> Result<PullRequest, Error>
Create a pull request
Sourcepub async fn list_commits_pull_requests(
&self,
owner: &str,
repo: &str,
pull_number: f64,
opts: Option<&QueryOptions>,
) -> Result<Vec<Commit>, Error>
pub async fn list_commits_pull_requests( &self, owner: &str, repo: &str, pull_number: f64, opts: Option<&QueryOptions>, ) -> Result<Vec<Commit>, Error>
List pull request commits
Sourcepub async fn list_files(
&self,
owner: &str,
repo: &str,
pull_number: f64,
opts: Option<&QueryOptions>,
) -> Result<Vec<CommitFiles>, Error>
pub async fn list_files( &self, owner: &str, repo: &str, pull_number: f64, opts: Option<&QueryOptions>, ) -> Result<Vec<CommitFiles>, Error>
List pull request files
Sourcepub async fn is_merged(
&self,
owner: &str,
repo: &str,
pull_number: f64,
) -> Result<(), Error>
pub async fn is_merged( &self, owner: &str, repo: &str, pull_number: f64, ) -> Result<(), Error>
Checks if a pull request has been merged into the base branch.
Sourcepub async fn update_branch(
&self,
owner: &str,
repo: &str,
pull_number: f64,
params: &UpdateBranchParams,
) -> Result<UpdateBranchResponse, Error>
pub async fn update_branch( &self, owner: &str, repo: &str, pull_number: f64, params: &UpdateBranchParams, ) -> Result<UpdateBranchResponse, Error>
Update a pull request branch
Source§impl Client
impl Client
Sourcepub async fn list_releases(
&self,
owner: &str,
repo: &str,
opts: Option<&QueryOptions>,
) -> Result<Vec<Release>, Error>
pub async fn list_releases( &self, owner: &str, repo: &str, opts: Option<&QueryOptions>, ) -> Result<Vec<Release>, Error>
Returns a list of releases
Sourcepub async fn create_releases(
&self,
owner: &str,
repo: &str,
params: &CreateReleaseParams,
) -> Result<Release, Error>
pub async fn create_releases( &self, owner: &str, repo: &str, params: &CreateReleaseParams, ) -> Result<Release, Error>
Create a release
Sourcepub async fn get_by_tag(
&self,
owner: &str,
repo: &str,
tag: &str,
) -> Result<Release, Error>
pub async fn get_by_tag( &self, owner: &str, repo: &str, tag: &str, ) -> Result<Release, Error>
Gets a release by its tag name
Sourcepub async fn delete_by_tag(
&self,
owner: &str,
repo: &str,
tag: &str,
) -> Result<(), Error>
pub async fn delete_by_tag( &self, owner: &str, repo: &str, tag: &str, ) -> Result<(), Error>
Deletes a release by its tag name
Sourcepub async fn get_releases(
&self,
owner: &str,
repo: &str,
release_id: &str,
) -> Result<Release, Error>
pub async fn get_releases( &self, owner: &str, repo: &str, release_id: &str, ) -> Result<Release, Error>
Return a release
Sourcepub async fn update_releases(
&self,
owner: &str,
repo: &str,
release_id: &str,
params: &UpdateReleaseParams,
) -> Result<Release, Error>
pub async fn update_releases( &self, owner: &str, repo: &str, release_id: &str, params: &UpdateReleaseParams, ) -> Result<Release, Error>
Edit a release
Sourcepub async fn delete_releases(
&self,
owner: &str,
repo: &str,
release_id: &str,
) -> Result<(), Error>
pub async fn delete_releases( &self, owner: &str, repo: &str, release_id: &str, ) -> Result<(), Error>
Delete a release
Sourcepub async fn list_assets(
&self,
owner: &str,
repo: &str,
release_id: &str,
opts: Option<&QueryOptions>,
) -> Result<Vec<Attachment>, Error>
pub async fn list_assets( &self, owner: &str, repo: &str, release_id: &str, opts: Option<&QueryOptions>, ) -> Result<Vec<Attachment>, Error>
Returns a list of assets (files) for a release
Sourcepub async fn upload_asset(
&self,
owner: &str,
repo: &str,
release_id: &str,
_opts: Option<&QueryOptions>,
) -> Result<Attachment, Error>
pub async fn upload_asset( &self, owner: &str, repo: &str, release_id: &str, _opts: Option<&QueryOptions>, ) -> Result<Attachment, Error>
Upload asset to release
Source§impl Client
impl Client
Sourcepub async fn get(&self, owner: &str, repo: &str) -> Result<Repository, Error>
pub async fn get(&self, owner: &str, repo: &str) -> Result<Repository, Error>
Get repository details
Sourcepub async fn update(
&self,
owner: &str,
repo: &str,
params: &UpdateRepositoryParams,
) -> Result<Repository, Error>
pub async fn update( &self, owner: &str, repo: &str, params: &UpdateRepositoryParams, ) -> Result<Repository, Error>
Update repository
Sourcepub async fn list_repo_secrets(
&self,
owner: &str,
repo: &str,
opts: Option<&QueryOptions>,
) -> Result<SecretList, Error>
pub async fn list_repo_secrets( &self, owner: &str, repo: &str, opts: Option<&QueryOptions>, ) -> Result<SecretList, Error>
Gets a list of repository secrets
Sourcepub async fn get_repo_secret(
&self,
owner: &str,
repo: &str,
secretname: &str,
) -> Result<Secret, Error>
pub async fn get_repo_secret( &self, owner: &str, repo: &str, secretname: &str, ) -> Result<Secret, Error>
Gets secrets metadata (without values) in repositories.
Sourcepub async fn create_or_update_repo_secret(
&self,
owner: &str,
repo: &str,
secretname: &str,
_opts: Option<&QueryOptions>,
) -> Result<Secret, Error>
pub async fn create_or_update_repo_secret( &self, owner: &str, repo: &str, secretname: &str, _opts: Option<&QueryOptions>, ) -> Result<Secret, Error>
Creates or updates a secret in the repository
Sourcepub async fn delete_repo_secret(
&self,
owner: &str,
repo: &str,
secretname: &str,
) -> Result<(), Error>
pub async fn delete_repo_secret( &self, owner: &str, repo: &str, secretname: &str, ) -> Result<(), Error>
Removes a secret from the repository
Sourcepub async fn list_branches(
&self,
owner: &str,
repo: &str,
opts: Option<&QueryOptions>,
) -> Result<Vec<Branch>, Error>
pub async fn list_branches( &self, owner: &str, repo: &str, opts: Option<&QueryOptions>, ) -> Result<Vec<Branch>, Error>
List repository branches
Sourcepub async fn list_collaborators(
&self,
owner: &str,
repo: &str,
opts: Option<&QueryOptions>,
) -> Result<Vec<Collaborator>, Error>
pub async fn list_collaborators( &self, owner: &str, repo: &str, opts: Option<&QueryOptions>, ) -> Result<Vec<Collaborator>, Error>
List repository collaborators
Sourcepub async fn add_collaborator(
&self,
owner: &str,
repo: &str,
collaborator: &str,
params: &AddCollaboratorParams,
) -> Result<CollaboratorInvitation, Error>
pub async fn add_collaborator( &self, owner: &str, repo: &str, collaborator: &str, params: &AddCollaboratorParams, ) -> Result<CollaboratorInvitation, Error>
Add or update repository collaborator
Sourcepub async fn list_commits(
&self,
owner: &str,
repo: &str,
opts: Option<&QueryOptions>,
) -> Result<Vec<Commit>, Error>
pub async fn list_commits( &self, owner: &str, repo: &str, opts: Option<&QueryOptions>, ) -> Result<Vec<Commit>, Error>
Retrieve a list of repository commits
Sourcepub async fn get_commit(
&self,
owner: &str,
repo: &str,
sha: &str,
) -> Result<Commit, Error>
pub async fn get_commit( &self, owner: &str, repo: &str, sha: &str, ) -> Result<Commit, Error>
Retrieve commit information
Sourcepub async fn compare_commits(
&self,
owner: &str,
repo: &str,
basehead: &str,
opts: Option<&QueryOptions>,
) -> Result<CompareResponse, Error>
pub async fn compare_commits( &self, owner: &str, repo: &str, basehead: &str, opts: Option<&QueryOptions>, ) -> Result<CompareResponse, Error>
Compare two branches/tags/commits
Sourcepub async fn get_content(
&self,
owner: &str,
repo: &str,
filepath: &str,
opts: Option<&QueryOptions>,
) -> Result<ContentsResponse, Error>
pub async fn get_content( &self, owner: &str, repo: &str, filepath: &str, opts: Option<&QueryOptions>, ) -> Result<ContentsResponse, Error>
Get file or directory contents
Sourcepub async fn create_or_update_file(
&self,
owner: &str,
repo: &str,
filepath: &str,
params: &CreateFileParams,
) -> Result<FileCreationResponse, Error>
pub async fn create_or_update_file( &self, owner: &str, repo: &str, filepath: &str, params: &CreateFileParams, ) -> Result<FileCreationResponse, Error>
Create or update file in repository
Sourcepub async fn delete_file(
&self,
owner: &str,
repo: &str,
filepath: &str,
params: &DeleteFileParams,
) -> Result<FileDeleteResponse, Error>
pub async fn delete_file( &self, owner: &str, repo: &str, filepath: &str, params: &DeleteFileParams, ) -> Result<FileDeleteResponse, Error>
Delete file in repository
Sourcepub async fn create_fork(
&self,
owner: &str,
repo: &str,
params: &CreateForkParams,
) -> Result<Repository, Error>
pub async fn create_fork( &self, owner: &str, repo: &str, params: &CreateForkParams, ) -> Result<Repository, Error>
Fork a repository
Sourcepub async fn create_commit(
&self,
owner: &str,
repo: &str,
params: &CreateCommitParams,
) -> Result<Commit, Error>
pub async fn create_commit( &self, owner: &str, repo: &str, params: &CreateCommitParams, ) -> Result<Commit, Error>
Create a Git commit
Sourcepub async fn list_matching_refs(
&self,
owner: &str,
repo: &str,
ref: &str,
) -> Result<Vec<Reference>, Error>
pub async fn list_matching_refs( &self, owner: &str, repo: &str, ref: &str, ) -> Result<Vec<Reference>, Error>
List matching references
Sourcepub async fn get_ref(
&self,
owner: &str,
repo: &str,
ref: &str,
) -> Result<Reference, Error>
pub async fn get_ref( &self, owner: &str, repo: &str, ref: &str, ) -> Result<Reference, Error>
Get a Git reference
Sourcepub async fn create_ref(
&self,
owner: &str,
repo: &str,
params: &CreateReferenceParams,
) -> Result<Reference, Error>
pub async fn create_ref( &self, owner: &str, repo: &str, params: &CreateReferenceParams, ) -> Result<Reference, Error>
Create a Git reference
Sourcepub async fn delete_ref(
&self,
owner: &str,
repo: &str,
ref: &str,
) -> Result<(), Error>
pub async fn delete_ref( &self, owner: &str, repo: &str, ref: &str, ) -> Result<(), Error>
Deletes the provided reference
Sourcepub async fn create_tree(
&self,
owner: &str,
repo: &str,
params: &CreateTreeParams,
) -> Result<RepoTree, Error>
pub async fn create_tree( &self, owner: &str, repo: &str, params: &CreateTreeParams, ) -> Result<RepoTree, Error>
Creates new Git tree
Sourcepub async fn get_tree(
&self,
owner: &str,
repo: &str,
sha: &str,
opts: Option<&QueryOptions>,
) -> Result<GitTreeResponse, Error>
pub async fn get_tree( &self, owner: &str, repo: &str, sha: &str, opts: Option<&QueryOptions>, ) -> Result<GitTreeResponse, Error>
Get repository tree by SHA
Sourcepub async fn list_languages(
&self,
owner: &str,
repo: &str,
) -> Result<Value, Error>
pub async fn list_languages( &self, owner: &str, repo: &str, ) -> Result<Value, Error>
Get repository languages
Sourcepub async fn list_pulls(
&self,
owner: &str,
repo: &str,
opts: Option<&QueryOptions>,
) -> Result<Vec<PullRequest>, Error>
pub async fn list_pulls( &self, owner: &str, repo: &str, opts: Option<&QueryOptions>, ) -> Result<Vec<PullRequest>, Error>
List pull requests
Sourcepub async fn get_pull(
&self,
owner: &str,
repo: &str,
pull_number: f64,
) -> Result<PullRequest, Error>
pub async fn get_pull( &self, owner: &str, repo: &str, pull_number: f64, ) -> Result<PullRequest, Error>
Pull request details.
Sourcepub async fn update_pull(
&self,
owner: &str,
repo: &str,
pull_number: f64,
params: &UpdatePullRequestParams,
) -> Result<PullRequest, Error>
pub async fn update_pull( &self, owner: &str, repo: &str, pull_number: f64, params: &UpdatePullRequestParams, ) -> Result<PullRequest, Error>
Update a pull request.
Sourcepub async fn list_for_authenticated_user(
&self,
opts: Option<&QueryOptions>,
) -> Result<Vec<Repository>, Error>
pub async fn list_for_authenticated_user( &self, opts: Option<&QueryOptions>, ) -> Result<Vec<Repository>, Error>
Get authenticated user repositories
Sourcepub async fn create_for_authenticated_user(
&self,
params: &CreateRepositoryParams,
) -> Result<Repository, Error>
pub async fn create_for_authenticated_user( &self, params: &CreateRepositoryParams, ) -> Result<Repository, Error>
Create repository
Source§impl Client
impl Client
Sourcepub async fn get_assignment(
&self,
assignment_id: &str,
) -> Result<Assignment, Error>
pub async fn get_assignment( &self, assignment_id: &str, ) -> Result<Assignment, Error>
Gets the assignment in smartclass
Source§impl Client
impl Client
Sourcepub async fn list_favorites(
&self,
opts: Option<&QueryOptions>,
) -> Result<Vec<Repository>, Error>
pub async fn list_favorites( &self, opts: Option<&QueryOptions>, ) -> Result<Vec<Repository>, Error>
Get list of favorites repositories of authenticated user
Sourcepub async fn is_starred(&self, owner: &str, repo: &str) -> Result<(), Error>
pub async fn is_starred(&self, owner: &str, repo: &str) -> Result<(), Error>
Check if repository is in favorites
Source§impl Client
impl Client
Sourcepub async fn list(
&self,
org: &str,
opts: Option<&QueryOptions>,
) -> Result<Vec<Team>, Error>
pub async fn list( &self, org: &str, opts: Option<&QueryOptions>, ) -> Result<Vec<Team>, Error>
Lists teams
Sourcepub async fn list_members(
&self,
org: &str,
team: &str,
opts: Option<&QueryOptions>,
) -> Result<Vec<User>, Error>
pub async fn list_members( &self, org: &str, team: &str, opts: Option<&QueryOptions>, ) -> Result<Vec<User>, Error>
Lists team members
Sourcepub async fn update_repos(
&self,
org: &str,
team: &str,
owner: &str,
repo: &str,
params: &TeamRepoPermissions,
) -> Result<(), Error>
pub async fn update_repos( &self, org: &str, team: &str, owner: &str, repo: &str, params: &TeamRepoPermissions, ) -> Result<(), Error>
Add or update team repository permissions
Source§impl Client
impl Client
Sourcepub async fn list_users(
&self,
opts: Option<&QueryOptions>,
) -> Result<UserPrefsArray, Error>
pub async fn list_users( &self, opts: Option<&QueryOptions>, ) -> Result<UserPrefsArray, Error>
Search users by query
Sourcepub async fn get_authenticated(&self) -> Result<User, Error>
pub async fn get_authenticated(&self) -> Result<User, Error>
Get authenticated user information
Source§impl Client
impl Client
Sourcepub async fn list_webhooks(
&self,
owner: &str,
repo: &str,
opts: Option<&QueryOptions>,
) -> Result<Vec<Webhook>, Error>
pub async fn list_webhooks( &self, owner: &str, repo: &str, opts: Option<&QueryOptions>, ) -> Result<Vec<Webhook>, Error>
Get repository webhooks list
Sourcepub async fn create_webhook(
&self,
owner: &str,
repo: &str,
params: &CreateWebhookParams,
) -> Result<Webhook, Error>
pub async fn create_webhook( &self, owner: &str, repo: &str, params: &CreateWebhookParams, ) -> Result<Webhook, Error>
Create repository webhook
Sourcepub async fn get_webhook(
&self,
owner: &str,
repo: &str,
hook_id: f64,
) -> Result<Webhook, Error>
pub async fn get_webhook( &self, owner: &str, repo: &str, hook_id: f64, ) -> Result<Webhook, Error>
Get webhook information
Sourcepub async fn update_webhook(
&self,
owner: &str,
repo: &str,
hook_id: f64,
params: &UpdateWebhookParams,
) -> Result<Webhook, Error>
pub async fn update_webhook( &self, owner: &str, repo: &str, hook_id: f64, params: &UpdateWebhookParams, ) -> Result<Webhook, Error>
Update webhook