Created
November 6, 2017 18:43
-
-
Save arekgotfryd/585332cb581142ed804336aac03aa707 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
function getTweets (uid) { | |
return fetch('https://api.users.com/' + uid) | |
.then((response) => { | |
return response.json() | |
}) | |
.then((response) => { | |
return response.data | |
}).then((tweets) => { | |
return tweets.filter((tweet) => { | |
return tweet.stars > 50 | |
}) | |
}).then((tweets) => { | |
return tweets.filter((tweet) => { | |
return tweet.rts > 50 | |
}) | |
}) | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment