Created
September 1, 2022 14:49
-
-
Save sebastianjnuwu/52d9954ce23a07176aebdd2e9de072e3 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
const translate = require('translate-google'); | |
const axios = require('axios'); | |
axios.get('https://api.adviceslip.com/advice').then(function (e) { | |
translate(e.data.slip.advice, {to: 'pt'}).then(s => { | |
console.log(s) | |
}); | |
}); | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment