Skip to content

Instantly share code, notes, and snippets.

@sadache
Last active December 21, 2015 18:59
Show Gist options
  • Save sadache/6351625 to your computer and use it in GitHub Desktop.
Save sadache/6351625 to your computer and use it in GitHub Desktop.
var api = Api.get("https://lesbonneschoses.prismic.io/api")
// Find all macarons
var products = api.then(function(api) {
return api.forms['products']
.query('[[:d = at(document.tags, "Macaron")]]')
.ref(api.master)
.submit()
})
// Display macarons
products.then(function(products) {
// go through products and display them
})
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment