@poyoapi/core
v0.1.11
Published
Catalog-driven client for the PoYo Agent API
Readme
@poyoapi/core
Catalog-driven JavaScript client for the PoYo Agent API. Endpoint schemas are loaded from the hosted Capability Registry instead of being duplicated in this package.
Install
npm install @poyoapi/coreNode.js 20 or newer is required.
Usage
import {PoyoClient} from "@poyoapi/core";
const client = new PoyoClient({apiKey: process.env.POYO_API_KEY});
const capability = await client.capability("youtube/videos");
const task = await client.submit("youtube", "videos", {
urls: ["https://www.youtube.com/watch?v=VIDEO_ID"],
});
const completed = await client.waitTask(task.task_id);
const downloaded = await client.downloadFiles(task.task_id, "./poyo-results");See the PoYo website.
License
MIT
