Call API support¶
The ninchat.call package contains helpers for making sessionless HTTP calls to the Ninchat API.
HTTP client implementations¶
Using requests¶
-
ninchat.call.requests.
call
(params, **kwargs)¶ Make a HTTP request to the Ninchat Call API using the third-party requests package.
If check is set, raises a ninchat.call.APIError on “error” reply event.
-
ninchat.call.requests.
check_call
(params, **kwargs)¶ Like call with check set.
Asyncio support using aiohttp¶
-
ninchat.call.aiohttp.
call
(session: aiohttp.client.ClientSession, params: Dict[str, Any], *, identity: Optional[Dict[str, str]] = None, check: bool = False) → Dict[str, Any]¶ An asyncio coroutine which makes a HTTP request to the Ninchat Call API using the third-party aiohttp package.
If check is set, raises a ninchat.call.APIError on “error” reply event.
-
ninchat.call.aiohttp.
check_call
(session: aiohttp.client.ClientSession, params: Dict[str, Any], *, identity: Optional[Dict[str, str]] = None) → Dict[str, Any]¶ Like call with check set.