From ca4d2e5796be7a069d7fec5918ea7d88648c5116 Mon Sep 17 00:00:00 2001 From: darkicewolf50 Date: Sat, 26 Oct 2024 16:01:18 -0600 Subject: [PATCH] feat(Packagers): added html body components --- GetSchedulePackager.py | 11 +++++++++++ MockDB/schedule.yaml | 11 +++++++++++ .../GetSchedulePackager.cpython-313.pyc | Bin 0 -> 622 bytes .../postSelectAppointment.cpython-313.pyc | Bin 0 -> 637 bytes main.py | 8 +++++++- postSelectAppointment.py | 17 +++++++++++++++++ 6 files changed, 46 insertions(+), 1 deletion(-) create mode 100644 GetSchedulePackager.py create mode 100644 MockDB/schedule.yaml create mode 100644 __pycache__/GetSchedulePackager.cpython-313.pyc create mode 100644 __pycache__/postSelectAppointment.cpython-313.pyc create mode 100644 postSelectAppointment.py 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 0000000000000000000000000000000000000000..a9614beff517a7b68149e6a9191956baead51a85 GIT binary patch literal 622 zcmZWnPiqrF6o0d`yJ?fgKw1l?)NF%77VH+GEhzqhq#`yL#Kn^fvhGe|+Rbj6Nh|S` zgP))vUVGG|S3iMAL4`1S5l_8U_E7NTnkYw17`J;l$Hw;A$@2(x!eIaO%P1x$O8qUIUMAVRS{@aETh(DGOY^ z0^ID9HMj=#sS||g-O((lf`y}9zD=vpA+~X}&c?$e*xzYvh~Nba4kU3o962b_^m#>a1t3Q^izYVRhHfo-kuuvN9 zrf38^C-q4m^gWTpQcn(8EDKqVn68``euq7a5QR|$7X{V-6O6NJ0z8UpD PLVbth#q0D#{%-CsJF1c$ literal 0 HcmV?d00001 diff --git a/__pycache__/postSelectAppointment.cpython-313.pyc b/__pycache__/postSelectAppointment.cpython-313.pyc new file mode 100644 index 0000000000000000000000000000000000000000..987acf7499734f583c9d322c31fb17b48cf1fdb7 GIT binary patch literal 637 zcmZWnF>ljA6noMmTO=ji?NT$G_k{-Q`8BM z&cC2YgKO$~s9K&9_wPRI`Eeiuy`mB?nW{D> zy6`#~7K z4m5jJL`Wg4u1ZRKu92U8DY{BZqVqysel(7Q=}0`5*O4PfMSadq#@J7*!s?4AV|HHf E8&D&W#{d8T literal 0 HcmV?d00001 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