Skip to content

Instantly share code, notes, and snippets.

@acatl
Created March 2, 2017 15:18
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 acatl/bc55688b5b79a7f39d6b80af1a35f325 to your computer and use it in GitHub Desktop.
Save acatl/bc55688b5b79a7f39d6b80af1a35f325 to your computer and use it in GitHub Desktop.
Giphy's trending example
exports = {
'source:getTrending': {
url: 'http://api.giphy.com/v1/gifs/trending?api_key=dc6zaTOxFJmzC'
},
// get all images
'model:getAllImages': {
// will execute source:getTrending and pass it as the context
before: 'source:getTrending',
// because the service returns everything
// under 'data' property, this will access that path
context: '$data'
},
};
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment