List All Subscribers For A Form
@param req
@param res
@param next
496625
function listSubscribers(req, res, next) {
  var listSubscribersParams = {
    _id: req.params.id
  };

  logger.debug("Middleware: listSubscribers: ", {params: listSubscribersParams});

  forms.getNotifications(_.extend(req.connectionOptions, listSubscribersParams), formsResultHandlers(constants.resultTypes.forms, req, next));
}
779422
protected function _doList($params = array())
    {
        $path = "/subscriptions";
        if(isset($params['params'])) { $params['query'] = $params['params'];
            unset($params['params']);
        }

        
        $response = $this->api_client->get($path, $params);
        

        return $this->getResourceForResponse($response);
    }
476062
function listProjectSubmissions(req, res, next) {
  var formId = req.body.formId;
  var subIds = req.body.subid;

  var params = {
    wantRestrictions: false,
    appId: req.params.projectid
  };

  //Assigning Form Search If Set
  if (_.isString(formId)) {
    params.formId = formId;
  }

  //Assigning Submission Search Params If Set
  if (_.isArray(subIds)) {
    params.subid = subIds;
  } else if (_.isString(subIds)) {
    params.subid = [subIds];
  }

  logger.debug("Middleware listProjectSubmissions ", {params: params});

  forms.getSubmissions(req.connectionOptions, params, submissionsHandler(constants.resultTypes.submissions, req, next));
}
1122899
function ( req, res, next ) {

    if ( req.body ) {
        trimStringProperties(req.body);
    }

    if ( req.params ) {
        trimStringProperties(req.params);
    }

    if ( req.query ) {
        trimStringProperties(req.query);
    }

    next();

}
1223134
function present(req, res, next) {

    // Sort
    if (req._internal._sort) {
      req._internal._order = req._internal._order || 'ASC'
      req._internal.resource = _.sortBy(req._internal.resource, function (element) {
        return element[req._internal._sort]
      })
      if (req._internal._order === 'DESC') {
        req._internal.resource.reverse()
      }
    }

    // Slice result
    if (req._internal._end || req._internal._limit) {
      res.setHeader('X-Total-Count', req._internal.resource.length)
      res.setHeader('Access-Control-Expose-Headers', 'X-Total-Count')
    }
    req._internal._start = parseInt(req._internal._start) || 0
    if (req._internal._end) {
      req._internal.resource = req._internal.resource.slice(req._internal._start, parseInt(req._internal._end))
    } else if (req._internal._limit) {

      // Convert strings to int and sum to get end value
      req._internal.resource = req._internal.resource.slice(req._internal._start, parseInt(req._internal._start) + parseInt(req._internal._limit))
    }
    res.jsonp(req._internal.resource)
  }
280541
function autoSubscribe() {
    //re-add pending subscribers
    if (_pendingSubscribers.length > 0) {
      async.each(_pendingSubscribers, function(sub, callback) {
        debug('Add pending subscriber', sub);
        self.subscribeToTopic(sub.exchange, sub.queue, sub.filter, sub.subscriber, sub.opts, function(err) {
          if (err) {
            debug('Failed to add subscriber, keep it', sub);
          } else {
            //done, remove the item from the pending subscribers
            var idx = _pendingSubscribers.indexOf(sub);
            _pendingSubscribers.splice(idx, 1);
            debug('pending subsriber added, now there are ' + _pendingSubscribers.length + ' left');
          }
          return callback();
        });
      }, function() {
        debug('pending subscribers are added');
      });
    }
  }
1000047
function search(req, res, next) {
  var queryParams = req.body;

  logger.debug("Middleware Submission Search ", {params: queryParams});

  forms.submissionSearch(req.connectionOptions, queryParams, _getSubmissionsResultHandler(req, next));
}
1009557
function count(req, res, next) {
  User.count(function(err, count){
    if (err) return next(err);
    req.count = count;
    next();
  })
}
805619
def list_vmss_sub(access_token, subscription_id):
    '''
    '''
    endpoint = ''.join([get_rm_endpoint(),
                        '/subscriptions/', subscription_id,
                        '/providers/Microsoft.Compute/virtualMachineScaleSets',
                        '?api-version=', COMP_API])
    return do_get_next(endpoint, access_token)
61230
function count(req, res, next) {
  db.posts.count(function(err, count) {
    if(err) { return next(err); }
    res.json({count: count});
  });
}
1185283
function list(req, res, next) {
  logger.debug("Middleware Submissions List ", {connectionOptions: req.connectionOptions});
  forms.getSubmissions(req.connectionOptions, {}, _getSubmissionsResultHandler(req, next));
}
722193
def get_subscribers(object_type: str) -> List[str]:
    
    return DB.get_list(_keys.subscribers(object_type))
889053
function list(req, res, next) {
  forms.getAllAppForms(req.connectionOptions, formsResultHandlers(constants.resultTypes.formProjects, req, next));
}
369002
function list(req, res) {
  var s = '';
  this.state.connections.forEach(function(conn) {
    s += conn.toString();
  })
  res.send(null, s);
}
745003
function(req, res, next) {
			res.set('XX-Powered-By', 'Restpress');
			req.resource = self;
			req.actionName = actionName;
			req.action = action;
			next();
		}
1360456
function listNotifications(req, res, next){
  var logger = log.defaultLogger();
  var listReq = RequestTranslator.parseListNotificationsRequest(req);
  var NotificationsModel = models.getModels().Notification;
  NotificationsModel.queryNotifications(listReq.uid, listReq.env, listReq.domain, function(err, notifications){
    if(err) {
      logger.error(loggerPrefix + 'Notifications Query Error: ', err);
      next(err);
    } else {
      var notificationsRes = ResponseTranslator.mapNotificationsToResponse(notifications);
      req.resultData = notificationsRes;
      next();
    }
  });
}
421374
public List<ISubmission> include(List<ISubmission> submissions, List<String> submitters){
		ArrayList<ISubmission> filteredSubmissions = new ArrayList<ISubmission>();
		for (ISubmission submission: submissions){
			if (submission.getSubmitter() != null){
				if (submitters.contains(submission.getSubmitter().getSubmitter()))
					filteredSubmissions.add(submission);
			}
		}
		return filteredSubmissions;
	}