Current section
Files
Jump to
Current section
Files
src/plunk.erl
-module(plunk).
-compile([no_auto_import, nowarn_unused_vars, nowarn_unused_function, nowarn_nomatch]).
-export([new/1, decode/2]).
-file("/home/runner/work/plunk.gleam/plunk.gleam/src/plunk.gleam", 10).
-spec new(binary()) -> plunk@instance:instance().
new(Api_key) ->
{instance, Api_key}.
-file("/home/runner/work/plunk.gleam/plunk.gleam/src/plunk.gleam", 14).
-spec decode(
gleam@http@response:response(binary()),
fun(() -> fun((gleam@dynamic:dynamic_()) -> {ok, ITN} |
{error, list(gleam@dynamic:decode_error())}))
) -> {ok, ITN} | {error, plunk@types:plunk_error()}.
decode(Res, Decoder) ->
plunk@internal@bridge:decode(Res, Decoder).