microsoftarchive / wunderlist.js

Wunderlist Javascript SDK
https://developer.wunderlist.com/documentation/tools/wunderlist.js
120 stars 29 forks source link

No websocket connection available #1

Closed m19 closed 9 years ago

m19 commented 9 years ago

Hey guys, really enjoying wunderlist. Was toying around with the API and noticed wunderlistAPI.socket doesn't work. It returns the error: No websocket connection available.

octatone commented 9 years ago

The sdk automatically manages the connection to the websocket. Once you create an instance it will connect asynchronously and maintain the connection (reconnect if dropped, etc.). You should always use the .getOutlet() method in the main Wunderlist class to return the currently available connection to the api (either socket or http).

https://github.com/wunderlist/wunderlist.js/blob/master/public/wunderlist/Wunderlist.js#L282