- Session cookie required to use this module. It cannot access shutterstock contributor area using user credentials, beacause shutterstock requires solving captcha.
import { ShutterstockClient } from 'shutterstock-submit';
const client = new ShutterstockClient(<provide session cookie here>);
- To upload file
const file = await client.upload('path/to/file');
- to get all uploaded but not submited images
const imagesToSubmit = await client.getImagesToSubmit();
- to update images attributes
await client.save([
{
categories: ['11', '1'],
id: file.upload_id,
},
]);
- to submit images
await client.submit([+file.upload_id]);