tmp/src/things/things.py
def updateEventType(self, eventTypeId, name, schemaId, description=None):
        """
        Updates an event type.
        Parameters: eventTypeId (string), name (string), schemaId (string), description (string, optional).
        Throws APIException on failure.
        """
        req = ApiClient.oneEventTypesUrl % (self.host, "/draft", eventTypeId)
        body = {"name" : name, "schemaId" : schemaId}
        if description:
            body["description"] = description
        resp = requests.put(req, auth=self.credentials, headers={"Content-Type":"application/json"},
                            data=json.dumps(body),  verify=self.verify)
        if resp.status_code == 200:
            self.logger.debug("event type updated")
        else:
            raise ibmiotf.APIException(resp.status_code, "HTTP error updating event type", resp)
        return resp.json()
def updateEventType(self, eventTypeId, name, schemaId, description=None):
        """
        Updates an event type.
        Parameters: eventTypeId (string), name (string), schemaId (string), description (string, optional).
        Throws APIException on failure.
        """
        req = ApiClient.oneEventTypesUrl % (self.host, "/draft", eventTypeId)
        body = {"name" : name, "schemaId" : schemaId}
        if description:
            body["description"] = description
        resp = requests.put(req, auth=self.credentials, headers={"Content-Type":"application/json"},
                            data=json.dumps(body),  verify=self.verify)
        if resp.status_code == 200:
            self.logger.debug("event type updated")
        else:
            raise ibmiotf.APIException(resp.status_code, "HTTP error updating event type", resp)
        return resp.json()
def updateEventType ( self , eventTypeId , name , schemaId , description = None ) : req = ApiClient . oneEventTypesUrl % ( self . host , "/draft" , eventTypeId ) body = { "name" : name , "schemaId" : schemaId } if description : body [ "description" ] = description resp = requests . put ( req , auth = self . credentials , headers = { "Content-Type" : "application/json" } , data = json . dumps ( body ) , verify = self . verify ) if resp . status_code == 200 : self . logger . debug ( "event type updated" ) else : raise ibmiotf . APIException ( resp . status_code , "HTTP error updating event type" , resp ) return resp . json ( )
Updates an event type.
        Parameters: eventTypeId (string), name (string), schemaId (string), description (string, optional).
        Throws APIException on failure.
Updates an event type . Parameters : eventTypeId ( string ) name ( string ) schemaId ( string ) description ( string optional ) . Throws APIException on failure .