HubSpot API Clients

Category : Hubspot

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)`;

From <https://docs.google.com/document/u/1/d/e/2PACX-1vTuu12oFF4bQY1zVD2-WKFuM2dEDN81-fZRV1tGaCL5Z_OcjC-B6O3mHXR6chaq25BU1D2FuvKIjc49/pub>