-
-
Save deitrick/3539316 to your computer and use it in GitHub Desktop.
Mindbody API Integration
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
include_once('MINDBODY_API_v0.5.php'); | |
$mb = new MINDBODY_API(); | |
$tomorrow = date('Y-m-d\TH:i:s', strtotime("tomorrow")); // note for MINDBODY you have to format your dates in the standard ISO 8601 format but without the timezone offset | |
$thirtydays = strtotime(date("Y-m-d", strtotime($tomorrow)) . " +30 days"); | |
$params = array( | |
"StartDateTime"=>$tomorrow, | |
"EndDateTime"=> $thirtydays | |
); | |
$mbResult = $mb->getClasses($params); | |
foreach($mbResult->GetClassesResult->Classes->Class as $class) { | |
// echo gettype($class); | |
echo $class->StartDateTime; | |
echo " | "; | |
echo $class->Staff->Name; | |
echo '<br />'; | |
} | |
?> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment