Hi, Martin! First of all, congrats for the post!
It would be good to handle the error on: "stream.on('error'...". If you throw the error as it is the upper function, the error will reach the event loop and the application will crash.
A quick solution would be:
thanks! my only concern would be, if we have the app still running after for example reaching API requests limit for the next 10 hours, are we risking Twitter ban? I think we would also have to implement counter+timer. What you think?
It depends on the Twitter API. But you are not requesting anything to its REST API. You are subscribed to an event. So maybe they manage how much data they can give you.
Hi, Martin! First of all, congrats for the post!
It would be good to handle the error on: "stream.on('error'...". If you throw the error as it is the upper function, the error will reach the event loop and the application will crash.
A quick solution would be:
thanks! my only concern would be, if we have the app still running after for example reaching API requests limit for the next 10 hours, are we risking Twitter ban? I think we would also have to implement counter+timer. What you think?
It depends on the Twitter API. But you are not requesting anything to its REST API. You are subscribed to an event. So maybe they manage how much data they can give you.
right, there are limits but its something like 1% above threshold, I updated the post, cheers!