-
Notifications
You must be signed in to change notification settings - Fork 8
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
If no classes in current timeframe, display first week of classes. #15
Comments
I think this is really only important for a new studio that is launching before classes actually start. Of course they can link to MBO schedule in the interim. Could we only trigger the second API call if the first call returned an empty set? That seems like the best strategy to reduce the overhead. |
Yes. I think that makes sense. I'm actually not quite sure how to test this. Not sure if I can remove ALL the classes for current week from the Sandbox MBO site ( |
Is |
Yep. we won't have classes until next week so we get an empty result when calling the current week. This is what lead me to change the "error" message in inc/frontend/views/horizontal_schedule.php |
Actually it may by |
So would we have to keep making sequential API requests until we got a non zero result for ResultCount? Or is there an API call to get the "next available class" and then use that date to determine the date range of the corresponding week? |
Good question. Doesn't look like it https://developers.mindbodyonline.com/PublicDocumentation/ClassService?version=v5.1 |
So I guess we'd need to do a larger range like 60 days on the second API call and then, if there was a class, a third API call to show the correct week. Kinda sounds like a lot of work for a really small use case. |
The code I just pushed out might achieve (this first part of) this. Would you mind seeing what happens if you use it without current classes? |
(on the |
Will do. |
This should be the case with events as well, but there's an easy workaround for that which is just a longer Option period for Events display cycle.
Or could display empty calendar starting on current week.
This would require either a second call to the API or the initial call would need to have an arbitrary end date. A second call to the API seems to make sense, then display first week of classes within the
The text was updated successfully, but these errors were encountered: