Esempio n. 1
0
 def get_connector(self, connector_id):
     resp_dict = self._root.get('%s/connector/%d/' %
                                (API_VERSION, connector_id),
                                headers=self.headers)
     if resp_dict['connector']:
         return Connector.from_dict(resp_dict['connector'])
     return None
Esempio n. 2
0
 def get_connectors(self):
     resp_dict = self._root.get('%s/connectors' % API_VERSION,
                                headers=self.headers)
     connectors = [
         Connector.from_dict(connector_dict)
         for connector_dict in resp_dict['connectors']
     ]
     return connectors
Esempio n. 3
0
File: base.py Progetto: 10sr/hue
 def get_connector(self, connector_id):
   resp_dict = self._root.get('%s/connector/%d/' % (API_VERSION, connector_id), headers=self.headers)
   if resp_dict['connector']:
     return Connector.from_dict(resp_dict['connector'])
   return None
Esempio n. 4
0
File: base.py Progetto: 10sr/hue
 def get_connectors(self):
   resp_dict = self._root.get('%s/connectors' % API_VERSION, headers=self.headers)
   connectors = [ Connector.from_dict(connector_dict) for connector_dict in resp_dict['connectors'] ]
   return connectors