listenToEventStream({ onEvent, deviceId, name, product }) {
		this._lastListenArguments = arguments;
		return this._particle.getEventStream({
			deviceId, name, product, auth: this._accessToken
		}).then((stream) => {
			this._stream = stream;
			this._stream.on('event', onEvent);
			this._stream.on('error', this._reauthenticate.bind(this));
			this._stream.on('end', this._reauthenticate.bind(this));
		});
	}
/**
	 * Get the EventStream and subscribe to the 'event' event
	 * with onEvent callback
	 *
	 * @param {Function} onEvent
	 * @param {String} options.deviceId
	 * @param {String} options.name
	 * @param {String} options.product
	 * @returns {Promise} Resolves when adding listener succeeded
	 */
Get the EventStream and subscribe to the 'event' event
with onEvent callback


Get the EventStream and subscribe to the ' event ' event with onEvent callback
listenToEventStream({ onEvent, deviceId, name, product }) {
		this._lastListenArguments = arguments;
		return this._particle.getEventStream({
			deviceId, name, product, auth: this._accessToken
		}).then((stream) => {
			this._stream = stream;
			this._stream.on('event', onEvent);
			this._stream.on('error', this._reauthenticate.bind(this));
			this._stream.on('end', this._reauthenticate.bind(this));
		});
	}
listenToEventStream ( { onEvent , deviceId , name , product } ) { this . _lastListenArguments = arguments ; return this . _particle . getEventStream ( { deviceId , name , product , auth : this . _accessToken } ) . then ( ( stream ) => { this . _stream = stream ; this . _stream . on ( 'event' , onEvent ) ; this . _stream . on ( 'error' , this . _reauthenticate . bind ( this ) ) ; this . _stream . on ( 'end' , this . _reauthenticate . bind ( this ) ) ; } ) ; }
Get the EventStream and subscribe to the 'event' event
 with onEvent callback
Get the EventStream and subscribe to the ' event ' event with onEvent callback