Wednesday, 24 May 2017

How do I get the args out of this twitter api call

I made a twitter bot and it's working. But it's a bunch of nested logic that I would like to refactor into functions.

I have this twitter api call and I want to return the reply parameter.

T.get('trends/place', { id: '23424977' }, function(err, reply) {
  THE WHOLE APP IS BASICALLY IN HERE
{

It won't let me name the function like

T.get('trends/place', { id: '23424977' }, function getTrends(err, reply) {
  THE WHOLE APP IS BASICALLY IN HERE
{

I messed around with some other ridiculous ideas but no luck.

The whole bot is here https://glitch.com/edit/#!/trending-mishap?path=server.js



via j1mmy

No comments:

Post a Comment