Skip to content

Latest commit

 

History

History
222 lines (146 loc) · 16.2 KB

File metadata and controls

222 lines (146 loc) · 16.2 KB

IrisArtifacts

(irisArtifacts)

Overview

Available Operations

  • list - List artifacts in a directory within the .iris folder
  • downloadFile - Download a file artifact from the .iris folder
  • downloadFolder - Download a directory of artifacts as a zip file

list

List artifacts in a directory within the .iris folder

Example Usage

import { IrisSDK } from "iris-sdk";

const irisSDK = new IrisSDK();

async function run() {
  const result = await irisSDK.irisArtifacts.list({
    path: "code/my-project",
  });

  // Handle the result
  console.log(result);
}

run();

Standalone function

The standalone function version of this method:

import { IrisSDKCore } from "iris-sdk/core.js";
import { irisArtifactsList } from "iris-sdk/funcs/irisArtifactsList.js";

// Use `IrisSDKCore` for best tree-shaking performance.
// You can create one instance of it to use across an application.
const irisSDK = new IrisSDKCore();

async function run() {
  const res = await irisArtifactsList(irisSDK, {
    path: "code/my-project",
  });

  if (!res.ok) {
    throw res.error;
  }

  const { value: result } = res;

  // Handle the result
  console.log(result);
}

run();

Parameters

Parameter Type Required Description
request operations.ListArtifactsRequest ✔️ The request object to use for the request.
options RequestOptions Used to set various options for making HTTP requests.
options.fetchOptions RequestInit Options that are passed to the underlying HTTP request. This can be used to inject extra headers for examples. All Request options, except method and body, are allowed.
options.retries RetryConfig Enables retrying HTTP requests under certain failure conditions.

Response

Promise<components.ArtifactsContentDto>

Errors

Error Type Status Code Content Type
errors.APIError 4XX, 5XX */*

downloadFile

Download a file artifact from the .iris folder

Example Usage

import { IrisSDK } from "iris-sdk";

const irisSDK = new IrisSDK();

async function run() {
  await irisSDK.irisArtifacts.downloadFile({
    path: "/usr/include",
  });


}

run();

Standalone function

The standalone function version of this method:

import { IrisSDKCore } from "iris-sdk/core.js";
import { irisArtifactsDownloadFile } from "iris-sdk/funcs/irisArtifactsDownloadFile.js";

// Use `IrisSDKCore` for best tree-shaking performance.
// You can create one instance of it to use across an application.
const irisSDK = new IrisSDKCore();

async function run() {
  const res = await irisArtifactsDownloadFile(irisSDK, {
    path: "/usr/include",
  });

  if (!res.ok) {
    throw res.error;
  }

  const { value: result } = res;

  
}

run();

Parameters

Parameter Type Required Description
request operations.DownloadArtifactFileRequest ✔️ The request object to use for the request.
options RequestOptions Used to set various options for making HTTP requests.
options.fetchOptions RequestInit Options that are passed to the underlying HTTP request. This can be used to inject extra headers for examples. All Request options, except method and body, are allowed.
options.retries RetryConfig Enables retrying HTTP requests under certain failure conditions.

Response

Promise<void>

Errors

Error Type Status Code Content Type
errors.APIError 4XX, 5XX */*

downloadFolder

Download a directory of artifacts as a zip file

Example Usage

import { IrisSDK } from "iris-sdk";

const irisSDK = new IrisSDK();

async function run() {
  await irisSDK.irisArtifacts.downloadFolder({
    path: "/media",
  });


}

run();

Standalone function

The standalone function version of this method:

import { IrisSDKCore } from "iris-sdk/core.js";
import { irisArtifactsDownloadFolder } from "iris-sdk/funcs/irisArtifactsDownloadFolder.js";

// Use `IrisSDKCore` for best tree-shaking performance.
// You can create one instance of it to use across an application.
const irisSDK = new IrisSDKCore();

async function run() {
  const res = await irisArtifactsDownloadFolder(irisSDK, {
    path: "/media",
  });

  if (!res.ok) {
    throw res.error;
  }

  const { value: result } = res;

  
}

run();

Parameters

Parameter Type Required Description
request operations.DownloadArtifactFolderRequest ✔️ The request object to use for the request.
options RequestOptions Used to set various options for making HTTP requests.
options.fetchOptions RequestInit Options that are passed to the underlying HTTP request. This can be used to inject extra headers for examples. All Request options, except method and body, are allowed.
options.retries RetryConfig Enables retrying HTTP requests under certain failure conditions.

Response

Promise<void>

Errors

Error Type Status Code Content Type
errors.APIError 4XX, 5XX */*