diff options
author | Filipp Lepalaan <filipp@mac.com> | 2015-07-31 09:11:19 +0300 |
---|---|---|
committer | Filipp Lepalaan <filipp@mac.com> | 2015-07-31 09:11:19 +0300 |
commit | ce7895d372b2f8bc15ec3450ff1e2ed99e79016d (patch) | |
tree | 51676adbc10be63b0ed71dbb6063612200543774 | |
parent | 38fc774af945ddeb08f609b8a72594a80699b2b2 (diff) | |
download | py-gsxws-ce7895d372b2f8bc15ec3450ff1e2ed99e79016d.tar.gz py-gsxws-ce7895d372b2f8bc15ec3450ff1e2ed99e79016d.tar.bz2 py-gsxws-ce7895d372b2f8bc15ec3450ff1e2ed99e79016d.zip |
Added new diagnostic APIs
-rw-r--r-- | gsxws/diagnostics.py | 34 |
1 files changed, 24 insertions, 10 deletions
diff --git a/gsxws/diagnostics.py b/gsxws/diagnostics.py index eadb874..9e0d056 100644 --- a/gsxws/diagnostics.py +++ b/gsxws/diagnostics.py @@ -20,20 +20,23 @@ class Diagnostics(GsxObject): def fetch(self): """ - The Fetch Repair Diagnostics API allows the service providers/depot/carriers - to fetch MRI/CPU diagnostic details from the Apple Diagnostic Repository OR - diagnostic test details of iOS Devices. - The ticket is generated within GSX system. + The Fetch Diagnostic Details API allows users to fetch diagnostic test details + of all Devices.This API will retrieve diagnostic tests performed on the device + as well as profile and report data for the tests. >>> Diagnostics(diagnosticEventNumber='12942008007242012052919').fetch() """ - if hasattr(self, "alternateDeviceId"): - self._submit("lookupRequestData", "FetchIOSDiagnostic", - "lookupResponseData") - else: - self._submit("lookupRequestData", "FetchRepairDiagnostic", - "FetchRepairDiagnosticResponse") + self._submit("diagnosticDetailsRequestData", "FetchDiagnosticDetails", + "diagnosticDetailsResponseData") + return self._req.objects + def fetch_suites(self): + """ + The Fetch Diagnostic Suite API allows user to fetch associated Diagnostic Suite IDs + for a given serial number from Apple Diagnostic Repository irrespective of Service Account. + """ + self._submit("diagnosticSuitesRequestData", "FetchDiagnosticSuites", + "diagnosticSuitesResponseData") return self._req.objects def events(self): @@ -45,3 +48,14 @@ class Diagnostics(GsxObject): self._submit("lookupRequestData", "FetchDiagnosticEventNumbers", "diagnosticEventNumbers") return self._req.objects + + def run(self): + """ + The Run Diagnostic Test API allows users to run a specific or + all the diagnostic tests on a device. User has to first invoke Fetch Diagnostic Suite API + to fetch associated suite ID's for given serial number. + """ + self._submit("diagnosticTestRequestData", "RunDiagnosticTest", + "diagnosticTestResponseData") + return self._req.objects +
\ No newline at end of file |