Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
23 changes: 11 additions & 12 deletions api_classes.py
Original file line number Diff line number Diff line change
@@ -1,12 +1,11 @@
from lxml import etree
from lxml import objectify
from xml import etree



class MessageCluster():
def __init__(self, xml_tree,block_string):
self.block_string = block_string
for element in xml_tree.iterchildren():
for element in xml_tree:
setattr(self, element.tag, element.text)
def __repr__(self):
return self.xml_tree
Expand All @@ -15,70 +14,70 @@ def __repr__(self):
class TimeCluster():
def __init__(self, xml_tree,block_string):
self.block_string = block_string
for element in xml_tree.iterchildren():
for element in xml_tree:
setattr(self, element.tag, element.text)
def __repr__(self):
return self.block_string

class InstantaneousDemand():
def __init__(self, xml_tree,block_string):
self.block_string = block_string
for element in xml_tree.iterchildren():
for element in xml_tree:
setattr(self, element.tag, element.text)

class NetworkInfo():
def __init__(self, xml_tree,block_string):
self.block_string = block_string
self.xml_tree = xml_tree
for element in xml_tree.iterchildren():
for element in xml_tree:
setattr(self, element.tag, element.text)
def __repr__(self):
return self.block_string

class PriceCluster():
def __init__(self, xml_tree,block_string):
self.block_string = block_string
for element in xml_tree.iterchildren():
for element in xml_tree:
setattr(self, element.tag, element.text)
def __repr__(self):
return self.block_string

class DeviceInfo():
def __init__(self, xml_tree,block_string):
self.block_string = block_string
for element in xml_tree.iterchildren():
for element in xml_tree:
setattr(self, element.tag, element.text)
def __repr__(self):
return self.block_string

class CurrentSummationDelivered():
def __init__(self, xml_tree,block_string):
self.block_string = block_string
for element in xml_tree.iterchildren():
for element in xml_tree:
setattr(self, element.tag, element.text)
def __repr__(self):
return self.block_string

class ScheduleInfo():
def __init__(self, xml_tree,block_string):
self.block_string = block_string
for element in xml_tree.iterchildren():
for element in xml_tree:
setattr(self, element.tag, element.text)
def __repr__(self):
return self.block_string

class BlockPriceDetail():
def __init__(self, xml_tree,block_string):
self.block_string = block_string
for element in xml_tree.iterchildren():
for element in xml_tree:
setattr(self, element.tag, element.text)
def __repr__(self):
return self.block_string

class ConnectionStatus():
def __init__(self, xml_tree,block_string):
self.block_string = block_string
for element in xml_tree.iterchildren():
for element in xml_tree:
setattr(self, element.tag, element.text)
def __repr__(self):
return self.block_string
Expand Down
Loading