bunck v0.1.5 Bunck.Client
Interacts with the Bunq API.
Link to this section Summary
Functions
Performs the given request
Requests a session from the Bunq API and adds this to the Client struct, yielding it to the given function
Link to this section Functions
Link to this function
request(payload, client)
Performs the given request.
Returns {:ok, %Bunck.Response{}}
When there is an error, drops out with {:error, reason}
Examples
iex> Bunck.Client.Request(%Bunck.User.List{}, client) {:ok, %Bunck.Response{…}}
Link to this function
with_session(fun)
Requests a session from the Bunq API and adds this to the Client struct, yielding it to the given function.
This is the normal way to make a request.
Returns the result of fun.(client)
Examples
iex> Bunck.Client.with_session(fn(client) -> %Bunck.User.List{} |> Bunck.Client.request(client) end) {:ok, %Bunck.Response{…}}