Skip to content
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

Free Timeslots Endpoint #36

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open

Conversation

rajivanisetti
Copy link
Contributor

@rajivanisetti rajivanisetti commented May 20, 2019

Files change

  • routes.py: Created endpoint /free_intervals/id=<id>, that gets a list of free time intervals for a user for the current day. Returns list of Interval objects that contain start and end times along with duration and and id for use in the constrain satisfaction problem.
  • util.py: Created auxiliary functions for extracting free time/calculating intervals.
  • models.py: Created Interval class that models a free time interval, to be JSON serialized.
  • requirements.txt: Added the pytz library, for timezeon/date comparison.

Note

Current interval extraction is only valid for West Coast/Pacific Time at the moment. More robust time comparison measures are in order for other timezones along with user input of timezone/permission to use location services.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant