Usage
To retrieve a project, you’ll use theprojects.get() method of the BlendDuck client.
projects.list() method
Documentation Index
Fetch the complete documentation index at: /llms.txt
Use this file to discover all available pages before exploring further.
Retrieve a project or projects
projects.get() method of the BlendDuck client.
import BlendDuck from "@blendduck/node-sdk";
// Initialize the BlendDuck client
const client = new BlendDuck({
apiKey: process.env.BLENDDUCK_API_KEY
});
async function retrieveProject(projectId: string) {
// Retrieve the project
const project = await client.projects.get(projectId);
console.log(`Retrieved project: ${project.title}`);
console.log(`Number of clips: ${project.clips.length}`);
// You can now work with the project object
// For example, you can access its properties:
console.log(`Project aspect ratio: ${project.ratio}`);
console.log(`Project theme: `, project.theme);
}
// Usage
retrieveProject("your-project-id-here");
projects.list() method
import BlendDuck from "@blendduck/node-sdk";
// Initialize the BlendDuck client
const client = new BlendDuck({
apiKey: process.env.BLENDDUCK_API_KEY
});
async function retrieveProjects() {
const { projects } = await client.projects.list();
// equals
// const { projects } = await client.projects.list({ page: 0, limit: 20 });
}
// Usage
retrieveProjects();