LeaderboardView class

Constructors

LeaderboardView({bool? available, String? end, String? metric, String? period, List<LeaderboardRow> rows = const [], String? scope, SelfRank? self, String? source_, String? start, String? subject, int? total})
Returns a new LeaderboardView instance.

Properties

available ↔ bool?
Available is false when the usage warehouse is not connected or its rollup is not ready. Rows is then empty because nothing could be read — not because nobody used anything. Show that difference; never render an unavailable board as a real one.
getter/setter pair
end ↔ String?
End is the EXCLUSIVE upper bound of the window, "2006-01-02" — the day after the last one counted. A board through today reports tomorrow's date here.
getter/setter pair
hashCode → int
The hash code for this object.
no setteroverride
metric ↔ String?
Metric echoes the value ranked: tokens|requests|cost.
getter/setter pair
period ↔ String?
Period is the window's canonical label: day|week|month|all. The server resolves aliases (7d, 30d, today, …) to these, so this may differ from what was sent.
getter/setter pair
rows ↔ List<LeaderboardRow>
Rows are the ranked subjects, best first, at most the requested limit of them. Always a list, never null: an empty one means nothing was read, not an error.
getter/setter pair
runtimeType → Type
A representation of the runtime type of the object.
no setterinherited
scope ↔ String?
Scope echoes the board that was served: personal|org|global.
getter/setter pair
self ↔ SelfRank?
Self is the caller's own standing, reported even when they fall outside Rows. Absent when the caller's ledger identity cannot be resolved, or when the query behind it failed — never faked to keep the shape tidy.
getter/setter pair
source_ ↔ String?
Source names the table these numbers were aggregated from (the derived daily rollup, hanzo.usage_rollup_daily), so an operator can tell exactly what was read.
getter/setter pair
start ↔ String?
Start is the first day counted, "2006-01-02" inclusive. Empty for period=all, which has no lower bound at all.
getter/setter pair
subject ↔ String?
Subject is what the rows stand for — "user" on a personal or org board, "org" on the global one. It tells a client whether Handle names a person or a company.
getter/setter pair
total ↔ int?
Total is how many subjects were ranked in the window — the org's active users, or the active/opted-in orgs on the global board. It is the universe the ranks are out of, so it is normally larger than len(rows).
getter/setter pair

Methods

noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toJson() → Map<String, dynamic>
toString() → String
A string representation of this object.
override

Operators

operator ==(Object other) → bool
The equality operator.
override

Static Methods

fromJson(dynamic value) → LeaderboardView?
Returns a new LeaderboardView instance and imports its values from value if it's a Map, null otherwise.
listFromJson(dynamic json, {bool growable = false}) → List<LeaderboardView>
mapFromJson(dynamic json) → Map<String, LeaderboardView>
mapListFromJson(dynamic json, {bool growable = false}) → Map<String, List<LeaderboardView>>

Constants

requiredKeys → const Set<String>
The list of required keys that must be present in a JSON.