Created
September 11, 2020 02:07
-
-
Save MCarlomagno/d3843b0d1e30ad324a82bc623b362f68 to your computer and use it in GitHub Desktop.
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
const fetchTweets = async (text) => { | |
// fetch tweets from server | |
// enviroment [string]: Base url to the express.js server app | |
// text [string]: username of the tweets author | |
// tweetsToSearch [number]: number of tweets (10, 20, 50 or 100) | |
const result = await fetch(`${enviroment}/twits/${text}/${tweetsToSearch}`); | |
const response = await result.json(); | |
return response.body; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment