<?php
/**
* @Copyright Copyright (C) 2010 Brent Laminack
* @license GNU/GPL http://www.gnu.org/copyleft/gpl.html
**/
function  get_list($api, $params){
        $list_return = $api->lists();
        if($api->errorCode){
                echo "can't find lists: ";
                echo $api->errorMessage;
                echo " error code: ";
                echo $api->errorCode;
                exit;
        }
        $foundit=FALSE;
        $list_count = $list_return['total'];
        $lists = $list_return['data'];
        foreach($lists as $list){
                if($list['id'] == $params->get('mc_unique_id')){
			return($list);
                }
        }
        if(!$foundit){
		return($lists[0]);
        }

}	// end of get_list
?>
