node-twitter icon indicating copy to clipboard operation
node-twitter copied to clipboard

Call to API in Async function does nothing

Open engineertdog opened this issue 6 years ago • 1 comments

If I take a working call / use of the API and wrap it in an async function and call the function with await, then the API call won't do anything. In order to make sure that I get results in certain orders, I'm trying to organize everything with async wait functions. No error codes are thrown or anything, it's just acting like it's physically not calling the API.

Works

client.get('followers/ids', twitter_params, function(err, data) {
    // code
}

Does not work

await getTwitterFollowers();

async function getTwitterFollowers() {
    client.get('followers/ids', twitter_params, function(err, data) {
        // code
    }
}

engineertdog avatar Apr 06 '18 03:04 engineertdog

@engineertdog see https://github.com/Preposterous/twitter-lite

peterpme avatar Apr 19 '18 23:04 peterpme