Page 1 of 1

getSchedule array maximum size

Posted: Fri Apr 24, 2015 10:10 am
by queek
I can get into the API and retrieve the schedule information using getSchedule. The problem is that the array maxes out at 50 even though there are more than 50 records to return. Does anyone know how I can fix this or point me to where I can find this within the API to fix it myself?

My code:
$schedule_obj = new TimeTrexClientAPI( 'Schedule' );
$schedule_filter = array(
'filter_data' => array(
'start_date' => strtotime('20150426'),
'end_date' => strtotime('20150502')
)
);
$result = $schedule_obj->getSchedule($schedule_filter);
$schedule_data = $result->getResult();

Any help would be much appreciated.

Re: getSchedule array maximum size

Posted: Fri Apr 24, 2015 11:28 am
by shaunw
Pass the 2nd argument to getSchedule() as TRUE, that disables paging and returns all results.

Code: Select all

$result = $schedule_obj->getSchedule($schedule_filter, TRUE );

Re: getSchedule array maximum size

Posted: Fri Apr 24, 2015 12:30 pm
by queek
Thank you.