index.js
function setCurrentFilter(filter) {
    var token = cache.get('token');
    var dfrd = Q.defer();
    var id;
    if (!token) {
      dfrd.reject(MODULE_ERRORS.undefinedToken);
    } else {
      id = typeof filter === 'string' ? filter : filter.id;
      request(format(URLs.setCurrentFilter, PROTOCOL, conf.host, id,
        token), function(err, res, body) {
        if (err) {
          dfrd.reject(err);
        } else {
          _extractEmptyResponse(body, dfrd);
          dfrd.resolve(true);
        }
      });
    }
    return dfrd.promise;
  }
function setCurrentFilter(filter) {
    var token = cache.get('token');
    var dfrd = Q.defer();
    var id;
    if (!token) {
      dfrd.reject(MODULE_ERRORS.undefinedToken);
    } else {
      id = typeof filter === 'string' ? filter : filter.id;
      request(format(URLs.setCurrentFilter, PROTOCOL, conf.host, id,
        token), function(err, res, body) {
        if (err) {
          dfrd.reject(err);
        } else {
          _extractEmptyResponse(body, dfrd);
          dfrd.resolve(true);
        }
      });
    }
    return dfrd.promise;
  }
function setCurrentFilter ( filter ) { var token = cache . get ( 'token' ) ; var dfrd = Q . defer ( ) ; var id ; if ( ! token ) { dfrd . reject ( MODULE_ERRORS . undefinedToken ) ; } else { id = typeof filter === 'string' ? filter : filter . id ; request ( format ( URLs . setCurrentFilter , PROTOCOL , conf . host , id , token ) , function ( err , res , body ) { if ( err ) { dfrd . reject ( err ) ; } else { _extractEmptyResponse ( body , dfrd ) ; dfrd . resolve ( true ) ; } } ) ; } return dfrd . promise ; }
Sets the current Filter. I'm not sure what this does exactly.
@method setCurrentFilter
@param {Filter|string} filter Filter object or string ID
@see class fogbugz.Filter
@returns {Promise.<boolean>} True if success
Sets the current Filter . I m not sure what this does exactly .