'Simple get-wrapper that allows updating invalid tokens
:param params: the params to be passed to requests
:param token_error: whether or not we previously have had token errors, if True we should fetch a new one
:return: json response'

def get(self, params, token_error=False):

    params[u'token'] = self.get_token(refresh=token_error)
    try:
        response = requests.get(self.base_url, params=params)
        log.debug(u'requesting:    %s', response.url)
        response = response.json()
    except RequestException as e:
        log.error(u'Rarbg    request    failed:    %s', e)
        return
    if (response.get(u'error_code') in [1, 2, 4]):
        log.debug(u'Invalid    token.    Error    %s:    %s', response[u'error_code'], response.get(u'error'))
        if token_error:
            raise PluginError((u'Could    not    retrieve    a    valid    token:    %s' % response.get(u'error')))
        return self.get(params=params, token_error=True)
    return response
