The Perl Toolchain Summit needs more sponsors. If your company depends on Perl, please support this very important event.

NAME

HubSpot::Client -- An object that can be used to manipulate the HubSpot API

SYNOPSIS

 my $client = HubSpot::Client->new({ api_key => $hub_api_key }); 
 # Retrieve 50 contacts
 my $contacts = $client->contacts(50);

DESCRIPTION

This module was created for internal needs. At the moment it does what I need it to do, which is to say not very much. However it is a decent enough framework for adding functionality to, so your contributions to extend it to what you need it to do are welcome.

At the moment you can only retrieve read-only representations of contact objects.

METHODS

new({api_key => <api_key_for_your hub> }) (constructor)

This class is what you use to perform actions against the API. Once you have created an instance of this object, you can call the other methods below on it. If you don't specify an API key it will connect to the demo HubSpot hub. Since this is shared by everyone on the internet, don't be surprised if you start to see 429 errors getting returned. See Rate limits.

Returns: new instance of this class.

contact_by_id()

Retrieve a single contact record by its ID. Takes one parameter, which is the ID of the contact you want to retrieve. The returned object will contain all the properties set on that object.

 my $contact = $client->contact_by_id('897654');

Returns: HubSpot::Contact, or undef if the contact wasn't found.

contacts()

Retrieve all contact records. Takes one optional parameter, which is the number of contacts you want to retrieve. The returned objects will contain a few of the properties set on that object. See "properties" in HubSpot::Client.

 my $contact = $client->contacts();
 my $contact = $client->contacts(200);
s
Returns: L<HubSpot::Contact>

1 POD Error

The following errors were encountered while parsing the POD:

Around line 67:

=over without closing =back