We are excited to roll out new updates to the Cosmic NPM module (v4.2.*). This update adds new chain-style methods (Note: there are no breaking changes). Review the updates below.
Get started by installing the latest module version
npm install cosmicjs@latest then import the package into your app.
Then set your Bucket slug and read key. These can be found in Your Bucket > Settings > API Access after logging in to your Cosmic dashboard.
Now use the new chain methods to find, add, edit, and delete Objects and Media in your Bucket.
- Updated the NPM module to v4.2.*
- Chain methods are now available
- Breaking changes: none
- Added chain methods for Objects:
- Added chain methods for Media:
For the old npm-v4.1.19 methods, see the docs version for npm-v4.1.19. These methods include:
We hope you enjoy these new methods for using the Cosmic NPM module. Review all of the methods now available in the Cosmic docs. To stay up with the latest updates to Cosmic, follow us on Twitter, subscribe on YouTube, join us on Slack.