import Client from './client'; export default class Services extends Client { constructor(opts) { let options = opts; if (typeof opts === 'string') { options = { host: opts }; // convert host string to options object } options.serviceName = 'registry-api'; super(options); } get(options = {}) { return this.makeRequest(`${this.host}/`, options); } getByName(name, options = {}) { return this.makeRequest(`${this.host}//${name}`, options); } getUriByName(name, options = {}) { return this.makeRequest(`${this.host}//${name}/uri`, options); } }