code: function (req, res) {
              var method = routes[req.route.path].method,
                  cb = function (err, data) {
  
                      res.json(err || data);
                  },
                  opt;
  
              switch (routes[req.route.path].param) {
              case 'none':
                  opt = cb;
                  cb = null;
                  break;
              case 'id':
                  opt = req.params.id;
                  break;
              case 'opt':
                  opt = XP.merge({}, req.query, req.params);
                  break;
              }
  
              api[method](opt, cb);
          }
docs: Vars