HubSpot API Clients
HubDb Client
Add the client to your page:
`<script src="/hs/hsstatic/ClientSupport/static-1.9/js/HubDbClient.js"/>`
Functions:
`window.hubdbClient.getTable(portalId, tableId, callback)` `window.hubdbClient.getRow(portalId, tableId, rowId, callback)` `window.hubdbClient.listRows(portalId, tableId, queryString, callback)`
`callback` is a function that is called with the result object.
Example:
` function test(result) { console.log(result); } window.hubdbClient.getTable(123, 456, test); `
Search Client
Add the client to your page:
`<script src="/hs/hsstatic/ClientSupport/static-1.10/js/SearchClient.js"/>`
Functions:
`window.searchClient.search(params, callback)`
`params` should be a dict {}, and will be automatically converted to a query string.
See the API for which query params are available: https://developers.hubspot.com/docs/methods/content/search-for-content
Example:
`window.searchClient.search({“term”: “test”}, callback)`;