def METHOD_NAME(self, endpoint, params=None):
    url = self.root + endpoint
    while True:
        response = self.extractor.request(url, params=params, fatal=None)
        if response.status_code < 400:
            return response.json()
        if response.status_code == 429:
            until = text.parse_datetime(
                response.headers["X-RL-Reset"], "%Y-%m-%d %H:%M:%S %Z")
            # wait an extra minute, just to be safe
            self.extractor.wait(until=until, adjust=60.0)
            continue
        # error
        self.extractor.log.debug(response.content)
        raise exception.StopExtraction(
            "%s %s", response.status_code, response.reason)