Retrieve the data.
353789
async def get_data(self):
        """"""
        url = '{}/{}'.format(self.url, 'all')

        try:
            with async_timeout.timeout(5, loop=self._loop):
                if self.password is None:
                    response = await self._session.get(url)
                else:
                    auth = aiohttp.BasicAuth(self.username, self.password)
                    response = await self._session.get(url, auth=auth)

            _LOGGER.debug("Response from Glances API: %s", response.status)
            print(response.status)
            print(response.text)
            self.data = await response.json()
            _LOGGER.debug(self.data)
        except (asyncio.TimeoutError, aiohttp.ClientError):
            _LOGGER.error("Can not load data from Glances API")
            raise exceptions.GlancesApiConnectionError()
384785
def get_data(self, **kwargs):
        '''
        
        '''
        if self.queue:
            new = self.apply_queued()
            return new.get_data()
        else:
            return self._get_attr_from_file('data', **kwargs)
655262
protected function getData()
    {
        if (empty($this->data) || !is_array($this->data)) {
            $this->init();
        }

        return $this->data;
    }
751587
async def fetching_data(self, *_):
        """"""

        try:
            with async_timeout.timeout(10):
                resp = await self._websession.get(self._api_url, params=self._urlparams)
            if resp.status != 200:
                _LOGGER.error('%s returned %s', self._api_url, resp.status)
                return False
            text = await resp.text()
        except (asyncio.TimeoutError, aiohttp.ClientError) as err:
            _LOGGER.error('%s returned %s', self._api_url, err)
            return False
        try:
            self.data = xmltodict.parse(text)['weatherdata']
        except (ExpatError, IndexError) as err:
            _LOGGER.error('%s returned %s', resp.url, err)
            return False
        return True
486611
def get_data(self):
        """"""
        url = self.build_url()
        self.incidents_data = requests.get(url)
        if not self.incidents_data.status_code == 200:
            raise self.incidents_data.raise_for_status()
1180684
def data(self):
        """"""
        if isinstance(self.button, types.KeyboardButtonCallback):
            return self.button.data
305904
def fetch(self):
        """"""
        self.content = self.client.get_content(
            uri=self.uri
        )
        self.hash = hashlib.sha256(
            self.content
        ).hexdigest()
1315039
def __retrieve_data(self):
        """"""

        if self.__eof is True:
            return b''

        logging.debug("Reading another block.")        
        block = self.read(self.__block_size)
        if block == b'':
            self.__log.debug("We've encountered the EOF.")
            self.__eof = True

        return block
293617
def data(self):
        """"""
        if self.kind == 'data':
            return self._data.data
        else:
            with self.open() as f:
                return f.read()
176216
async def get(self):
        """"""

        context_data = self.get_context_data()
        context_data.update(getattr(self.request.app, "stats", {}))

        response = self.json_response(context_data)
        return response
988721
def data(self):
        
        if self.is_obsolete():
            self.update_cache(self.get_data())
        return self.cache_data
905294
def _data(self):
        """"""
        current_position = self.file.tell()
        self.file.seek(self.position)
        data = self.file.read(self.length)
        self.file.seek(current_position)
        if self.length % 2:
            data += '\x00' # Padding byte
        return data
457153
def _get_data(self, read_size):
        """"""
        if NIX:
            return super(Keyboard, self)._get_data(read_size)
        return self._pipe.recv_bytes()
920871
def get_dataset(self, key, info):
        """"""
        logger.debug("Reading %s.", key)
        return self.file_content[key.name]
154346
def getdata(self, tree, location, force_string=False):
        """"""
        found = tree.xpath('%s/text()' % location)
        if not found:
            return None
        else:
            data = found[0]
        if force_string:
            return data
        if data == 'True':
            return True
        elif data == 'False':
            return False
        else:
            try:
                return int(data)
            except ValueError:
                try:
                    return float(data)
                except ValueError:
                    # It's a string
                    return data
1010857
def get(url):
    """"""
    response = urllib.request.urlopen(url)
    data = response.read()
    data = data.decode("utf-8")
    data = json.loads(data)
    return data
731308
def retrieve():
    """"""
    a = TpPd(pd=0x3)
    b = MessageType(mesType=0x1c)  # 00011100
    packet = a / b
    return packet