UNPKG

benchling_typescript_sdk

Version:

Typescript SDK for Benchling API

24 lines (20 loc) 812 B
import { SuperBenchling } from "../src/index"; async function main() { console.log("SuperBenchling class imported successfully."); console.log(typeof SuperBenchling); console.log(SuperBenchling.prototype); const apikey = process.env.API_KEY || ""; const superbenchling = new SuperBenchling("kitepharma", { "apiKey": apikey }, { maxRetries: 3, exponentialDelay: 2 }) await superbenchling.initialize(); let dropdowns = superbenchling.dropdown.listDropDowns({}) console.log(dropdowns) for await (const dropdown of dropdowns) { console.log("Dropdown:", dropdown); } console.log("Connection initialized successfully!"); } // Run the main function and handle any errors main().catch(error => { console.error("Error in main:", error); process.exit(1); });