tmp/src/things/things.py
def getMappingsOnThingType(self, thingTypeId, draft=False):
        """
        Get all the mappings for a thing type.
        Parameters:
            - thingTypeId (string) - the thing type
            - draft (boolean) - draft or active
        Throws APIException on failure.
        """
        if draft:
            req = ApiClient.allThingTypeMappingsUrl % (self.host, "/draft", thingTypeId)
        else:
            req = ApiClient.allThingTypeMappingsUrl % (self.host, "", thingTypeId)

        resp = requests.get(req, auth=self.credentials, verify=self.verify)
        if resp.status_code == 200:
            self.logger.debug("All thing type mappings retrieved")
        else:
            raise ibmiotf.APIException(resp.status_code, "HTTP error getting all thing type mappings", resp)
        return resp.json()
def getMappingsOnThingType(self, thingTypeId, draft=False):
        """
        Get all the mappings for a thing type.
        Parameters:
            - thingTypeId (string) - the thing type
            - draft (boolean) - draft or active
        Throws APIException on failure.
        """
        if draft:
            req = ApiClient.allThingTypeMappingsUrl % (self.host, "/draft", thingTypeId)
        else:
            req = ApiClient.allThingTypeMappingsUrl % (self.host, "", thingTypeId)

        resp = requests.get(req, auth=self.credentials, verify=self.verify)
        if resp.status_code == 200:
            self.logger.debug("All thing type mappings retrieved")
        else:
            raise ibmiotf.APIException(resp.status_code, "HTTP error getting all thing type mappings", resp)
        return resp.json()
def getMappingsOnThingType ( self , thingTypeId , draft = False ) : if draft : req = ApiClient . allThingTypeMappingsUrl % ( self . host , "/draft" , thingTypeId ) else : req = ApiClient . allThingTypeMappingsUrl % ( self . host , "" , thingTypeId ) resp = requests . get ( req , auth = self . credentials , verify = self . verify ) if resp . status_code == 200 : self . logger . debug ( "All thing type mappings retrieved" ) else : raise ibmiotf . APIException ( resp . status_code , "HTTP error getting all thing type mappings" , resp ) return resp . json ( )
Get all the mappings for a thing type.
        Parameters:
            - thingTypeId (string) - the thing type
            - draft (boolean) - draft or active
        Throws APIException on failure.
Get all the mappings for a thing type . Parameters : - thingTypeId ( string ) - the thing type - draft ( boolean ) - draft or active Throws APIException on failure .