Last active
April 5, 2016 06:12
-
-
Save mdeiters/e5c1e5cecf8f500aec4e883cc227d4e3 to your computer and use it in GitHub Desktop.
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
export const config = { | |
intent: ['bitcoin price'] | |
} | |
export default function *(q) { | |
const url = 'https://api.coinbase.com/v2/prices/spot?currency=USD' | |
const result = yield q.http.get(url) | |
yield q.tell(`bitcoin (${result.data.currency}): $${result.data.amount}`) | |
return result.data.amount | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment