Mindbody API Returning Invalid StartDates And EndDates -
this happed , mindbody started returning next class schedule date , instead of returning startdate , enddate of given class .
like .
[startdatetime] => 2016-05-09t17:15:00 [enddatetime] => 2016-05-09t18:15:00
this every classes function getclasses() .
the mindbody api has quite lot of issues regards getclasses
api call in experience (i used in project in mid-late 2015, perhaps things have changed since then...). here list of gotchas/issues found when trying details of class assist you:
- when make
getclasses
api request, if pass inclassid
only,startdatetime
,enddatetime
parameters seem ignored, meaning can't find class in future - the api seems ignore time part of datetime, when make call, you'll list of classes held throughout day of datetime. times you'll each of classes timezoned classes, they'll incorrectly declare in utc format, rather actual timezone
- don't attempt add in specified
datetime
type parameter in api call params cause datetimes have in parameters ignored
so, basically, had use ever 3 parameters in call:
clientid
startdatetime
(which made 24 hours before class wanted's actual start time)enddatetime
(which made 24 hours after class wanted's actual end time)
the 24 hours before , after actual class dates because, mentioned above, couldn't trust timezones returned each of classes. anyway, return collection of classes rather single class, , there, i'd iterate on collection find class wanted.
the above findings gained result of copious trial , error , pouring on documentation incorrect, if existed @ all. luck.
Comments
Post a Comment