import Client from './client'; export default class Epochs extends Client { constructor(opts) { let options = opts; if (typeof opts === 'string') { options = { host: opts }; // convert host string to options object } options.serviceName = 'hilltop-api'; super(options); } getCurrent(options = {}) { return this.makeRequest(`${this.host}/epochs/current`, options); } getByEpochNumber(epochNumber, options = {}) { return this.makeRequest(`${this.host}/epochs/${epochNumber}`, options); } }