def _api_call(self, entrypoint, params, schema=None):
        url = API_URL.format(entrypoint)

        # Default params
        params = dict(params)
        params.update({
            "version": API_VERSION,
            "locale": self.locale.replace('_', ''),
        })

        if self.session_id:
            params["session_id"] = self.session_id

        # Headers
        headers = dict(API_HEADERS)
        headers['User-Agent'] = API_USER_AGENT.format(self.locale)

        # The certificate used by Crunchyroll cannot be verified in some environments.
        res = http.get(url, params=params, headers=headers, verify=False)
        json_res = http.json(res, schema=_api_schema)

        if json_res["error"]:
            err_msg = json_res.get("message", "Unknown error")
            err_code = json_res.get("code", "unknown_error")
            raise CrunchyrollAPIError(err_msg, err_code)

        data = json_res.get("data")
        if schema:
            data = schema.validate(data, name="API response")

        return data
Makes a call against the api.
dataset/ETHPy150Open chrippa/livestreamer/src/livestreamer/plugins/crunchyroll.py/CrunchyrollAPI._api_call