返回 Skill 列表
extension
分类: 数据与分析需要 API Key

IDFM Journey (PRIM/Navitia)

使用IDFM PRIM API密钥查询Île-de-France Mobilités (IDFM) PRIM/Navitia,以实现地点解析、行程规划及交通中断查询。适用于在法兰西岛查询路线(如“从X到Y的路线”)、解析车站/站点ID或查询RER/地铁线路中断情况。

person作者: anthonymqhubclawhub

IDFM Journey (PRIM/Navitia)

Use the bundled script to call PRIM/Navitia endpoints without extra dependencies.

Prereqs

  • Set IDFM_PRIM_API_KEY in the environment before running.

Quick commands

Run from anywhere (path is inside the skill folder):

  • Resolve places (best match + list):

    • python3 scripts/idfm.py places "Ivry-sur-Seine" --count 5
  • Journeys (free-text from/to; resolves place ids first):

    • python3 scripts/idfm.py journeys --from "Ivry-sur-Seine" --to "Boulainvilliers" --count 3
  • Incidents / disruptions (by line id or filter):

    • python3 scripts/idfm.py incidents --line-id line:IDFM:C01727
    • python3 scripts/idfm.py incidents --filter 'disruption.status=active'

Add --json to print raw API output.

Notes

  • If place resolution is ambiguous, increase --count and choose the right stop_area id.
  • For API details and examples, read: references/idfm-prim.md.