Created
March 2, 2017 15:18
-
-
Save acatl/bc55688b5b79a7f39d6b80af1a35f325 to your computer and use it in GitHub Desktop.
Giphy's trending example
This file contains hidden or 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
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