Closed wf-d-whitely closed 1 year ago
Adding new methods and passing data into the delete method.
delete
const Webflow = require('webflow-api'); const api = new Webflow({ token: "<access_token>", }); Promise.all([ api.publishItems({ collectionId: "<collection_id>", itemIds: [ "<item_id_1>", "<item_id_2>", "<item_id_x>", ], }), api.deleteItems( { collectionId: "<collection_id>", itemIds: [ "<item_id_1>", "<item_id_2>", "<item_id_x>", ], }, { live: true } ), ]).then((x) => console.log(x));
returns
[ { publishedItemIds: [ "<item_id_1>", "<item_id_2>", "<item_id_x>", ], errors: [], _meta: { rateLimit: { limit: 60, remaining: 57 } } }, { unpublishedItemIds: [ "<item_id_1>", "<item_id_2>", "<item_id_x>", ], errors: [], _meta: { rateLimit: { limit: 60, remaining: 56 } } } ]
Adding new methods and passing data into the
delete
method.returns