Skip to content

Instantly share code, notes, and snippets.

@jordanhudgens
Created May 13, 2015 01:33
Show Gist options
  • Save jordanhudgens/d3ca1dd1ab23f63571f9 to your computer and use it in GitHub Desktop.
Save jordanhudgens/d3ca1dd1ab23f63571f9 to your computer and use it in GitHub Desktop.
def self.fetch_studio_schedule(*opts)
options = opts.extract_options!
start_date = options[:start_date] || Date.today
end_date = options[:end_date] || Date.today + 2.weeks
message = {
StartDateTime: start_date,
EndDateTime: end_date,
HideCanceledClasses: false
}
message['100000004'] = options[:user_id] unless options[:user_id].nil?
res = MindBody::Services::ClassService.get_classes(message)
classes = res.result[:classes]
return classes
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment