import Client from './client'; export default class CreateEvents extends Client { constructor(opts) { let options = opts; if (typeof opts === 'string') { options = { host: opts }; // convert host string to options object } options.serviceName = 'pagerduty-api'; super(options); } post(options = {}) { return this.makeRequest(`${this.host}/generic/2010-04-15/create_event.json`, { ...options, method: 'POST', }); } }