tmp/src/things/things.py
def getDraftThingType(self, thingTypeId, parameters = None):
        """
        Retrieves all existing draft thing types.
        It accepts accepts an optional query parameters (Dictionary)
        In case of failure it throws APIException
        """
        draftThingTypeUrl = ApiClient.draftThingTypeUrl % (self.host, thingTypeId)
        r = requests.get(draftThingTypeUrl, auth=self.credentials, params = parameters, verify=self.verify)
        status = r.status_code
        if status == 200:
            self.logger.debug("Draft thing type successfully retrieved")
            self.logger.debug(json.dumps(r.json()))
            return r.json()
        elif status == 304:
            raise ibmiotf.APIException(304, "The state of the thing type has not been modified (response to a conditional GET).", None)
        elif status == 401:
            raise ibmiotf.APIException(401, "The authentication token is empty or invalid", None)
        elif status == 403:
            raise ibmiotf.APIException(403, "The authentication method is invalid or the api key used does not exist", None)
        elif status == 404:
            raise ibmiotf.APIException(404, "A draft thing type with the specified id does not exist.", None)
        elif status == 500:
            raise ibmiotf.APIException(500, "Unexpected error", None)
        else:
            raise ibmiotf.APIException(None, "Unexpected error", None)
def getDraftThingType(self, thingTypeId, parameters = None):
        """
        Retrieves all existing draft thing types.
        It accepts accepts an optional query parameters (Dictionary)
        In case of failure it throws APIException
        """
        draftThingTypeUrl = ApiClient.draftThingTypeUrl % (self.host, thingTypeId)
        r = requests.get(draftThingTypeUrl, auth=self.credentials, params = parameters, verify=self.verify)
        status = r.status_code
        if status == 200:
            self.logger.debug("Draft thing type successfully retrieved")
            self.logger.debug(json.dumps(r.json()))
            return r.json()
        elif status == 304:
            raise ibmiotf.APIException(304, "The state of the thing type has not been modified (response to a conditional GET).", None)
        elif status == 401:
            raise ibmiotf.APIException(401, "The authentication token is empty or invalid", None)
        elif status == 403:
            raise ibmiotf.APIException(403, "The authentication method is invalid or the api key used does not exist", None)
        elif status == 404:
            raise ibmiotf.APIException(404, "A draft thing type with the specified id does not exist.", None)
        elif status == 500:
            raise ibmiotf.APIException(500, "Unexpected error", None)
        else:
            raise ibmiotf.APIException(None, "Unexpected error", None)
Retrieves all existing draft thing types.
        It accepts accepts an optional query parameters (Dictionary)
        In case of failure it throws APIException