'Perform an API request.'

def _do_api_request(self, params):

    request_params = dict({'app_id': self._api_app_id, 'app_key': self._api_app_key}, **params)
    response = requests.get(self._url, params=request_params)
    if (response.status_code != 200):
        _LOGGER.warning('Invalid    response    from    API')
    elif ('error' in response.json()):
        if ('exceeded' in response.json()['error']):
            self._state = 'Useage    limites    exceeded'
        if ('invalid' in response.json()['error']):
            self._state = 'Credentials    invalid'
    else:
        self._data = response.json()
