adding full project without the pi sign edits

This commit is contained in:
Lucas
2022-03-30 23:57:47 -04:00
parent 84c6804833
commit f3d987ecbc
5 changed files with 124 additions and 5 deletions
+17
View File
@@ -0,0 +1,17 @@
from dateutil.parser import parse
class Event(object):
def __init__(self, summary, start_time, end_time):
self.summary = summary
self.start_time = start_time
self.end_time = end_time
def __str__(self):
return f"summary : {self.summary}, end_time : {self.end_time}, start_time : {self.start_time}"
@staticmethod
def get_from_gcal_api_json(json):
print(json['start'].get('dateTime') )
return Event(json['summary'], parse(json['start'].get('dateTime')), parse(json['end'].get('dateTime')))