stadtnavi / digitransit-ui

Digitransit UI Clone, especially for the city of Herrenberg ("stadtnavi.de")
https://stadtnavi.de/
Other
13 stars 14 forks source link

Cargo bike booking #351

Closed leonardehrenfried closed 3 years ago

leonardehrenfried commented 3 years ago

Herrenberg will establish a cargo bike rental station.

It is modelled like the rest of the sharing options.

Visit https://dev.stadtnavi.eu/fahrradstationen/cargo-bike-station to see it.

Acceptance criteria

the-infinity commented 3 years ago

This will be based on the openbikebox backend: https://backend.openbikebox.de/documentation . The basic API ist complete, there will be a few extensions:

{
  "data": {
    "address": "Fahrradstra\u00dfe 1",
    "booking_url": "https://openbikebox.de/location/fahrrad-station-fahrradstadt-1",
    "country": "de",
    "created": "2020-12-14T11:53:27Z",
    "id": 1,
    "lat": 51.517477,
    "locality": "Fahrradstadt",
    "lon": 7.460547,
    "modified": "2020-12-14T11:53:27Z",
    "name": "Fahrrad-Station Fahrradstadt 1",
    "operator": {
      "address": "Fahrradstra\u00dfe 1",
      "country": "de",
      "created": "2020-12-14T11:53:26Z",
      "id": 1,
      "id_url": "https://backend.openbikebox.de/api/operator/1",
      "locality": "Fahrradstadt",
      "logo": {
        "created": "2020-12-14T11:53:26Z",
        "id": 1,
        "id_url": "https://backend.openbikebox.de/api/file/1",
        "mimetype": "image/svg+xml",
        "modified": "2020-12-14T11:53:26Z",
        "url": "https://backend.openbikebox.de/static/files/1.svg"
      },
      "modified": "2020-12-14T11:53:26Z",
      "name": "Open Bike GmbH",
      "postalcode": "12345"
    },
    "operator_id": 1,
    "photo": {
      "created": "2020-12-14T11:53:26Z",
      "id": 2,
      "id_url": "https://backend.openbikebox.de/api/file/2",
      "mimetype": "image/jpeg",
      "modified": "2020-12-14T11:53:26Z",
      "url": "https://backend.openbikebox.de/static/files/2.jpg"
    },
    "photo_id": 2,
    "postalcode": "44137",
    "resource": [
      {
        "created": "2020-12-14T11:53:27Z",
        "id": 1,
        "id_url": "https://backend.openbikebox.de/api/resource/1",
        "identifier": "001",
        "type": enum("cargobike", "bikebox"),
        "installed_at": "2020-12-14T11:53:27Z",
        "modified": "2020-12-14T11:53:27Z",
        "pricegroup": {
          "created": "2020-12-14T11:53:27Z",
          "fee_hour": "1.0000",
          "fee_day": "5.0000",
          "id": 1,
          "modified": "2020-12-14T11:53:27Z"
        },
        "slug": "192e10e8-c64f-43b8-9f35-dc6aff2e99a1",
        "status": "free",
        "unavailable_until": "2021-05-24T15:43:28Z",
        "description": "here is some text",
        "photo": {
          "created": "2020-12-14T11:53:26Z",
          "id": 2,
          "id_url": "https://backend.openbikebox.de/api/file/2",
          "mimetype": "image/jpeg",
          "modified": "2020-12-14T11:53:26Z",
          "url": "https://backend.openbikebox.de/static/files/2.jpg"
        }
      }
    ],
    "slug": "fahrrad-station-fahrradstadt-1"
  },
  "status": 0
}
hbruch commented 3 years ago

Please note that OBB should not be integrated via it's own interface but using GBFS via OTP2 as a standard interface

the-infinity commented 3 years ago

That's why we now support GBFS: https://backend.openbikebox.next-site.de/api/gbfs/2.2/2/gbfs.json in a first version :)

leonardehrenfried commented 3 years ago

Nice to have: display a picture of the bike.

the-infinity commented 3 years ago

@leonardehrenfried ... but this is not covered by GBFS, is it?

leonardehrenfried commented 3 years ago

No, but the OBB API.

leonardehrenfried commented 3 years ago

@patrickbeck1337 I used the correct feed so you should be able to get the data by using the following API call: https://backend.openbikebox.next-site.de/api/v1/location?slug=cargo-bike-station&format=object

(I also updated the link in ticket description as the URL has changed.)

@the-infinity is there a production version available?

the-infinity commented 3 years ago

Production URL will be https://backend.open-booking.eu . Already working: GBFS: https://backend.open-booking.eu/api/gbfs/2.2/1/gbfs.json ParkAPI: https://backend.open-booking.eu/api/park-api/1.0/ / https://backend.open-booking.eu/api/park-api/1.0/1 Own Detail-API: https://backend.open-booking.eu/api/v1/locations und https://backend.open-booking.eu/api/v1/location/1 und https://backend.open-booking.eu/api/v1/location?slug=cargobike-herrenberg Documentation: https://backend.open-booking.eu/documentation

Now moving https://buchung.stadtnavi.eu

patrickbeck1337 commented 3 years ago

Hey @leonardehrenfried and @the-infinity. Following information is not there yet:

Following is unclear to me:

the-infinity commented 3 years ago

Payment types are not supported atm (and Herrenberg also did not decide which payment times should be supported). Phone number is part of operator, but also is not decided so far. Both fields are not supported by GBFS / ParkAPI, but by our own API.

The capacity can be calculated based on the resource status', yes.