Logo DataHubClient

FilesApi Type

Client for GitLab repository file operations. See the .

Constructors

Constructor Description

FilesApi(baseUrl, auth, http)

Full Usage: FilesApi(baseUrl, auth, http)

Parameters:
Returns: FilesApi
baseUrl : string
auth : Authentication
http : IHttpClient
Returns: FilesApi

Instance members

Instance member Description

this.CreateAsync

Full Usage: this.CreateAsync

Parameters:
    projectId : int - The project identifier.
    filePath : string - The repository-relative file path.
    branch : string - The target branch.
    content : string - The file content.
    commitMessage : string - The commit message GitLab should create.
    ?encoding : string - Optional content encoding, such as base64.

Returns: Async<RepoFile>

Creates a repository file, then fetches its contents and metadata from the target branch.

The write may have succeeded even if the subsequent read fails. Concurrent branch changes can affect the returned file.

projectId : int

The project identifier.

filePath : string

The repository-relative file path.

branch : string

The target branch.

content : string

The file content.

commitMessage : string

The commit message GitLab should create.

?encoding : string

Optional content encoding, such as base64.

Returns: Async<RepoFile>

this.DeleteAsync

Full Usage: this.DeleteAsync

Parameters:
    projectId : int - The project identifier.
    filePath : string - The repository-relative file path.
    branch : string - The target branch.
    commitMessage : string - The commit message GitLab should create.

Returns: Async<unit>

Deletes a repository file.

projectId : int

The project identifier.

filePath : string

The repository-relative file path.

branch : string

The target branch.

commitMessage : string

The commit message GitLab should create.

Returns: Async<unit>

this.GetAsync

Full Usage: this.GetAsync

Parameters:
    projectId : int - The project identifier.
    filePath : string - The repository-relative file path.
    refName : string - The branch, tag, or commit SHA to read from.

Returns: Async<RepoFile>

Gets a repository file from a branch, tag, or commit SHA.

projectId : int

The project identifier.

filePath : string

The repository-relative file path.

refName : string

The branch, tag, or commit SHA to read from.

Returns: Async<RepoFile>

this.UpdateAsync

Full Usage: this.UpdateAsync

Parameters:
    projectId : int - The project identifier.
    filePath : string - The repository-relative file path.
    branch : string - The target branch.
    content : string - The replacement file content.
    commitMessage : string - The commit message GitLab should create.
    ?encoding : string - Optional content encoding, such as base64.

Returns: Async<RepoFile>

Updates a repository file, then fetches its contents and metadata from the target branch.

The write may have succeeded even if the subsequent read fails. Concurrent branch changes can affect the returned file.

projectId : int

The project identifier.

filePath : string

The repository-relative file path.

branch : string

The target branch.

content : string

The replacement file content.

commitMessage : string

The commit message GitLab should create.

?encoding : string

Optional content encoding, such as base64.

Returns: Async<RepoFile>

Type something to start searching.