tmp/src/things/things.py
def getThing(self, thingTypeId, thingId):
        """
        Gets thing details.
        It accepts thingTypeId (string), thingId (string)
        In case of failure it throws APIException
        """
        thingUrl = ApiClient.thingUrl % (self.host, thingTypeId, thingId)

        r = requests.get(thingUrl, auth=self.credentials, verify=self.verify)
        status = r.status_code

        if status == 200:
            self.logger.debug("Thing instance was successfully retrieved")
            return r.json()
        elif status == 304:
            raise ibmiotf.APIException(304, "The state of the thing 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 thing type with the specified id, or a thing 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 getThing(self, thingTypeId, thingId):
        """
        Gets thing details.
        It accepts thingTypeId (string), thingId (string)
        In case of failure it throws APIException
        """
        thingUrl = ApiClient.thingUrl % (self.host, thingTypeId, thingId)

        r = requests.get(thingUrl, auth=self.credentials, verify=self.verify)
        status = r.status_code

        if status == 200:
            self.logger.debug("Thing instance was successfully retrieved")
            return r.json()
        elif status == 304:
            raise ibmiotf.APIException(304, "The state of the thing 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 thing type with the specified id, or a thing 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 getThing ( self , thingTypeId , thingId ) : thingUrl = ApiClient . thingUrl % ( self . host , thingTypeId , thingId ) r = requests . get ( thingUrl , auth = self . credentials , verify = self . verify ) status = r . status_code if status == 200 : self . logger . debug ( "Thing instance was successfully retrieved" ) return r . json ( ) elif status == 304 : raise ibmiotf . APIException ( 304 , "The state of the thing 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 thing type with the specified id, or a thing 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 )
Gets thing details.
        It accepts thingTypeId (string), thingId (string)
        In case of failure it throws APIException
Gets thing details . It accepts thingTypeId ( string ) thingId ( string ) In case of failure it throws APIException