\Pardot_API
Synopsis
class Pardot_API
{
- // constants
- const ROOT_URL = 'https://pi.pardot.com/api';
- const VERSION = '4';
- // members
- private static string $URL_PATH_TEMPLATE = '/%%ITEM_TYPE%%/version/%%VERSION%%/do/%%ACTION%%';
- private static string $LOGIN_URL_PATH_TEMPLATE = '/login/version/%%VERSION%%';
- public $email;
- public $password;
- public $user_key;
- public boolean $api_key = false;
- public boolean $api_key_maybe_invalidated = false;
- public boolean $error = false;
- // methods
- public void __construct()
- public string|bool authenticate()
- public bool is_authenticated()
- public array|bool get_campaigns()
- public get_account()
- public array|bool get_forms()
- public array|bool get_dynamicContent()
- public array|object SimpleXMLElement_to_stdClass()
- public void set_auth()
- public boolean has_auth()
- public bool|SimpleXMLElement get_response()
- public array get_auth()
- private string _get_url()
Constants
Name | Value |
---|---|
ROOT_URL | 'https://pi.pardot.com/api' |
VERSION | '4' |
Members
private
- $LOGIN_URL_PATH_TEMPLATE — string
- $URL_PATH_TEMPLATE — string
public
- $api_key — string
- $api_key_maybe_invalidated — boolean
- $email — string
- $error — string
- $password — string
- $user_key — string
Methods
private
- _get_url() — Simple helper function to return the URL required for an $item_type specific Pardot API.
public
- __construct() — Creates a Pardot API object.
- SimpleXMLElement_to_stdClass() — Returns an object or array of stdClass objects from an SimpleXMLElement
- authenticate() — Call Pardot API to authenticate and retrieve API Key
- get_account() — Returns an account object from Pardot's API
- get_auth() — Returns array of auth parameter based on the auth properties of this Pardot_API object
- get_campaigns() — Returns an array of campaign objects from Pardot's API
- get_dynamicContent() — Returns an dynamic content from Pardot's API
- get_forms() — Returns an array of form objects from Pardot's API
- get_response() — Calls Pardot_API and returns response.
- has_auth() — Checks if this Pardot_API object has the necessary properties set for authentication.
- is_authenticated() — Determine is the API has authenticated.
- set_auth() — Set the auth properties of the Pardot_API.