import Hubspot, {
  ApiOptions,
  HubspotError,
} from '../..';
import { RequestError } from 'request-promise/errors';

const apiKeyOptions: ApiOptions = { apiKey: 'demo' };

const handleResponse = (response) => {
  console.log(response);
}

const handleError = (requestError: RequestError) => {
  const error = requestError.error as HubspotError;
  console.log(error.status);
  console.log(error.message);
  console.log(error.correlationId);
  console.log(error.requestId);
}

const hubspot = new Hubspot(apiKeyOptions);

// Promise
hubspot.companies.get( { limit: 1 })
  .then(handleResponse)
  .catch(handleError)

// Callback
hubspot.companies.properties.groups.get((err: HubspotError, results) => {
  if (err) { console.error(err) }
  console.log(results);
});

import Hubspot, {
  ApiOptions,
  AccessTokenOptions,
  HubspotError,
} from '../..';
import { RequestError } from 'request-promise/errors';

const apiKeyOptions: ApiOptions = { apiKey: 'apiKey' };
const tokenOptions: AccessTokenOptions = { accessToken: 'token' };
const baseUrlOptions: AccessTokenOptions = { accessToken: 'token', baseUrl: 'http://some-url' };

const handleResponse = (response) => {
  console.log(response);
}

const handleError = (requestError: RequestError) => {
  const error = requestError.error as HubspotError;
  console.log(error.status);
  console.log(error.message);
  console.log(error.correlationId);
  console.log(error.requestId);
}

const hubspot = new Hubspot(apiKeyOptions);

// Promise
hubspot.companies.get( { limit: 1 })
  .then(handleResponse)
  .catch(handleError)

// Callback
hubspot.companies.properties.groups.get((err: HubspotError, results) => {
  if (err) { console.error(err) }
  console.log(results);
});

--- 
+++ 
@@ -1,13 +1,10 @@
 import Hubspot, {
   ApiOptions,
-  AccessTokenOptions,
   HubspotError,
 } from '../..';
 import { RequestError } from 'request-promise/errors';
 
-const apiKeyOptions: ApiOptions = { apiKey: 'apiKey' };
-const tokenOptions: AccessTokenOptions = { accessToken: 'token' };
-const baseUrlOptions: AccessTokenOptions = { accessToken: 'token', baseUrl: 'http://some-url' };
+const apiKeyOptions: ApiOptions = { apiKey: 'demo' };
 
 const handleResponse = (response) => {
   console.log(response);
Remove unused parameters in typescript test file

Unfortunately, you can't ignore this compiler option like a lint option. See [here](https://github.com/Microsoft/TypeScript/issues/11051).
While it would be nice to prove out that the access option defintion is working, there's a lot of things
that aren't included in this test file anyways so it needs to be revisited.

This also switches the hapi key to something that actually works.

This PR is the completion of: https://github.com/brainflake/node-hubspot/pull/97
