Skip to content

Instantly share code, notes, and snippets.

@arekgotfryd
Created November 6, 2017 18:43
Show Gist options
  • Save arekgotfryd/585332cb581142ed804336aac03aa707 to your computer and use it in GitHub Desktop.
Save arekgotfryd/585332cb581142ed804336aac03aa707 to your computer and use it in GitHub Desktop.
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