def METHOD_NAME(self, app_token, resource, display_id, query, fatal=True):
    response = (self._download_json(
        'http://player.piksel.com/ws/ws_%s/api/%s/mode/json/apiv/5' % (resource, app_token),
        display_id, query=query, fatal=fatal) or {}).get('response')
    failure = try_get(response, lambda x: x['failure']['reason'])
    if failure:
        if fatal:
            raise ExtractorError(failure, expected=True)
        self.report_warning(failure)
    return response