You are here

function pmpapi_fetch in Public Media Platform API Integration 7

Fetches a single doc from the PMP.

Parameters

$guid: A guid.

Return value

object An PMPAPIDrupal object, or NULL if errors.

12 calls to pmpapi_fetch()
PMPAPIDrupalPull::addItems in pmpapi_pull/classes/PMPAPIDrupalPull.php
Maps PMP doc items to entity fields.
PMPAPIPermissionsWebTestCase::testPmpAPIPermissionsPushNodeWhitelistAll in pmpapi_permissions/tests/pmpapi_permissions.test
Pushes a node to the PMP.
PMPAPIPermissionsWebTestCase::testPmpAPIPermissionsPushNodeWhitelistGroup in pmpapi_permissions/tests/pmpapi_permissions.test
Pushes a node to the PMP.
PMPAPIPermissionsWebTestCase::testPmpAPIPermissionsPushNodeWhitelistOnlyUser in pmpapi_permissions/tests/pmpapi_permissions.test
Pushes a node to the PMP.
PMPAPIPushWebTestCase::testPmpAPIPushNodeWithRelatedImage in pmpapi_push/tests/pmpapi_push.test
Pushes node (with attached image) to the PMP.

... See full list

File

./pmpapi.module, line 59
Creates basic calls to the PMP API.

Code

function pmpapi_fetch($guid, $cache = TRUE) {
  $pmp = new PMPAPIDrupal($cache);
  if (empty($pmp->errors)) {
    $pmp
      ->pull(array(
      'guid' => $guid,
    ));
  }
  return $pmp;
}