kameleo-io / local-api-client-typescript

Official JavaScript/TypeScript library for interacting with Kameleo Client
https://kameleo.io/learn-more/automation
MIT License
45 stars 2 forks source link

How to set Canvas from the Kameleo API? #10

Closed JonathanR25 closed 1 month ago

JonathanR25 commented 1 month ago

What would be the proper code syntax form to set the Canvas from the Kameleo API?

Also, could your provide some example code?

MBailey01 commented 1 month ago

Here is an example that you can use to set the Canvas through the API:

const createProfileRequest = BuilderForCreateProfile
    .forBaseProfile(baseProfileId)
    .set_canvas('intelligent') \ # Options: ('intelligent', 'noise', 'block', 'off')
    .build();
const profile = await client.createProfile({ body: createProfileRequest });

These answers are provided from the Kameleo Set Canvas from API article.