0

I am trying to listen to changes to a resource. I was able to run events.stream once returning an object. How can I make it to be continuously listening? Or is it possible for now?

Jay
  • 1
  • 2

1 Answers1

0

Event streams work on a polling basis. That means you want to poll every so often to see if there are new events. If you want events to be pushed to you, you can set up a web server and register webhooks. You can take a look at the documentation for more detail: https://asana.com/developers/api-reference/webhooks.

Mark
  • 176
  • 4
  • And if you are in fact using the node library then `stream()` will return a stream object which you should then attach events to in the classic streaming fashion. Have you looked at the example at https://github.com/Asana/node-asana/blob/master/examples/events/events.js ? – Greg S Aug 31 '16 at 05:39