'Makes a call against the api.
:param entrypoint: API method to call.
:param params: parameters to include in the request data.
:param schema: schema to use to validate the data'

def _api_call(self, entrypoint, params, schema=None):

    url = API_URL.format(entrypoint)
    params = dict(params)
    params.update({'version': API_VERSION, 'locale': self.locale.replace('_', '')})
    if self.session_id:
        params['session_id'] = self.session_id
    headers = dict(API_HEADERS)
    headers['User-Agent'] = API_USER_AGENT.format(self.locale)
    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
