function pmpapi_ping in Public Media Platform API Integration 7
A very, very simple health check.
Return value
boolean TRUE if there are no PMP errors, FALSE otherwise.
1 call to pmpapi_ping()
- pmpapi_config_form in ./
pmpapi.admin.inc - Form constructor for the PMPAPI admin form.
File
- ./
pmpapi.module, line 117 - Creates basic calls to the PMP API.
Code
function pmpapi_ping() {
$pmp = new PMPAPIDrupal(FALSE);
if (empty($pmp->errors)) {
$pmp
->pull(array(
'profile' => 'story',
'limit' => 1,
));
if (empty($pmp->errors) && count($pmp->query->results->docs)) {
return TRUE;
}
}
return FALSE;
}