rapid_api v1.0.2 RapidApi

Summary

Functions

Creates a synchronous call to the specified package and base, passing all arguments provided

Creates an asynchronous call to the specified package and base, passing all arguments provided. When an answer is returned, sends the payload to the specified receiver pid

Listens for real-time events by opening a websocket to RapidAPI

Functions

async_worker(receiver_pid)
call(pack, base, args \\ %{})
call(String.t, String.t, map) :: map

Creates a synchronous call to the specified package and base, passing all arguments provided.

Returns {:ok, payload} or {:error, reason}.

call_async(pack, base, receiver_pid, args \\ %{})
call_async(String.t, String.t, pid, map) :: atom

Creates an asynchronous call to the specified package and base, passing all arguments provided. When an answer is returned, sends the payload to the specified receiver pid.

Returns :ok

listen(pack, base, receiver_pid, args \\ %{})
listen(String.t, String.t, pid, map) :: atom

Listens for real-time events by opening a websocket to RapidAPI.

Returns {:ok, socket_pid}