File tree Expand file tree Collapse file tree 1 file changed +3
-28
lines changed Expand file tree Collapse file tree 1 file changed +3
-28
lines changed Original file line number Diff line number Diff line change 11# -*- coding: utf-8 -*-
2- """Cisco Spark Access-Token data model."""
2+ """Cisco Spark Webhook-Event data model."""
33
44
55from __future__ import (
@@ -91,30 +91,5 @@ def actorId(self):
9191
9292 @property
9393 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