Skip to content

Files

Latest commit

 

History

History
60 lines (51 loc) · 1.6 KB

disruptions.md

File metadata and controls

60 lines (51 loc) · 1.6 KB

Disruptions

API client for handling 'Disruption' entities in the Navitia API.

official documentation: https://doc.navitia.io/#pt-ref

Property: NavitiaClient.disruptions

Methods:

    list_entity_collection_from_region(
        region_id: str,
        start_page: int = 0,
        count: int = 25,
        depth: int = 1,
        odt: str = "all",
        distance: int = 200,
        headsign: Optional[str] = None
    ) -> Tuple[Sequence[Disruption], Pagination]:
        List disruptions for a given region.

    get_entity_by_id(
        region_id: str,
        object_id: str,
        start_page: int = 0,
        count: int = 25,
        depth: int = 1,
        odt: str = "all",
        distance: int = 200,
        headsign: Optional[str] = None
    ) -> Tuple[Sequence[Disruption], Pagination]:
        Get a disruption by its ID in a given region.

    list_entity_collection_from_coordinates(
        lon: float,
        lat: float,
        start_page: int = 0,
        count: int = 25,
        depth: int = 1,
        odt: str = "all",
        distance: int = 200,
        headsign: Optional[str] = None
    ) -> Tuple[Sequence[Disruption], Pagination]:
        List disruptions for given geographic coordinates.

    get_entity_by_id_and_coordinates(
        lon: float,
        lat: float,
        object_id: str,
        start_page: int = 0,
        count: int = 25,
        depth: int = 1,
        odt: str = "all",
        distance: int = 200,
        headsign: Optional[str] = None
    ) -> Tuple[Sequence[Disruption], Pagination]:
        Get a disruption by its ID for given geographic coordinates.