| name | gumlet-typescript-sdk |
|---|---|
| description | TypeScript SDK for Gumlet API. Use when writing TypeScript code that calls Gumlet API with the @gumlet/nodejs-sdk package: installing it, constructing and authenticating the client, and calling API operations. |
Generated TypeScript client for Gumlet API, published as @gumlet/nodejs-sdk. Use the generated client instead of hand-writing HTTP requests.
npm install @gumlet/nodejs-sdkimport Gumlet from '@gumlet/nodejs-sdk';
const client = new Gumlet({
apiKey: process.env['API_KEY'], // defaults to the API_KEY env var
});Provide credentials using the options below. Environment variables are read automatically when the target runtime supports them:
apiKey(env:API_KEY) — Credential for the API_KEY scheme.
import Gumlet from '@gumlet/nodejs-sdk';
const client = new Gumlet({
apiKey: process.env['API_KEY'], // defaults to the API_KEY env var
});
const videoAsset = await client.videoAssets.create({
format: 'ABR',
workspace_id: '<your workspace id>',
title: 'Example Title',
input: 'http://devimages.apple.com/iphone/samples/bipbop/bipbopall.m3u8',
});
console.log(videoAsset);Method names, parameter shapes, and response types are generated from the API description — do not guess them. Look up the exact call signature in api.md before writing a call.
Non-success responses throw generated API errors. Error objects expose status, headers, response body, and request metadata where the target runtime supports it.
import { APIError } from '@gumlet/nodejs-sdk';
try {
const videoAsset = await client.videoAssets.create({
format: 'ABR',
workspace_id: '<your workspace id>',
title: 'Example Title',
input: 'http://devimages.apple.com/iphone/samples/bipbop/bipbopall.m3u8',
});
} catch (err) {
if (err instanceof APIError) {
console.log(err.status, err.name, err.headers);
}
throw err;
}- Node.js 20+, a modern browser, or any runtime with
fetchsupport