File tree 1 file changed +3
-28
lines changed 1 file changed +3
-28
lines changed Original file line number Diff line number Diff line change 1
1
# -*- coding: utf-8 -*-
2
- """Cisco Spark Access-Token data model."""
2
+ """Cisco Spark Webhook-Event data model."""
3
3
4
4
5
5
from __future__ import (
@@ -91,30 +91,5 @@ def actorId(self):
91
91
92
92
@property
93
93
def data (self ):
94
- """The data for the resource that triggered the webhook.
95
-
96
- For example, if you registered a webhook that triggers when messages
97
- are created (i.e. posted into a room) then the data property will
98
- contain the JSON representation for a message resource.
99
-
100
- Note: That not all of the details of the resource are included in the
101
- data object. For example, the contents of a message are not included.
102
- You would need to request the details for the message using the message
103
- 'id' (which is in the data object) and the
104
- `CiscoSparkAPI.messages.get()` method.
105
-
106
- """
107
- if self ._data is None and self ._json_data .get ('data' ):
108
- if self .resource == "memberships" :
109
- self ._data = Membership (self ._json_data .get ('data' ))
110
-
111
- elif self .resource == "messages" :
112
- self ._data = Message (self ._json_data .get ('data' ))
113
-
114
- elif self .resource == "rooms" :
115
- self ._data = Room (self ._json_data .get ('data' ))
116
-
117
- else :
118
- self ._data = SparkData (self ._json_data .get ('data' ))
119
-
120
- return self ._data
94
+ """The data for the resource that triggered the webhook."""
95
+ return SparkData (self ._json_data .get ('data' ))
You can’t perform that action at this time.
0 commit comments