[−][src]Module sudoku_backend::doc::check
Data extraxion
Getting data out of the system
Configuration
Leaderboard
Both the defaults and maxes are changeable from the defaults presented below via the command line.
[board.default]
count = 10
ordering = 'best_to_worst'
[board.max]
count = 42
ordering = 'best_to_worst'
[person.default]
count = 3
ordering = 'best_to_worst'
[person.max]
count = 10
ordering = 'best_to_worst'
Both default
and max
are a Strict Leaderboard Config.
Leaderboard Config
The Leaderboard Config consists of two keys:
count
–usize
– how many entries to returnordering
–SolutionOrdering
– how to order the returned entries
Leaderboard Configs are said to be Strict if they require all keys to be present. Otherwise they are Loose, and unspecified keys are filled in from the loaded defaults.
Solution Ordering
Any of:
best_to_worst
worst_to_best
Leaderboard Selector
Any of:
solutions
users
Activity
A session is considered active if last activity thereon occurred at most the specified duration before now.
Data extraxion requests do not count towards activity.
Retrieval
Leaderboard
The request query is a Loose Leaderboard Config, with another optional of
key of type Leaderboard Selector.
That config is then clamped to the loaded max.
Depending on the of
key value (or solutions
by default), the response is an array of:
- Solution messages, if
solutions
, or - Sanitised user data, if
users
.
Activity
Request empty, returns a usize
.