Skip to content

Latest commit

 

History

History
102 lines (66 loc) · 1.61 KB

README.md

File metadata and controls

102 lines (66 loc) · 1.61 KB

HubSpot-php custom object sample app

Requirements

  1. php >=7.4.0
  2. Configured .env file

Running

  1. Install dependencies
composer i
  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.php app: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.php

Schemas

Get list of available schemas

./bin/cli.php schemas:get --all

Get schema by Id

./bin/cli.php schemas:get --schemaId=<schemaId>

Create a new schema

./bin/cli.php schemas:create

Update existing schema

./bin/cli.php schemas:update <schemaId>

Note

Please note that it’s possible to update only a singular label for a schema via schemas:update.

Delete existing schema

./bin/cli.php schemas:delete <schemaId>

Note

Please note that object shema cannot be deleted until all object records are deleted.

Objects

Get list of objects from schema

./bin/cli.php objects:get <schemaId> --all

Get object from schema by Id

./bin/cli.php objects:get <schemaId> --id=<objectId>

Create a new object

./bin/cli.php objects:create <schemaId> name=Brian age=25

Update existing object

./bin/cli.php objects:update <schemaId> <objectId> name=Ryan age=30

Delete existing object from schema

./bin/cli.php objects:delete <schemaId> <objectId>