Add due date functionality for reminders (#105)
This commit is contained in:
parent
69af919ad5
commit
4ec58d7950
1 changed files with 13 additions and 2 deletions
|
@ -67,7 +67,7 @@ class RemindersService(object):
|
|||
})
|
||||
self.lists[collection['title']] = temp
|
||||
|
||||
def post(self, title, description="", collection=None):
|
||||
def post(self, title, description="", collection=None, dueDate=None):
|
||||
pguid = 'tasks'
|
||||
if collection:
|
||||
if collection in self.collections:
|
||||
|
@ -80,6 +80,17 @@ class RemindersService(object):
|
|||
'usertz': get_localzone().zone
|
||||
})
|
||||
|
||||
dueDateList = None
|
||||
if dueDate:
|
||||
dueDateList = [
|
||||
int(str(dueDate.year) + str(dueDate.month) + str(dueDate.day)),
|
||||
dueDate.year,
|
||||
dueDate.month,
|
||||
dueDate.day,
|
||||
dueDate.hour,
|
||||
dueDate.minute
|
||||
]
|
||||
|
||||
req = self.session.post(
|
||||
self._service_root + '/rd/reminders/tasks',
|
||||
data=json.dumps({
|
||||
|
@ -96,7 +107,7 @@ class RemindersService(object):
|
|||
"startDateTz": None,
|
||||
"startDateIsAllDay": False,
|
||||
"completedDate": None,
|
||||
"dueDate": None,
|
||||
"dueDate": dueDateList,
|
||||
"dueDateIsAllDay": False,
|
||||
"lastModifiedDate": None,
|
||||
"createdDate": None,
|
||||
|
|
Loading…
Reference in a new issue