Last active
January 17, 2018 16:02
-
-
Save tonyspiro/b6b750de6e65c06ab58c8c1e39eaaf50 to your computer and use it in GitHub Desktop.
Cosmic JS NPM module - Get Objects
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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