Pardot_API::get_response
Calls Pardot_API and returns response.
Checks if this object has required properties for authentication. If yes and not authenticated, authenticates. Next, build the API user and calls the API. On error, attempt to authenticate to retrieve a new API key unless this is an authentication request, to avoid infinite loops. If reauthenticated and $args['new_api_key'] is a valid callback then callsback with new API key so caller can store it.
Signature
public function get_response(string
$item_type,
[array
$args = ,
[string
$property = 'result',
[integer
$paged = 1]]] )
Parameters
$item_type
— string- One of 'login', 'account', 'campaign' or 'form'.
$args
— array- Query arguments (but might contain ignored auth arguments.
$property
— string- Property to retrieve; defaults to 'result' but can be 'api_key' or 'account'.
$paged
— integer
Returns
- bool|SimpleXMLElement
- Returns API response as a SimpleXMLElement if successful, false if API call fails.