Git Product home page Git Product logo

Comments (1)

HerrLevin avatar HerrLevin commented on May 24, 2024

Okay, so this is definitely happening.

Current example is the S8 from Wiesbaden Hbf towards Offenbach. They're ending in Mainz-Bischofsheim.

The last available station also has a cancelled tag. We could distinguish a cancelled station from an available station by looking at arrival, plannedArrival and the not nulled arrivalPlatform.

      "arrival": "2022-03-03T09:42:00+01:00",
      "plannedArrival": "2022-03-03T09:40:00+01:00",
      "arrivalDelay": 120,
      "arrivalPlatform": "1",
      "plannedArrivalPlatform": "2",
      "departure": null,
      "plannedDeparture": "2022-03-03T09:40:00+01:00",
      "departureDelay": null,
      "departurePlatform": null,
      "plannedDeparturePlatform": null,
      "cancelled": true,

The result of https://v5.db.transport.rest/trips/1|229480|2|80|3032022?lineName=S 8 (in parts):

{
  "origin": {
    "type": "stop",
    "id": "8000250",
    "name": "Wiesbaden Hbf",
    "location": {
      "type": "location",
      "id": "8000250",
      "latitude": 50.070563,
      "longitude": 8.243639
    },
    "products": {
      "...": "..."
    }
  },
  "destination": {
    "type": "stop",
    "id": "8004645",
    "name": "Offenbach(Main)Ost",
    "location": {
      "type": "location",
      "id": "8004645",
      "latitude": 50.102655,
      "longitude": 8.784529
    },
    "products": {
      "...": "..."
    }
  },
  "departure": "2022-03-03T09:18:00+01:00",
  "plannedDeparture": "2022-03-03T09:18:00+01:00",
  "departureDelay": 0,
  "arrival": null,
  "plannedArrival": "2022-03-03T10:32:00+01:00",
  "arrivalDelay": null,
  "reachable": true,
  "line": {
    "type": "line",
    "id": "4-800528-8",
    "fahrtNr": "35825",
    "name": "S 8",
    "public": true,
    "adminCode": "800528",
    "productName": "S",
    "mode": "train",
    "product": "suburban",
    "operator": {
      "type": "operator",
      "id": "db-regio-ag-s-bahn-rhein-main",
      "name": "DB Regio AG S-Bahn Rhein-Main"
    }
  },
  "direction": "Offenbach(Main)Ost",
  "arrivalPlatform": null,
  "plannedArrivalPlatform": null,
  "departurePlatform": "3",
  "plannedDeparturePlatform": "3",
  "stopovers": [
    {
      "stop": {
        "type": "stop",
        "id": "8000250",
        "name": "Wiesbaden Hbf",
        "location": {
          "type": "location",
          "id": "8000250",
          "latitude": 50.070563,
          "longitude": 8.243639
        },
        "products": {
          "nationalExpress": true,
          "national": true,
          "regionalExp": false,
          "regional": true,
          "suburban": true,
          "bus": true,
          "ferry": false,
          "subway": false,
          "tram": false,
          "taxi": false
        }
      },
      "arrival": null,
      "plannedArrival": null,
      "arrivalDelay": null,
      "arrivalPlatform": null,
      "plannedArrivalPlatform": null,
      "departure": "2022-03-03T09:18:00+01:00",
      "plannedDeparture": "2022-03-03T09:18:00+01:00",
      "departureDelay": 0,
      "departurePlatform": "3",
      "plannedDeparturePlatform": "3"
    },
    {
      "stop": {
        "type": "stop",
        "id": "8006404",
        "name": "Wiesbaden Ost",
        "location": {
          "type": "location",
          "id": "8006404",
          "latitude": 50.041438,
          "longitude": 8.256412
        },
        "products": {
          "nationalExpress": false,
          "national": false,
          "regionalExp": false,
          "regional": true,
          "suburban": true,
          "bus": true,
          "ferry": false,
          "subway": false,
          "tram": false,
          "taxi": false
        }
      },
      "arrival": "2022-03-03T09:22:00+01:00",
      "plannedArrival": "2022-03-03T09:22:00+01:00",
      "arrivalDelay": 0,
      "arrivalPlatform": "3",
      "plannedArrivalPlatform": "3",
      "departure": "2022-03-03T09:22:00+01:00",
      "plannedDeparture": "2022-03-03T09:22:00+01:00",
      "departureDelay": 0,
      "departurePlatform": "3",
      "plannedDeparturePlatform": "3"
    },
    {
      "...": "..."
    },
    {
      "stop": {
        "type": "stop",
        "id": "8000241",
        "name": "Mainz-Bischofsheim",
        "location": {
          "type": "location",
          "id": "8000241",
          "latitude": 49.992941,
          "longitude": 8.358062
        },
        "products": {
          "...": "..."
        }
      },
      "arrival": "2022-03-03T09:42:00+01:00",
      "plannedArrival": "2022-03-03T09:40:00+01:00",
      "arrivalDelay": 120,
      "arrivalPlatform": "1",
      "plannedArrivalPlatform": "2",
      "departure": null,
      "plannedDeparture": "2022-03-03T09:40:00+01:00",
      "departureDelay": null,
      "departurePlatform": null,
      "plannedDeparturePlatform": null,
      "cancelled": true,
      "remarks": []
    },
    {
      "stop": {
        "type": "stop",
        "id": "8005221",
        "name": "Rüsselsheim Opelwerk",
        "location": {
          "type": "location",
          "id": "8005221",
          "latitude": 49.987827,
          "longitude": 8.400743
        },
        "products": {
          "...": "..."
        }
      },
      "arrival": null,
      "plannedArrival": "2022-03-03T09:44:00+01:00",
      "arrivalDelay": null,
      "arrivalPlatform": null,
      "plannedArrivalPlatform": null,
      "departure": null,
      "plannedDeparture": "2022-03-03T09:44:00+01:00",
      "departureDelay": null,
      "departurePlatform": null,
      "plannedDeparturePlatform": null,
      "cancelled": true,
      "remarks": []
    }
  ],
  "cancelled": true,
  "id": "1|229480|2|80|3032022",
  "realtimeDataUpdatedAt": 1646295074
}

from traewelling.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.