asobi_leaderboard_server (asobi v0.35.4)

View Source

Summary

Functions

around(BoardId, PlayerId, N)

-spec around(binary(), binary(), pos_integer()) -> [{binary(), number(), pos_integer()}].

handle_call(Request, From, State)

-spec handle_call(term(), gen_server:from(), map()) -> {reply, term(), map()}.

handle_cast(Msg, State)

-spec handle_cast(term(), map()) -> {noreply, map()}.

handle_info(Info, State)

-spec handle_info(term(), map()) -> {noreply, map()}.

init(BoardId)

-spec init(binary()) -> {ok, map()}.

rank(BoardId, PlayerId)

-spec rank(binary(), binary()) -> {ok, pos_integer()} | {error, not_found}.

start_link(BoardId)

-spec start_link(binary()) -> gen_server:start_ret().

submit(BoardId, PlayerId, Score)

-spec submit(binary(), binary(), integer()) -> ok | {error, capacity_reached}.

terminate(Reason, _)

-spec terminate(term(), map()) -> ok.

top(BoardId, N)

-spec top(binary(), pos_integer()) -> [{binary(), number(), pos_integer()}].