aboutsummaryrefslogtreecommitdiffstats
path: root/gsxws
diff options
context:
space:
mode:
authorFilipp Lepalaan <filipp@mac.com>2016-03-21 15:19:34 +0200
committerFilipp Lepalaan <filipp@mac.com>2016-03-21 15:19:34 +0200
commitba5574f5674138c3332f4220951d8e51d560dc1e (patch)
treeb28651b95370a5282e3c675a898d79c4630c9d04 /gsxws
parentcc38b441e308b709d6ee118d8f4d5aa50a7d05ed (diff)
downloadpy-gsxws-ba5574f5674138c3332f4220951d8e51d560dc1e.tar.gz
py-gsxws-ba5574f5674138c3332f4220951d8e51d560dc1e.tar.bz2
py-gsxws-ba5574f5674138c3332f4220951d8e51d560dc1e.zip
Adding comms support
Diffstat (limited to 'gsxws')
-rw-r--r--gsxws/comms.py24
1 files changed, 22 insertions, 2 deletions
diff --git a/gsxws/comms.py b/gsxws/comms.py
index c2896fb..6a9bf4f 100644
--- a/gsxws/comms.py
+++ b/gsxws/comms.py
@@ -4,14 +4,34 @@ from core import GsxObject
class Communication(GsxObject):
- def get_content():
+
+ _namespace = "glob:"
+
+ def get_content(self):
"""
The Fetch Communication Content API allows the service providers/depot/carriers
to fetch the communication content by article ID from the service news channel.
"""
- def get_articles():
+ def get_articles(self):
"""
The Fetch Communication Articles API allows the service partners
to fetch all the active communication message IDs.
"""
+ doc = self._submit("lookupRequestData", "FetchCommunicationArticles",
+ "communicationMessage")
+ print(doc)
+
+
+def fetch():
+ """Shortcut for fetching CompTIA data from GSX"""
+ return Communication(priority="HIGH", readStatus=True).get_articles()
+
+
+if __name__ == '__main__':
+ import sys
+ import doctest
+ from core import connect
+ logging.basicConfig(level=logging.DEBUG)
+ connect(*sys.argv[1:4])
+ doctest.testmod()