Skip to content

Instantly share code, notes, and snippets.

@tonyspiro
Last active Jan 17, 2018
Embed
What would you like to do?
Cosmic JS NPM module - Get Objects
const bucket = Cosmic.bucket({
slug: 'wedding-site',
read_key: ''
})
bucket.getObjects({
limit: 2
}).then(data => {
console.log(data)
}).catch(err => {
console.log(err)
})
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment