An OTP application to integrate with the plaid API. Exports a gen_server compatible module, plaid_erl
, which sits on top
of an httpc
client. The internal gen_server uses asynchronous calls against its internal httpc
client to improve
throughput.
$ rebar3 compile
$ rebar3 test
Initialization using plaid environment:
Init = #plaid_init{
client_id=ClientID,
secret=Secret,
env=Env
},
{ok, Pid} = plaid_erl:start_link(Init)
Initialization using base url:
Init = #plaid_init{
client_id=ClientID,
secret=Secret,
url=URL
},
{ok, Pid} = plaid_erl:start_link(Init)
Generic request:
UrlSuffix = <<"/item/get">>,
Values = #{ <<"access_token">> => AccessToken },
{ok, Res} = plaid_erl:request(Pid, UrlSuffix, Values)
Exported function request:
{ok, Res} = plaid_erl:item_get(Pid, AccessToken)
Stop:
plaid_erl:stop(Pid)