adding full project without the pi sign edits
This commit is contained in:
@@ -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')))
|
||||
Reference in New Issue
Block a user