diff --git a/.npmignore b/.npmignore new file mode 100644 index 0000000..2e37f01 --- /dev/null +++ b/.npmignore @@ -0,0 +1,6 @@ +.codeclimate.yml +.editorconfig +.env.template +.eslintrc.js +.prettierrc +.travis.yml diff --git a/README.md b/README.md index 229958e..2f8d9dd 100644 --- a/README.md +++ b/README.md @@ -27,7 +27,7 @@ You can also authenticate via token: const hubspot = new Hubspot({ accessToken: 'abc' }) ``` -To change the base url +To change the base url: ```javascript const hubspot = new Hubspot({ accessToken: 'abc', baseUrl: 'https://some-url' }) @@ -75,16 +75,15 @@ hubspot.contacts ## {EXAMPLE} Create Contact ```javascript -const contactObject = { - "properties": - [ - { "property": "firstname","value": yourvalue }, - { "property": "lastname", "value": yourvalue } - ] - }; +const contactObj = { + "properties": [ + { "property": "firstname","value": yourvalue }, + { "property": "lastname", "value": yourvalue } + ] +}; - const hubspot = new Hubspot({ apiKey: YOUR API KEY }); - const hubspotContact = await hubspot.contacts.create(contactObj); +const hubspot = new Hubspot({ apiKey: YOUR_API_KEY }); +const hubspotContact = await hubspot.contacts.create(contactObj); ``` ## {EXAMPLE} If you need to insert multiple values @@ -372,9 +371,9 @@ return hubspot.oauth.getAccessToken(params).then(...) You may use this library in your Typescript project via: -``` +```typescript import Hubspot from 'hubspot'; -const hubspot = new Hubspot({ apiKey: 'key' }); +const hubspot = new Hubspot({ apiKey: YOUR_API_KEY }); ``` ## License