Skip to content

Commit ef0c126

Browse files
committed
Fix Access-Token data model docstring
1 parent 63180cc commit ef0c126

File tree

1 file changed

+3
-28
lines changed

1 file changed

+3
-28
lines changed

ciscosparkapi/models/webhook_event.py

Lines changed: 3 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
# -*- coding: utf-8 -*-
2-
"""Cisco Spark Access-Token data model."""
2+
"""Cisco Spark Webhook-Event data model."""
33

44

55
from __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'))

0 commit comments

Comments
 (0)