var EventStream = require('../util/event_stream');
var Events = require('./gen/events');

/**
 * Dispatches a GET request to /events of the API to get a set of recent
 * changes to a resource.
 * @param  {Number} resourceId  The id of the resource to get events for
 * @param  {String} [syncToken] Token from a previous sync, if any
 * @param  {Object} [params] Parameters for the request
 * @return {Promise}            The result of the API call:
 *     {String} sync     The new sync token to use for the next request
 *     {Object[]} [data] The changes on the resource since the last sync,
 *                       may not exist if sync token is new.
 */
Events.prototype.get = function(resourceId, syncToken, params = {}) {
  params.resource = resourceId;
  if (syncToken) {
    params.sync = syncToken;
  }
  return this.dispatcher.get('/events', params);
};
/**
 * Begins polling the /events endpoint of the API to listen to changes
 * to a resource.
 * @param  {Number} resourceId  The id of the resource to get events for
 * @param  {Object} [options]   Additional options to pass the stream.
 *     {Number} periodSeconds
 * @return {EventStream}      An EventEmitter that emits notifications
 *                              about changes.
 */
Events.prototype.stream = function(resourceId, options) {
  return new EventStream(this, resourceId, options);
};

Events.EventStream = EventStream;
module.exports = Events;

@@ -328,33 +328,32 @@
 f any%0A * @param 
- 
 %7BObject%7D %5Bparams
@@ -717,20 +717,58 @@
 rams
- = %7B%7D) %7B%0A  p
+) %7B%0A  var requestParams = params %7C%7C %7B%7D;%0A  requestP
 aram
@@ -815,17 +815,24 @@
 ) %7B%0A    
-p
+requestP
 arams.sy
@@ -891,17 +891,24 @@
 vents', 
-p
+requestP
 arams);%0A
@@ -910,16 +910,17 @@
 ms);%0A%7D;%0A
+%0A
 /**%0A * B
@@ -1473,9 +1473,8 @@
  Events;
-%0A

Revert "refactor: use default value for events get params"