Skip to content
This repository was archived by the owner on Jun 11, 2025. It is now read-only.

Commit 749354c

Browse files
authored
Update event.py
add attr. of SkypeEndpointEvent(SkypeEvent): - version - typ
1 parent 1a1480a commit 749354c

File tree

1 file changed

+19
-11
lines changed

1 file changed

+19
-11
lines changed

skpy/event.py

Lines changed: 19 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -103,19 +103,27 @@ class SkypeEndpointEvent(SkypeEvent):
103103
Name of the device connected with this endpoint.
104104
capabilities (str list):
105105
Features available on the device.
106+
version (str):
107+
number of skype version
108+
typ (int):
109+
number type of skype app (etc. 2 web, 16 ios,17 andriod)
106110
"""
107111

108-
attrs = SkypeEvent.attrs + ("userId", "name", "capabilities")
109-
110-
@classmethod
111-
def rawToFields(cls, raw={}):
112-
fields = super(SkypeEndpointEvent, cls).rawToFields(raw)
113-
res = raw.get("resource", {})
114-
fields.update({"userId": SkypeUtils.userToId(res.get("selfLink")),
115-
"name": res.get("privateInfo", {}).get("epname"),
116-
"capabilities": list(filter(None, res.get("publicInfo", {})
117-
.get("capabilities", "").split(" | ")))})
118-
return fields
112+
attrs = SkypeEvent.attrs + ("userId", "name", "capabilities", "version","typ")
113+
114+
@classmethod
115+
def rawToFields(cls, raw={}):
116+
fields = super(SkypeEndpointEvent, cls).rawToFields(raw)
117+
res = raw.get("resource", {})
118+
fields.update({"userId": SkypeUtils.userToId(res.get("selfLink")),
119+
"name": res.get("privateInfo", {}).get("epname"),
120+
"capabilities": list(filter(None, res.get("publicInfo", {})
121+
.get("capabilities", "").split(" | "))),
122+
"version": res.get("publicInfo", {})
123+
.get("skypeNameVersion",{}),
124+
"typ": res.get("publicInfo", {})
125+
.get("typ",{})})
126+
return fields
119127

120128

121129
@SkypeUtils.initAttrs

0 commit comments

Comments
 (0)