import Client from './client'; export default class Times extends Client { constructor(opts) { let options = opts; if (typeof opts === 'string') { options = { host: opts }; // convert host string to options object } options.serviceName = 'joglog api'; super(options); } post(options = {}) { return this.makeRequest(`${this.host}/times`, { ...options, method: 'POST', }); } get(options = {}) { return this.makeRequest(`${this.host}/times`, options); } getById(id, options = {}) { return this.makeRequest(`${this.host}/times/${id}`, options); } patch(options = {}) { return this.makeRequest(`${this.host}/times`, { ...options, method: 'PATCH', }); } deleteById(id, options = {}) { return this.makeRequest(`${this.host}/times/${id}`, { ...options, method: 'DELETE', }); } }