import Client from './client'; export default class Repositories extends Client { constructor(opts) { let options = opts; if (typeof opts === 'string') { options = { host: opts }; // convert host string to options object } options.serviceName = 'Github'; super(options); } getUserAndRepos(options = {}) { return this.makeRequest(`${this.host}/user/repos`, options); } getUsersAndReposByUsername(username, options = {}) { return this.makeRequest(`${this.host}/users/${username}/repos`, options); } getOrgsAndReposByOrg(org, options = {}) { return this.makeRequest(`${this.host}/orgs/${org}/repos`, options); } }