From dca98f798348c868cd82dbb3ab976e8b6cfc6f9f Mon Sep 17 00:00:00 2001 From: Tristan Date: Mon, 21 May 2018 19:28:16 -0500 Subject: [PATCH] fix(Fixes #97): Updated name to RequestClient When the typings were merged, the Client endpoint in harvest as well as the Request client had conflicting names. The Request clinet has been updated to RequestClint. #97 --- src/client.spec.ts | 6 +++--- src/client.ts | 2 +- src/index.ts | 6 +++--- 3 files changed, 7 insertions(+), 7 deletions(-) diff --git a/src/client.spec.ts b/src/client.spec.ts index 61e211ca..2f10fcb4 100644 --- a/src/client.spec.ts +++ b/src/client.spec.ts @@ -1,5 +1,5 @@ import * as Request from 'request-promise'; -import Client from './client'; +import RequestClient from './client'; const config = { subdomain: process.env.SUBDOMAIN, @@ -17,11 +17,11 @@ describe('Client test', () => { let instance; beforeEach(() => { - instance = new Client(config); + instance = new RequestClient(config); }); it('Client is instantiable', () => { - expect(instance).toBeInstanceOf(Client); + expect(instance).toBeInstanceOf(RequestClient); }); describe('preprocess method', () => { diff --git a/src/client.ts b/src/client.ts index f4f97b70..19c8587a 100644 --- a/src/client.ts +++ b/src/client.ts @@ -1,7 +1,7 @@ import async from 'async'; import * as Request from 'request-promise'; -export default class Client { +export default class RequestClient { private accessToken: string; private accountId: string; private concurrency; diff --git a/src/index.ts b/src/index.ts index 24169c86..590b8af3 100644 --- a/src/index.ts +++ b/src/index.ts @@ -1,4 +1,4 @@ -import Client from './client'; +import RequestClient from './client'; import { ClientsAPI } from './api/clients'; import { CompanyAPI } from './api/company'; import { ContactsAPI } from './api/contacts'; @@ -29,7 +29,7 @@ export default class Harvest { concurrency = null; debug = false; - client: Client; + client: RequestClient; request; clients: ClientsAPI; @@ -59,7 +59,7 @@ export default class Harvest { this.concurrency = config.concurrency || null; this.debug = config.debug || false; - this.client = new Client(config); + this.client = new RequestClient(config); this.request = this.requestGenerator(); this.clients = new ClientsAPI(this);