Skip to main content
Module

x/kd_clients/mod.ts>ReleaseClient

Various HTTP clients for miscellaneous use.
Go to Latest
class ReleaseClient
extends GitHubClient
import { ReleaseClient } from "https://deno.land/x/kd_clients@v1.0.0-preview.9/mod.ts";

Provides a client for interacting with GitHub releases.

Constructors

new
ReleaseClient(
ownerName: string,
repoName: string,
token?: string,
)

Initializes a new instance of the ReleaseClient class.

Methods

private
uploadFile(
tagOrTitle: string,
filePath: string,
releaseId: number,
getByTitle: boolean,
): Promise<void | ReleaseError>

Uploads a file using the given filePath to a release that matches the given releaseId.

getRelease(getByValue: string, options?: ReleaseOptions): Promise<ReleaseModel>

Gets a release for a repository.

getReleases(page: number, qtyPerPage: number): Promise<[ReleaseModel[], Response]>

Gets the given page where each page quantity is the given qtyPerPage, for a repository with a name that matches the given ReleaseClient.this.repoName,

releaseExists(tagName: string): Promise<boolean>

Returns a value indicating whether or not a release is tied to a tag that matches the given tagName, for a repository with a name that matches the given ReleaseClient.this.repoName.

uploadAssets(
toReleaseBy: string,
filePaths: string | string[],
options?: ReleaseOptions,
): Promise<void>

Uploads one or more assets to a release that matches a tag or title by the given toReleaseBy.