fungku / laravel-hubspot-api by ryanwinchester

PHP HubSpot API wrapper for Laravel 5
25,884
9
5
Package Data
Maintainer Username: ryanwinchester
Maintainer Contact: fungku@gmail.com (Ryan Winchester)
Package Create Date: 2014-04-13
Package Last Update: 2016-07-14
Language: PHP
License: Apache-2.0
Last Refreshed: 2024-04-27 03:10:34
Package Statistics
Total Downloads: 25,884
Monthly Downloads: 4
Daily Downloads: 0
Total Stars: 9
Total Watchers: 5
Total Forks: 5
Total Open Issues: 0

Easy to use HubSpot API in Laravel 4

Latest Stable Version Total Downloads Latest Unstable Version Scrutinizer Code Quality License

PHP HubSpot API package for Laravel 4

Most of the hard-working code is modified classes from HubSpot/haPiHP.

Setup

In composer.json:

"require": {
	"fungku/laravel-hubspot": "1.1.*"
}

then run composer install or composer update

Open app/config/app.php and add this to the providers array:

'Fungku\HubSpot\HubSpotServiceProvider',

TO SET YOUR API KEY:

Run the following command: $ php artisan config:publish fungku/laravel-hubspot

This will generate a config file to: app/config/packages/fungku/laravel-hubspot/api.php

You can then update this file with your api key from HubSpot and set the user agent.

You could also set an environment variable called, HUBSPOT_APIKEY

Examples

Contacts:

$contacts = HubSpot::contacts();

// Get 100 contacts
$contacts->get_all_contacts(array('count'=>100));

// Get a contact by email address
$contacts->get_contact_by_email('example@somedomain.com');

Lists

$lists = HubSpot::lists();

// Get 20 lists
$lists->get_lists(array('count'=>20));