You are here

function cc::get_activity in Constant Contact 7.3

Same name and namespace in other branches
  1. 6.3 class.cc.php \cc::get_activity()
  2. 6.2 class.cc.php \cc::get_activity()

Gets a single activity.

@access public

File

./class.cc.php, line 986
Constant Contact PHP Class

Class

cc
@file Constant Contact PHP Class

Code

function get_activity($id) {
  $xml = $this
    ->load_url("activities/{$id}");
  if (!$xml) {
    return FALSE;
  }

  // Parse into nicer array.
  $_activity = isset($xml['entry']) ? $xml['entry'] : FALSE;
  $activity = $_activity['content']['Activity'];
  $activity['id'] = $id;
  if (isset($activity['FileName'])) {
    $activity['FileName'] = $this
      ->get_id_from_link($activity['FileName']);
  }
  return $activity;
}