import Client from './client'; export default class Adventures extends Client { constructor(opts) { let options = opts; if (typeof opts === 'string') { options = { host: opts }; // convert host string to options object } options.serviceName = 'questlog api'; super(options); } post(options = {}) { return this.makeRequest(`${this.host}/adventures`, { ...options, method: 'POST', }); } get(options = {}) { return this.makeRequest(`${this.host}/adventures`, options); } getByGuid(guid, options = {}) { return this.makeRequest(`${this.host}/adventures/${guid}`, options); } }