diff --git a/GetSchedulePackager.py b/GetSchedulePackager.py new file mode 100644 index 0000000..4bfab74 --- /dev/null +++ b/GetSchedulePackager.py @@ -0,0 +1,11 @@ +import yaml +import json + +with open("./MockDB/schedule.yaml", "r") as scheduleyml: + ymlschedule = yaml.safe_load(scheduleyml) + +def getSchedulePackager(): + res = {"isBase64ENcoded": "false", + "statusCode": 200, + "body": ymlschedule} + return res diff --git a/MockDB/schedule.yaml b/MockDB/schedule.yaml new file mode 100644 index 0000000..2a85139 --- /dev/null +++ b/MockDB/schedule.yaml @@ -0,0 +1,11 @@ +Date: + Sept 16: + Meeting Duration: 30 min + Meeting Start Times: + - 10:00 am + - 10:30 am + - 11:00 am + - 11:30 am + - 1:00 pm + - 1:30 pm + - 2:00 pm diff --git a/__pycache__/GetSchedulePackager.cpython-313.pyc b/__pycache__/GetSchedulePackager.cpython-313.pyc new file mode 100644 index 0000000..a9614be Binary files /dev/null and b/__pycache__/GetSchedulePackager.cpython-313.pyc differ diff --git a/__pycache__/postSelectAppointment.cpython-313.pyc b/__pycache__/postSelectAppointment.cpython-313.pyc new file mode 100644 index 0000000..987acf7 Binary files /dev/null and b/__pycache__/postSelectAppointment.cpython-313.pyc differ diff --git a/main.py b/main.py index 2ca3eb8..ec0918e 100644 --- a/main.py +++ b/main.py @@ -1,2 +1,8 @@ +from GetSchedulePackager import getSchedulePackager +from postSelectAppointment import SelectAppointment +import json + if __name__ == "__main__": - print("hello") \ No newline at end of file + print("hello") + print(json.dumps(getSchedulePackager(), indent=4)) + print(json.dumps(SelectAppointment("10:00 am"), indent=4)) \ No newline at end of file diff --git a/postSelectAppointment.py b/postSelectAppointment.py new file mode 100644 index 0000000..be28849 --- /dev/null +++ b/postSelectAppointment.py @@ -0,0 +1,17 @@ + + +def SelectAppointment (appointmentTime): + status = mockWriteFunction(appointmentTime) + res = {"isBase64ENcoded": "false", + "statusCode": 200, + "body": ""} + if status: + res["body"] = {"Success": True} + else: + res["body"] = {"Success": False} + return res + + + +def mockWriteFunction(appTime): + return 0 \ No newline at end of file