Skip to content

Latest commit

 

History

History
65 lines (44 loc) · 1.39 KB

README.md

File metadata and controls

65 lines (44 loc) · 1.39 KB

HubSpot-nodejs custom object sample app

Requirements

  1. Node v10+
  2. Configured .env file

Running

  1. Install dependencies
npm install
  1. Initialize

If .env config file was not configured manually there is a way to initialize the CLI and create .env file via:

./bin/cli.js init

It will ask for your Hubspot Api Key and will save it to the new .env config file.

  1. Commands

Show all commands

./bin/cli.js --help

Get list of available schemas or object instances of the schema

./bin/cli.js get <schema|object> [schemaId] -a --query='test'

Create a new schema or object instance

./bin/cli.js create <schema|object> [schemaId]

Please also notice when you create object instance, some of them require mandatory properties, that you can provide in the following way:

./bin/cli.js create object [schemaId] --email='[email protected]' --firstname='Brian' --lastname='Halligan'

Update existing schema or object instance

./bin/cli.js udpate <schema|object> [schemaId] [objectId] --property1='New property value'

Delete existing schema or object instance

./bin/cli.js delete <schema|object> [schemaId] [objectId]

Get list of available properties for a schema

./bin/cli.js properties [schemaId]