lib/endpoints/scheduled_overrides.js
/**
 * Create a new scheduled override.
 *
 * @param {Object} overrideInfo Scheduled override information.
 * @returns {Promise<Object>} VictorOps API response.
 */
Create a new scheduled override.
@param {Object} overrideInfo Scheduled override information.
@returns {Promise} VictorOps API response.
Create a new scheduled override . @param { Object } overrideInfo Scheduled override information . @returns { Promise } VictorOps API response .
async function createOverride(overrideInfo = {}) {
  try {
    const apiPrefix = this.getApiPrefix();
    const options = this._getRequestOptions('POST', `${apiPrefix}/overrides`,
      null, overrideInfo);
    return await this._performRequest(options);
  } catch (err) {
    throw this._handleError(err);
  }
}
async function createOverride ( overrideInfo = { } ) { try { const apiPrefix = this . getApiPrefix ( ) ; const options = this . _getRequestOptions ( 'POST' , ` ${ apiPrefix } ` , null , overrideInfo ) ; return await this . _performRequest ( options ) ; } catch ( err ) { throw this . _handleError ( err ) ; } }
Create a new scheduled override.
Create a new scheduled override .
// Get the API prefix. // Get the request options. // Peform the request.