privacy: remove personal test coordinate from committed docs/tests

The Sandpoint lat/lng from .creds.json had been baked into the API-doc example and
the integration test. Doc now uses a rounded ~downtown point; the test reads the
coordinate from the gitignored .creds.json (rounded, non-personal fallback).

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
This commit is contained in:
Hank 2026-07-13 19:35:33 -07:00
parent 0a6ca53c04
commit f10dbbc45c
2 changed files with 5 additions and 3 deletions

View file

@ -79,7 +79,7 @@ lookups 401 when signed out, despite being "data" reads.
```ts
// By location (only a single coordinate is ever sent — the point you're searching):
const res = await ps.getMetersByLocation({ latitude: 48.2754, longitude: -116.5478 });
const res = await ps.getMetersByLocation({ latitude: 48.28, longitude: -116.55 }); // ~downtown Sandpoint
const zones = res.Zones ?? [];
// Pick a zone + space to act on:

View file

@ -13,9 +13,11 @@ import { readFileSync, existsSync } from 'node:fs';
import { ParkSmarterClient, isFreeEstimate } from '../dist/index.js';
const ENV = process.env.PS_TEST_ENV || 'test';
const SANDPOINT = { latitude: 48.27538, longitude: -116.54779 };
const credsUrl = new URL('../.creds.json', import.meta.url);
const creds = existsSync(credsUrl) ? JSON.parse(readFileSync(credsUrl, 'utf8')) : {};
// Search point: your own coordinate from the gitignored .creds.json when present,
// else a rounded, non-personal downtown-Sandpoint point (~1 km precision — not a home).
const SANDPOINT = { latitude: Number(creds.lat) || 48.28, longitude: Number(creds.lng) || -116.55 };
// Probe reachability once; if the instance blocks us, skip the whole suite.
let reason = false;
@ -38,7 +40,7 @@ test(`[${ENV}] ApplicationValidity bootstraps a session`, { skip: reason }, asyn
assert.ok(av.SessionId || av.Config, 'expected a bootstrap payload');
});
test(`[${ENV}] Sandpoint (DSB) zones are returned near 48.27,-116.55`, { skip: reason }, async () => {
test(`[${ENV}] Sandpoint (DSB) zones are returned near downtown`, { skip: reason }, async () => {
const ps = await client();
const m = await ps.getMetersByLocation(SANDPOINT);
assert.ok(Array.isArray(m.Zones) && m.Zones.length > 0, 'expected zones near Sandpoint');