HubSpot-ruby CRM-objects sample app
May 4, 2021 ยท View on GitHub
Requirements
- ruby 2.6.3
- Configured .env file
Running
- Install dependencies
bundle install
- Commands
Show all commands (get help)
ruby cli.rb -h
Get objects
ruby cli.rb -m get_page -t [object_type]
Get an object by id
ruby cli.rb -m get_by_id -t [object_type] -i [object_id]
Create new object
ruby cli.rb -m create -t [object_type] -p [params]
Params is a json, example:
'{"email":"some@email.com","firstname":"Brian","lastname":"Halligan"}'
Delete an object by id
ruby cli.rb -m archive -t [object_type] -i [object_id]
Update an object by id
ruby cli.rb -m update -t [object_type] -i [object_id] -p [params]
Params is a json, example:
'{"firstname":"John}'