Queries hub for list of devices, and creates new device objects

def refresh_devices(self):
        '''Queries hub for list of devices, and creates new device objects'''
        try:
            response = self.api.get("/api/v2/devices", {'properties':'all'})
            for device_data in response['DeviceList']:
                self.devices.append(Device(device_data, self))
        except APIError as e:
            print("API error: ")
            for key,value in e.data.iteritems:
                print(str(key) + ": " + str(value))