Skip to content

Instantly share code, notes, and snippets.

@Abeyy Abeyy/getObjectFromCosmic.js Secret
Last active Aug 30, 2018

Embed
What would you like to do?
getObject() from Cosmic JS
async getResObject() {
const slug = 'insertObjectSlugHere'
try {
const res = await bucket.getObject({ slug })
this.resObject = res
return
})
}
catch(e) {
console.log('Error getting Object from Cosmic JS', e)
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.