File tree Expand file tree Collapse file tree 1 file changed +32
-5
lines changed Expand file tree Collapse file tree 1 file changed +32
-5
lines changed Original file line number Diff line number Diff line change 4
4
from ciscosparkapi .exceptions import ciscosparkapiException
5
5
from ciscosparkapi .helperfunc import utf8
6
6
from ciscosparkapi .restsession import RestSession
7
+ from ciscosparkapi .sparkdata import SparkData
7
8
8
9
9
- class Room (object ):
10
- """Spark Room object wrapper class."""
10
+ class Room (SparkData ):
11
+ """Spark Room- object wrapper class."""
11
12
12
13
def __init__ (self , json ):
13
- assert isinstance (json , dict )
14
- super (Room , self ).__init__ ()
15
- self .json = json
14
+ super (Room , self ).__init__ (json )
15
+
16
+ @property
17
+ def id (self ):
18
+ return self ._json [u'id' ]
19
+
20
+ @property
21
+ def title (self ):
22
+ return self ._json [u'title' ]
23
+
24
+ @property
25
+ def type (self ):
26
+ return self ._json [u'type' ]
27
+
28
+ @property
29
+ def isLocked (self ):
30
+ return self ._json [u'isLocked' ]
31
+
32
+ @property
33
+ def lastActivity (self ):
34
+ return self ._json [u'lastActivity' ]
35
+
36
+ @property
37
+ def created (self ):
38
+ return self ._json [u'created' ]
39
+
40
+ @property
41
+ def teamId (self ):
42
+ return self ._json .get (u'teamId' , None )
16
43
17
44
18
45
class RoomsAPI (object ):
You can’t perform that action at this time.
0 commit comments