TypeScript / JavaScript
npm install @tritonium/api-client@2.1.1
기능
완전한 타입 정의를 포함한 TypeScript 지원 Node.js 18 이상, 런타임 종속성 없음 트리 쉐이킹 가능한 ESM 및 CommonJS 빌드
import { configureApiKey, AppsService, ReviewsService } from '@tritonium/api-client';
configureApiKey(process.env.TRITONIUM_API_KEY!);
const { apps = [] } = await AppsService.getApps();
if (apps.length === 0) throw new Error('Connect an app in the Tritonium dashboard first.');
const { reviews = [] } = await ReviewsService.getAppReviews(apps[0].app_uuid!, 20);