Remove DictRequest type

This commit is contained in:
clerie 2022-04-02 21:23:43 +02:00
parent 7076eb1543
commit 49a4ecc07f
2 changed files with 1 additions and 23 deletions

View File

@ -16,10 +16,7 @@ c = mitel_ommclient2.OMMClient2("omm.local", "admin", "admin")
c.ping() c.ping()
# Create custom messages # Create custom messages
r = c.request(mitel_ommclient2.messages.Ping(timeStamp=2342)) r = c.connection.request(mitel_ommclient2.messages.Ping(timeStamp=2342))
# Craft your own request, if it is not implemented yet
r = c.request(mitel_ommclient2.messages.DictRequest("Ping", {"timeStamp": 2342}))
``` ```
Consult class documentation for more in depth examples and options. Consult class documentation for more in depth examples and options.

View File

@ -32,25 +32,6 @@ class Request:
def seq(self, seq): def seq(self, seq):
self.attrs["seq"] = seq self.attrs["seq"] = seq
class DictRequest(Request):
"""
Create a message by dict attributes
:param name: Name of the message
:param attrs: Message attributes
:param childs: Message children
Usage::
>>> req = DictRequest("Ping", {"timeStamp": 2342})
"""
def __init__(self, name, attrs={}, childs={}):
self.name = name
self.attrs = attrs
self.childs = childs
class Response: class Response:
""" """
Response message class Response message class