{"id":70,"date":"2022-08-01T06:42:52","date_gmt":"2022-08-01T06:42:52","guid":{"rendered":"https:\/\/www.wellnessliving.com\/developer-portal\/?p=70"},"modified":"2024-10-19T13:34:23","modified_gmt":"2024-10-19T13:34:23","slug":"getting-the-schedule","status":"publish","type":"post","link":"https:\/\/www.wellnessliving.com\/developer-portal\/tutorials\/getting-the-schedule\/","title":{"rendered":"Retrieving the schedule"},"content":{"rendered":"\n<p>You can retrieve a list of a business\u2019s scheduled classes using the <a rel=\"noreferrer noopener\" href=\"https:\/\/github.com\/wellnessliving\/wl-sdk\/blob\/ffbc9a02fdc93923bbdbf2afe709313255f97810\/WellnessLiving\/Wl\/Schedule\/ClassList\/ClassListModel.php\" target=\"_blank\">ClassListModel<\/a> endpoint. This endpoint filters classes by using the start and end dates. Additional filters can be applied on the client side.<\/p>\n\n\n\n<div class=\"wp-block-columns\">\n<div class=\"wp-block-column\">\n<div class=\"wp-block-columns\">\n<div class=\"wp-block-column\">\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"generic\" data-enlighter-theme=\"\" data-enlighter-highlight=\"\" data-enlighter-linenumbers=\"\" data-enlighter-lineoffset=\"\" data-enlighter-title=\"\" data-enlighter-group=\"\">\/\/ Retrieve the class list.\n$o_classlist_model = new \\WellnessLiving\\Wl\\Schedule\\ClassList\\ClassListModel($o_config);\n\n$o_classlist_model->is_tab_all=true; \/\/ Return classes from all class tabs.\n$o_classlist_model->k_business='3';\n$o_classlist_model->dt_date = '2023-03-27';\n$o_classlist_model->dt_end = '2023-03-31';\n\n$o_classlist_model->get();\n\nforeach($o_classlist_model->a_session as $a_session)\n{\n echo $a_session['k_class_period'];\n echo '    '.$a_session['dt_date'];\n echo '    '.$a_session['k_location'];\n echo '    '.$a_session['s_title'].\"\\n\";\n}<\/pre>\n<\/div>\n<\/div>\n<\/div>\n<\/div>\n","protected":false},"excerpt":{"rendered":"<p>You can retrieve a list of a business\u2019s scheduled classes using the ClassListModel endpoint. This endpoint filters classes by using the start and end dates. Additional filters can be applied on the client side.<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":[],"categories":[7,27],"tags":[],"acf":[],"_links":{"self":[{"href":"https:\/\/www.wellnessliving.com\/developer-portal\/wp-json\/wp\/v2\/posts\/70"}],"collection":[{"href":"https:\/\/www.wellnessliving.com\/developer-portal\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.wellnessliving.com\/developer-portal\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.wellnessliving.com\/developer-portal\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.wellnessliving.com\/developer-portal\/wp-json\/wp\/v2\/comments?post=70"}],"version-history":[{"count":6,"href":"https:\/\/www.wellnessliving.com\/developer-portal\/wp-json\/wp\/v2\/posts\/70\/revisions"}],"predecessor-version":[{"id":468,"href":"https:\/\/www.wellnessliving.com\/developer-portal\/wp-json\/wp\/v2\/posts\/70\/revisions\/468"}],"wp:attachment":[{"href":"https:\/\/www.wellnessliving.com\/developer-portal\/wp-json\/wp\/v2\/media?parent=70"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.wellnessliving.com\/developer-portal\/wp-json\/wp\/v2\/categories?post=70"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.wellnessliving.com\/developer-portal\/wp-json\/wp\/v2\/tags?post=70"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}