code: function makeAPICall(uri, reqBody, options) {
      let opts = {
          method: 'POST',
          json: true,
          jar: true,
          gzip: true
      };
      if (options) opts = Object.assign(opts, options);
      if (uri) opts.uri = uri;
      if (arguments.length < 3 && ! reqBody) reqBody = {};
      if (reqBody) opts.body = reqBody;
      let apiCall = new Promise((resolve, reject) => {
          request(opts, function (error, response, body) {
              error = checkAPIerror(error, response, opts.uri, opts.body, body);
              if (error) return reject(error);
              resolve(body.d === undefined ? body : body.d);
          });
      });
      return apiCall;
  }
docs: Invokes an endpoint of the Wireless Tag JSON API, and returns a promise
  that resolves to the result (see below).
  
  @param {string} uri - The URI of the endpoint to invoke. If defined and
  non-null, overrides the `uri` property possibly given in the
  `options` parameter.
  @param {object} reqBody - The body for the request, as a JSON object. If
  defined and non-null, overrides the `body` property possibly
  given in the `options` parameter.
  @param {object} [options] - options to be passed through to `request()`,
  such as custom headers.
  
  @returns {Promise} Resolves to the value of the `d` property of the
  response body from the API endpoint (or the body itself if there
  is no `d` property). Rejects in case of error.