(irisArtifacts)
- 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 artifacts in a directory within the .iris folder
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();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();| 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. |
Promise<components.ArtifactsContentDto>
| Error Type | Status Code | Content Type |
|---|---|---|
| errors.APIError | 4XX, 5XX | */* |
Download a file artifact from the .iris folder
import { IrisSDK } from "iris-sdk";
const irisSDK = new IrisSDK();
async function run() {
await irisSDK.irisArtifacts.downloadFile({
path: "/usr/include",
});
}
run();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();| 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. |
Promise<void>
| Error Type | Status Code | Content Type |
|---|---|---|
| errors.APIError | 4XX, 5XX | */* |
Download a directory of artifacts as a zip file
import { IrisSDK } from "iris-sdk";
const irisSDK = new IrisSDK();
async function run() {
await irisSDK.irisArtifacts.downloadFolder({
path: "/media",
});
}
run();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();| 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. |
Promise<void>
| Error Type | Status Code | Content Type |
|---|---|---|
| errors.APIError | 4XX, 5XX | */* |