import Client from './client'; export default class Blobs 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); } getBySha(owner, repo, sha, options = {}) { return this.makeRequest(`${this.host}/repos/${owner}/${repo}/git/blobs/${sha}`, options); } post(owner, repo, options = {}) { return this.makeRequest(`${this.host}/repos/${owner}/${repo}/git/blobs`, { ...options, method: 'POST', }); } }