library php-pardot-api
An API wrapper for the Pardot API.
thehilkiah/php-pardot-api
An API wrapper for the Pardot API.
- Friday, July 20, 2018
- by hilmak01
- Repository
- 1 Watchers
- 0 Stars
- 2 Installations
- PHP
- 0 Dependents
- 0 Suggesters
- 3 Forks
- 0 Open issues
- 1 Versions
- 0 % Grown
php-pardot-api
PHP wrapper for the Pardot RESTful API, (*1)
Requirements
- PHP 5.6
- cURL library installed
- Install directory should be writable (not required, but strongly encouraged)
Configuration
- Set the email, password, and user_key values in the pardot_config.php file
- Set the debug mode and logging settings in the pardot_config.php file (optional)
Usage
- Set the namespace:
use Pardot\Core\API as PardotAPI;
- Make requests using the 3 main request functions:
doOperationById($object, $operation, $id = null, $parameters = null)
doOperationByField($object, $operation, $field = null, $fieldValue = null, $parameters = null)
queryObject($object, $parameters = null)
The $object
and $operation
values are the constants referenced at the top of the class file., (*2)
<?php
// namespace config
use Pardot\Core\API as PardotAPI;
use Pardot\Core\API as PardotConfig;
$pardot_config = new PardotConfig(
array(
'email' => "",
'password' => "",
'userkey' => "",
)
);
// get all prospects updated within the last 2 hours
$prospects = PardotAPI::Instance($pardot_config)->queryObject(PardotAPI::OBJ_PROSPECT, array('updated_after' => '2 hours ago'));
var_dump($prospects);
See the example.php file for complete usage examples., (*3)
dev-master
9999999-dev
An API wrapper for the Pardot API.
Sources
Download
MIT
by
Hilkiah Makemo