public function getTemplates($clientId = null)
{
// set ID
$clientId = empty($clientId) ? $this->getClientId() : $clientId;
// make the call
$records = (array) $this->doCall('clients/' . $clientId . '/templates');
// stop here if no records were set
if (empty($records)) {
return array();
}
// reserve variables
$results = array();
// loop the records
foreach ($records as $key => $record) {
$results[$key]['id'] = $record['TemplateID'];
$results[$key]['name'] = $record['Name'];
$results[$key]['preview_url'] = $record['PreviewURL'];
$results[$key]['screenshot_url'] = $record['ScreenshotURL'];
}
// return the records
return $results;
}