def METHOD_NAME(self, app_token, resource, display_id, query, host='https://player.piksel.com', fatal=True):
    url = urljoin(host, f'/ws/ws_{resource}/api/{app_token}/mode/json/apiv/5')
    response = traverse_obj(
        self._download_json(url, display_id, query=query, fatal=fatal), ('response', {dict})) or {}
    failure = traverse_obj(response, ('failure', 'reason')) if response else 'Empty response from API'
    if failure:
        if fatal:
            raise ExtractorError(failure, expected=True)
        self.report_warning(failure)
    return response