Skip to content

Instantly share code, notes, and snippets.

@tonyspiro
Last active January 17, 2018 16:02
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save tonyspiro/b6b750de6e65c06ab58c8c1e39eaaf50 to your computer and use it in GitHub Desktop.
Save tonyspiro/b6b750de6e65c06ab58c8c1e39eaaf50 to your computer and use it in GitHub Desktop.
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