You are here

function cc::get_list in Constant Contact 6.2

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

* Gets the details of a specific constant list * * * @access public

File

./class.cc.php, line 345

Class

cc
@file

Code

function get_list($listid) {
  $xml = $this
    ->load_url("lists/{$listid}");
  if (!$xml) {
    return false;
  }
  $list = false;
  $_list = isset($xml['entry']) ? $xml['entry'] : false;

  // parse into nicer array
  if (is_array($_list)) {
    $id = $this
      ->get_id_from_link($_list['link_attr']['href']);
    $list = array(
      'id' => $id,
      'Name' => $_list['content']['ContactList']['Name'],
      'ShortName' => $v['content']['ContactList']['ShortName'],
      'OptInDefault' => $_list['content']['ContactList']['OptInDefault'],
      'SortOrder' => $_list['content']['ContactList']['SortOrder'],
    );
  }
  return $list;
}