Skip to content

Commit

Permalink
Updated README.md, add .npmignore
Browse files Browse the repository at this point in the history
  • Loading branch information
AustinLeeGordon committed Jan 11, 2019
1 parent 13ea9f1 commit 84265db
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 12 deletions.
6 changes: 6 additions & 0 deletions .npmignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
.codeclimate.yml
.editorconfig
.env.template
.eslintrc.js
.prettierrc
.travis.yml
23 changes: 11 additions & 12 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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' })
Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand Down

0 comments on commit 84265db

Please sign in to comment.