companies: Companies endpoint (raw and tidy)

Description Usage Arguments Details Value Examples

Description

Get raw and tidy results from the companies endpoint.

Usage

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
hs_companies_raw(
  token_path = hubspot_token_get(),
  apikey = hubspot_key_get(),
  properties = hs_company_properties_tidy(hs_company_properties_raw(token_path, apikey)),
  property_history = "true",
  max_iter = 10,
  max_properties = 100
)

hs_companies_tidy(companies = hs_companies_raw(), view = c("properties"))

Arguments

token_path

Path to OAuth 2.0 token. See hubspot_token_create().

apikey

API key to work with Hubspot (only used if token_path is NULL). See hubspot_key_set().

properties

Character vector of properties to request

property_history

Whether version history for properties should be returned

max_iter

The API is limited to a certain number of responses by page, use max_iter to limit how many pages of data will get returned

max_properties

Avoid URLs that are too long, limit the number of properties returned, if required.

companies

A companies return from hs_companies_raw()

view

A view (see Details)

Details

Required scope(s) of the OAuth token: contacts.

Different view values and associated output.

Value

List with company data (hs_companies_raw())

A tibble with associated entities (hs_companies_tidy())

Examples

1
2
3
4
5
6
7
8
companies <- hs_companies_raw(
  property_history = "false", max_iter = 1,
  max_properties = 10
)
companies_properties <- hs_companies_tidy(
  companies,
  view = "properties"
)

lockedata/hubspot documentation built on March 1, 2020, 8:54 p.m.