cx_leaderboard v0.1.0 CxLeaderboard.Entry View Source

Entry is the tuple-based structure that you send into the leaderboard.

Link to this section Summary

Types

Must uniquely identify a record in the leaderboard

Allows storing any free-form data with each leaderboard record

A term on which the leaderboard should be ranked. Any term can work, but numeric ones make the most sense

t()

Use this format when sending your entries to a leaderboard. See below for breakdowns of each type

Determines which of the scores appears first if scores are equal. The entry_id is always implied as the final tiebreaker, regardless of any other tiebreakers provided

Link to this section Types

Must uniquely identify a record in the leaderboard.

Link to this type key() View Source
key() :: {score(), id()} | {score(), tiebreaker(), id()}
Link to this type payload() View Source
payload() :: term()

Allows storing any free-form data with each leaderboard record.

A term on which the leaderboard should be ranked. Any term can work, but numeric ones make the most sense.

Use this format when sending your entries to a leaderboard. See below for breakdowns of each type.

Link to this type tiebreaker() View Source
tiebreaker() :: term()

Determines which of the scores appears first if scores are equal. The entry_id is always implied as the final tiebreaker, regardless of any other tiebreakers provided.

Link to this section Functions