feat(Packagers): added html body components

This commit is contained in:
darkicewolf50 2024-10-26 16:01:18 -06:00
parent 01c05dfb78
commit ca4d2e5796
6 changed files with 46 additions and 1 deletions

11
GetSchedulePackager.py Normal file
View File

@ -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

11
MockDB/schedule.yaml Normal file
View File

@ -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

Binary file not shown.

Binary file not shown.

View File

@ -1,2 +1,8 @@
from GetSchedulePackager import getSchedulePackager
from postSelectAppointment import SelectAppointment
import json
if __name__ == "__main__": if __name__ == "__main__":
print("hello") print("hello")
print(json.dumps(getSchedulePackager(), indent=4))
print(json.dumps(SelectAppointment("10:00 am"), indent=4))

17
postSelectAppointment.py Normal file
View File

@ -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