Home /Tutorials /Getting the schedule
Getting the schedule

A list of a business’s scheduled classes can be retrieved using the ClassListModel endpoint. This endpoint only filters classes by using the start and end dates. Any other filters would need to be applied on the client side.

// Get the class list. This endpoint doesn’t require sign-in.
$o_classlist_model = new \WellnessLiving\Wl\Schedule\ClassList\ClassListModel($o_config);

$o_classlist_model->is_tab_all=true; // Return classes from all class tabs.
$o_classlist_model->k_business='3';
$o_classlist_model->dt_date = '2023-03-27';
$o_classlist_model->dt_end = '2023-03-31';

$o_classlist_model->get();

foreach($o_classlist_model->a_session as $a_session)
{
 echo $a_session['k_class_period'];
 echo '    '.$a_session['dt_date'];
 echo '    '.$a_session['k_location'];
 echo '    '.$a_session['s_title']."\n";
}