bbnavi / moqo2gbfs

MOQO API to GBFS converter
MIT License
1 stars 1 forks source link

moqo2gbfs

moqo2gbfs is a small python script, which generates a GBFS feed from MOQO's API.

To generate a feed for e.g. BARshare network, execute

python moqoToGBFS.py -t <secret> -b https://portal.moqo.de/api_aggregator/ -c BARshare

where needs to be replaced by the MOQO API secret.

Note: Not every GBFS information can be retrieved from the API. The content of system_information and system_pricing_plans is hard coded in moqoToGBFS.py and need to be updated, if this information changes.

Using Docker

docker build -t mfdz/moqo2gbfs .
docker run --rm -v $PWD/out:/usr/src/app/out mfdz/moqo2gbfs moqoToGBFS.py -t <secret> -b https://data.mfdz.de/gbfs/barshare -s https://portal.moqo.de/api_aggregator/ -c BARshare

Documentation

MOQO-API-Documentation is available here: https://source.digital-mobility.solutions/moqo-public/aggregator-api/-/blob/master/aggregator_openapi.yaml