Skip to content

Commit 1dbfebb

Browse files
author
Jennie Lees
committed
New Event/Calendar attributes; some optional
1 parent b3d875c commit 1dbfebb

File tree

1 file changed

+5
-7
lines changed

1 file changed

+5
-7
lines changed

inbox/client/restful_models.py

Lines changed: 5 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -20,11 +20,7 @@ def __init__(self, cls, api, namespace):
2020

2121
__setattr__ = dict.__setitem__
2222
__delattr__ = dict.__delitem__
23-
24-
def __getattr__(self, what):
25-
if what not in self:
26-
raise AttributeError("no such attribute: '{}'".format(what))
27-
return self[what]
23+
__getattr__ = dict.get
2824

2925
@classmethod
3026
def create(cls, api, namespace_, **kwargs):
@@ -247,7 +243,7 @@ def __init__(self, api, namespace):
247243

248244

249245
class Calendar(InboxAPIObject):
250-
attrs = ["id", "namespace_id", "name", "description", "event_ids"]
246+
attrs = ["id", "namespace_id", "name", "description"]
251247
collection_name = 'calendars'
252248

253249
def __init__(self, api, namespace):
@@ -260,7 +256,9 @@ def events(self):
260256

261257
class Event(InboxAPIObject):
262258
attrs = ["id", "namespace_id", "title", "description", "location",
263-
"read_only", "when", "participants", "calendar_id"]
259+
"read_only", "when", "busy", "participants", "calendar_id",
260+
"recurrence", "cancelled", "master_event_id",
261+
"original_start_time"]
264262
collection_name = 'events'
265263

266264
def __init__(self, api, namespace):

0 commit comments

Comments
 (0)