Current section
Files
Jump to
Current section
Files
src/bloodbath_event.erl
%% @doc ...
-module(bloodbath_event).
-export([schedule/1, list/0, find/1, cancel/1]).
-spec schedule(list()) -> tuple().
schedule(Args) ->
bloodbath_rest_adapter:perform(post, "/events", Args, bloodbath:get_config()).
-spec list() -> tuple().
list() ->
bloodbath_rest_adapter:perform(get, "/events", undefined, bloodbath:get_config()).
-spec find(string()) -> tuple().
find(Id) ->
bloodbath_rest_adapter:perform(get, "/events/" ++ Id, undefined, bloodbath:get_config()).
-spec cancel(string()) -> tuple().
cancel(Id) ->
bloodbath_rest_adapter:perform(delete, "/events/" ++ Id, undefined, bloodbath:get_config()).