def _get_api(self):
        try:
            api = self.hub.get_api()
        except BadStatusLine:
            self.poly.send_error('Hue Bridge returned bad status line.')
            return False
        except phue.PhueRequestTimeout:
            self.poly.send_error('Timed out trying to connect to Hue Bridge.')
            return False
        except socket.error:
            self.poly.send_error("Can't contact Hue Bridge. " +
                                 "Network communication issue.")
            return False
        return api
get hue hub api data.
dataset/ETHPy150Open UniversalDevicesInc/Polyglot/polyglot/node_servers/hue/hue.py/HueNodeServer._get_api