k-skill/scripts/fixtures/fine-dust-measurements.json
Jeffrey (Dongkyu) Kim 8c86d54b1f Add local air-quality lookup so k-skill covers location-based dust checks
Issue #17 approved an Air Korea two-API flow with a region fallback, so this change adds a new fine-dust skill, wires it into the repo docs/setup surfaces, and includes a runnable helper plus fixtures/tests for repeatable verification.

Constraint: Must use the approved official Air Korea APIs and secure secret registration flow
Rejected: Use an unofficial air-quality API | issue follow-up explicitly approved the Air Korea two-API flow
Rejected: Require coordinates only | issue discussion required a practical fallback when precise location is unavailable
Confidence: high
Scope-risk: moderate
Directive: Keep the helper and docs aligned with Air Korea endpoint names and fallback order if the official API contract changes
Tested: npm run ci; python3 scripts/fine_dust.py report --station-file scripts/fixtures/fine-dust-stations.json --measurement-file scripts/fixtures/fine-dust-measurements.json --lat 37.5665 --lon 126.9780; python3 scripts/fine_dust.py report --station-file scripts/fixtures/fine-dust-stations.json --measurement-file scripts/fixtures/fine-dust-measurements.json --region-hint '서울 강남구'; python3 scripts/fine_dust.py --help; missing-secret error path without AIR_KOREA_OPEN_API_KEY
Not-tested: Live Air Korea API calls with a real AIR_KOREA_OPEN_API_KEY
2026-03-27 22:06:19 +09:00

35 lines
791 B
JSON

{
"response": {
"body": {
"items": [
{
"stationName": "중구",
"dataTime": "2026-03-27 21:00",
"pm10Value": "42",
"pm10Grade": "2",
"pm25Value": "19",
"pm25Grade": "2",
"khaiGrade": "2"
},
{
"stationName": "종로구",
"dataTime": "2026-03-27 21:00",
"pm10Value": "57",
"pm10Grade": "2",
"pm25Value": "31",
"pm25Grade": "2",
"khaiGrade": "2"
},
{
"stationName": "강남구",
"dataTime": "2026-03-27 21:00",
"pm10Value": "81",
"pm10Grade": "3",
"pm25Value": "44",
"pm25Grade": "3",
"khaiGrade": "3"
}
]
}
}
}