pet.trezy.getCensus
Schema Diff
+4 -0
Compatibility Analysis
Backward Compatible
Backward compatible. 2 non-breaking changes.
Non-Breaking Changes (2)
- AddedVertex AddedVertex { vertex_id: "pet.trezy.getCensus:output.rarestBadgeTitle" }
- AddedEdge AddedEdge { src: "pet.trezy.getCensus:output", tgt: "pet.trezy.getCensus:output.rarestBadgeTitle", kind: "prop", name: Some("rarestBadgeTitle") }
Migration Guidance
Added Elements
AddedVertex { vertex_id: "pet.trezy.getCensus:output.rarestBadgeTitle" }
Additional Notes
- Non-breaking: AddedEdge { src: "pet.trezy.getCensus:output", tgt: "pet.trezy.getCensus:output.rarestBadgeTitle", kind: "prop", name: Some("rarestBadgeTitle") }
1
1
{
2
2
"id": "pet.trezy.getCensus",
3
3
"defs": {
4
4
"main": {
5
5
"type": "query",
6
6
"output": {
7
7
"schema": {
8
8
"type": "object",
9
9
"required": [],
10
10
"properties": {
11
11
"pets": {
12
12
"type": "integer",
13
13
"minimum": 0,
14
14
"description": "Living pets — everything on the roster that has not been retired. Absent when `error` is set."
15
15
},
16
16
"error": {
17
17
"type": "string",
18
18
"description": "Present INSTEAD of the census when there is no census to send. A stable machine code a client branches on — add codes, never rename them. ⚠ THIS EXISTS BECAUSE THE EMPTY ANSWER IS A REAL SENTENCE: '0 pets, 0 keepers' is exactly what a freshly deployed instance looks like, so an unreadable roster reported as zeros would render an outage as 'nobody plays this game' and look identical to the truth.",
19
19
"knownValues": [
20
20
"census-unavailable"
21
21
]
22
22
},
23
23
"keepers": {
24
24
"type": "integer",
25
25
"minimum": 0,
26
26
"description": "How many people own at least one pet. ⚠ DISTINCT OWNERS, NOT ROWS. A player with three pets is one keeper, and a census that counted rows would overstate its playerbase by more the better the game did. There is no other way to count players — an account with no pet leaves no record here at all, so this is 'people playing', not 'people signed up'."
27
27
},
28
28
"message": {
29
29
"type": "string",
30
30
"description": "A sentence to show the player, accompanying `error`."
31
31
},
32
32
"retired": {
33
33
"type": "integer",
34
34
"minimum": 0,
35
35
"description": "Pets that have been retired. Counted separately rather than dropped: they happened, they were paid for, and the number is more interesting beside the living one than folded into it."
36
36
},
37
37
"species": {
38
38
"type": "array",
39
39
"items": {
40
40
"ref": "#speciesCount",
41
41
"type": "ref"
42
42
},
43
43
"description": "Living pets per species, most populous first, ties broken by name. ⚠ THE ORDER IS PART OF THE ANSWER: /stats draws this as a crowd of sprites, so an unstable sort would rearrange the picture on every refresh. Carries ids, never display names or art — the published pet.trezy.species records are the only source of truth for those, and a client joins them itself."
44
44
},
45
45
"coinsSpent": {
46
46
"type": "integer",
47
47
"minimum": 0,
48
48
"description": "Every coin ever spent on a pet, retired ones included. Sums the price recorded on each pet at the moment it was bought, so a later repricing does not rewrite history."
49
49
},
50
50
"firstPetAt": {
51
51
"type": "string",
52
52
"format": "datetime",
53
53
"description": "When the oldest pet still on the roster was created — near enough the game's own birthday to print. Absent when there are no pets."
54
54
},
55
55
"mealsServed": {
56
56
"type": "integer",
57
57
"minimum": 0,
58
58
"description": "Every `feed` interaction ever recorded, by everyone."
59
59
},
60
60
"rarestBadge": {
61
61
"type": "string",
62
62
"description": "The id of the achievement fewest players hold, ties broken by name so it does not change between refreshes. ⚠ ABSENT IS NOT A FAULT, the same rule getDefinitions applies to groups and foods: `trezy_pet_awards` is created by the achievements job, so an instance that has never run one genuinely has no ledger. The census still goes out; a client omits the badge line rather than treating this as an outage."
63
63
},
64
64
"timesPlayed": {
65
65
"type": "integer",
66
66
"minimum": 0,
67
67
"description": "Every `pet` interaction ever recorded. ⚠ THE RECORD TYPE IS `pet` AND THE PLAYER-FACING WORD IS 'played'. The type was named when playing meant pressing a Pet button; the button is a thrown ball now and the stored type was deliberately not migrated. This field is where the two names are reconciled, once."
68
68
},
69
69
"badgesAwarded": {
70
70
"type": "integer",
71
71
"minimum": 0,
72
72
"description": "How many badges have been earned across every player. ⚠ ABSENT IS NOT A FAULT — see `rarestBadge`."
73
73
},
74
74
"rarestBadgeCount": {
75
75
"type": "integer",
76
76
"minimum": 0,
77
77
"description": "How many players hold `rarestBadge`. Absent whenever that is."
78
78
},
79
+
"rarestBadgeTitle": {
80
+
"type": "string",
81
+
"description": "The published name of `rarestBadge` — \"Spent a bit\" rather than `spent-1k`. ⚠ READ ONLY FROM THE PUBLISHER'S RECORDS, because this is text a client prints: the achievement collection is open, so an unfiltered lookup would let any player choose the sentence shown beside \"Rarest badge\". ⚠ ABSENT IS NOT A FAULT: an award outlives its definition and a definition can be published before it is indexed, so a client must fall back to `rarestBadge` rather than treating a missing title as an outage."
82
+
},
79
83
"totalInteractions": {
80
84
"type": "integer",
81
85
"minimum": 0,
82
86
"description": "Every activity record of any type, including any this schema does not name. Deliberately not `mealsServed + timesPlayed`: a new interaction type would silently stop being counted by that sum, and this number is meant to mean 'everything anybody has done'."
83
87
}
84
88
}
85
89
},
86
90
"encoding": "application/json"
87
91
},
88
92
"description": "The whole game in a handful of numbers, for /stats. Distinct from pet.trezy.getStats, which reports on ONE pet — this one never looks at an individual animal. Every figure is a plain aggregate over an indexed table, deliberately: the leaderboard pays three queries per pet to score a page, and a census that did the same would pay it for every pet in the game on every load."
89
93
},
90
94
"speciesCount": {
91
95
"type": "object",
92
96
"required": [
93
97
"id",
94
98
"count"
95
99
],
96
100
"properties": {
97
101
"id": {
98
102
"type": "string",
99
103
"description": "The species id, matching the `id` on a published pet.trezy.species record."
100
104
},
101
105
"count": {
102
106
"type": "integer",
103
107
"minimum": 0
104
108
}
105
109
}
106
110
}
107
111
},
108
112
"$type": "com.atproto.lexicon.schema",
109
113
"lexicon": 1
110
114
}