From 259ab6964c355cfd87a7fde545dc259d18464526 Mon Sep 17 00:00:00 2001 From: Adam Coulombe Date: Fri, 23 Apr 2021 11:22:56 -0400 Subject: [PATCH] Update readme with properly working getting started example --- README.md | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index 3406132..9ff56d2 100644 --- a/README.md +++ b/README.md @@ -18,8 +18,14 @@ const client = new Twitter({ access_token_secret: '', }); -const { data } = await client.get('tweets', { ids: '1228393702244134912' }); -console.log(data); +async function getTweets(){ + const { data } = await client.get('tweets', { ids: '1228393702244134912' }); + return data +} +getTweets().then(tweets=>{ + console.log(tweets); +}); + ``` ## Installation