Order Zero Phase 1c: return the aggregate-only bodies in full

/sports and /markets/resolution-summary carry no per-prop data and no
credentials, and the shape summary alone cannot answer the question they
exist to answer -- whether PropLine actually GRADES the sports we cannot
settle. A shape is not a number. Both bodies are scrubbed on the way out.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01QJs13VsyiSKYQP6rj3NNmc
This commit is contained in:
Kev
2026-07-31 23:39:38 -04:00
parent 3c466d79cb
commit c3bcfaba94
+22
View File
@@ -379,6 +379,28 @@ async function verify(opts = {}) {
out.endpoints.push(await probe(`${p}/results`, { markets }, `${sport} — settled outcomes + actual values`, httpGet));
}
// AGGREGATE-ONLY bodies, returned in full. These two carry no per-prop data
// and no credentials — and the shape summary alone can't answer the question
// they exist to answer: does PropLine actually GRADE the sports we can't
// settle? A shape is not a number.
out.aggregates = {};
for (const [name, path, params] of [
['sports', '/sports', {}],
['resolution_summary', '/markets/resolution-summary', { days: 30 }],
]) {
try {
const keys = PA.getKeys().filter(Boolean);
const res = await (httpGet || axios.get)(`${BASE}${path}`, {
params: { apiKey: keys[0], ...params }, timeout: TIMEOUT_MS, validateStatus: () => true,
});
out.aggregates[name] = res.status === 200
? JSON.parse(scrubKeys(JSON.stringify(res.data)))
: { error: `HTTP ${res.status}` };
} catch (err) {
out.aggregates[name] = { error: scrubKeys(err && err.message) };
}
}
// The $19/mo question: does the bulk resolved export settle sports we can't?
for (const sportKey of ['baseball_mlb', 'basketball_wnba', 'basketball_nba', 'soccer_epl']) {
out.endpoints.push(await probe('/exports/resolved-props', { sport: sportKey }, `bulk resolved export — ${sportKey}`, httpGet));