Skip to content

Commit

Permalink
add providers oberschwabenmobil, gmuend_bewegt
Browse files Browse the repository at this point in the history
  • Loading branch information
ThorstenFroehlinghaus committed Dec 6, 2024
1 parent f6bd68f commit c9df54d
Show file tree
Hide file tree
Showing 5 changed files with 197 additions and 7 deletions.
4 changes: 2 additions & 2 deletions config/flinkster_carsharing.json
Original file line number Diff line number Diff line change
Expand Up @@ -83,11 +83,11 @@
"rental_apps": {
"android": {
"discovery_uri": "https://go.moqo.de/deeplink/openApp",
"store_uri": "https://play.google.com/store/apps/details?id=de.zeagenergie.sharing.app&gl=DE"
"store_uri": "https://play.google.com/store/apps/details?id=de.flinkster.sharing.app"
},
"ios": {
"discovery_uri": "https://go.moqo.de/deeplink/openApp",
"store_uri": "https://apps.apple.com/de/app/zeag-carsharing/id1579488967"
"store_uri": "https://apps.apple.com/us/app/flinkster/id6639612291?mt=8"
}
},
"system_id": "flinkster",
Expand Down
60 changes: 60 additions & 0 deletions config/gmuend_bewegt.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,60 @@
{
"feed_data": {
"pricing_plans": [
{
"currency": "EUR",
"description": "Stundentarif: 5,90€ zzgl. 0,19€/km. Alle Angaben ohne Gewähr.",
"is_taxable": false,
"name": "Stundentarif",
"per_min_pricing": [ { "start": 0, "interval": 60, "rate": 5.50 } ],
"per_km_pricing": [ { "start": 0, "interval": 1, "rate": 0.19 } ],
"plan_id": "compact_car_hour_daytime",
"price": 0,
"url": "https://www.stwgd.de/files/stadtwerke_gd/userfiles/pdf/Mobilit%C3%A4t/E-Carsharing/Preisblatt_Stand%2001.05.2023.pdf"
},
{
"currency": "EUR",
"description": "Tagestarif: 47,90€ zzgl. 0,19€/km. Alle Angaben ohne Gewähr.",
"is_taxable": false,
"name": "Tagestarif",
"per_min_pricing": [ { "start": 0, "interval": 1440, "rate": 47.90 } ],
"per_km_pricing": [ { "start": 0, "interval": 1, "rate": 0.19 } ],
"plan_id": "compact_car_day",
"price": 0,
"url": "https://www.stwgd.de/files/stadtwerke_gd/userfiles/pdf/Mobilit%C3%A4t/E-Carsharing/Preisblatt_Stand%2001.05.2023.pdf"
}
],
"system_information": {
"attribution_organization_name": "Stadtwerke Schwäbisch Gmünd GmbH",
"attribution_url": "https://www.stwgd.de/",
"email": "[email protected]",
"feed_contact_email": "[email protected]",
"language": "de",
"license_id": "DL-DE-BY-2.0",
"license_url": "https://www.govdata.de/dl-de/by-2-0",
"name": "Gmünd bewegt!",
"operator": "Stadtwerke Schwäbisch Gmünd GmbH",
"phone_number": "+49 (0)7171 603-8222",
"privacy_url": "https://www.stwgd.de/datenschutz.html",
"purchase_url": "https://portal.moqo.de/js_sign_up/gmund-bewegt#/account",
"rental_apps": {
"android": {
"discovery_uri": "https://go.moqo.de/deeplink/openApp",
"store_uri": "https://play.google.com/store/apps/details?id=de.moqo.work"
},
"ios": {
"discovery_uri": "https://go.moqo.de/deeplink/openApp",
"store_uri": "https://apps.apple.com/de/app/moqo/id1385011262"
}
},
"system_id": "gmuend_bewegt",
"terms_url": "https://www.stwgd.de/files/stadtwerke_gd/userfiles/pdf/Mobilit%C3%A4t/E-Carsharing/AGB%20Gm%C3%BCnd%20bewegt!.pdf",
"timezone": "Europe/Berlin",
"url": "https://www.stwgd.de/privatkunden/mobilitaet/e-carsharing.html"
}
},
"provider_data": {
"team_id": "196572225"
}
}

124 changes: 124 additions & 0 deletions config/oberschwabenmobil.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,124 @@
{
"feed_data": {
"pricing_plans": [
{
"currency": "EUR",
"description": "Stundentarif: 3,00€ zzgl. 0,35€/km. Alle Angaben ohne Gewähr.",
"is_taxable": false,
"name": "Kleinwagen - EinfachMobil Stundentarif",
"per_min_pricing": [ { "start": 0, "interval": 60, "rate": 3.00 } ],
"per_km_pricing": [ { "start": 0, "interval": 1, "rate": 0.35 } ],
"plan_id": "small_family_car_hour_daytime",
"price": 0,
"url": "https://www.oberschwabenmobil.de/Preis.html"
},
{
"currency": "EUR",
"description": "Tagestarif: 30,00€ zzgl. 0,35€/km. Alle Angaben ohne Gewähr.",
"is_taxable": false,
"name": "Kleinwagen - EinfachMobil Tagestarif",
"per_min_pricing": [ { "start": 0, "interval": 1440, "rate": 30.00 } ],
"per_km_pricing": [ { "start": 0, "interval": 1, "rate": 0.35 } ],
"plan_id": "small_family_car_day",
"price": 0,
"url": "https://www.oberschwabenmobil.de/Preis.html"
},
{
"currency": "EUR",
"description": "Stundentarif: 3,00€ zzgl. 0,35€/km. Alle Angaben ohne Gewähr.",
"is_taxable": false,
"name": "Kompaktwagen - EinfachMobil Stundentarif",
"per_min_pricing": [ { "start": 0, "interval": 60, "rate": 3.00 } ],
"per_km_pricing": [ { "start": 0, "interval": 1, "rate": 0.35 } ],
"plan_id": "compact_car_hour_daytime",
"price": 0,
"url": "https://www.oberschwabenmobil.de/Preis.html"
},
{
"currency": "EUR",
"description": "Tagestarif: 30,00€ zzgl. 0,35€/km. Alle Angaben ohne Gewähr.",
"is_taxable": false,
"name": "Kompaktwagen - EinfachMobil Tagestarif",
"per_min_pricing": [ { "start": 0, "interval": 1440, "rate": 30.00 } ],
"per_km_pricing": [ { "start": 0, "interval": 1, "rate": 0.35 } ],
"plan_id": "compact_car_day",
"price": 0,
"url": "https://www.oberschwabenmobil.de/Preis.html"
},
{
"currency": "EUR",
"description": "Stundentarif: 3,50€ zzgl. 0,41€/km. Alle Angaben ohne Gewähr.",
"is_taxable": false,
"name": "Limousine - EinfachMobil Stundentarif",
"per_min_pricing": [ { "start": 0, "interval": 60, "rate": 3.50 } ],
"per_km_pricing": [ { "start": 0, "interval": 1, "rate": 0.41 } ],
"plan_id": "limousine_hour_daytime",
"price": 0,
"url": "https://www.oberschwabenmobil.de/Preis.html"
},
{
"currency": "EUR",
"description": "Tagestarif: 35,00€ zzgl. 0,41€/km. Alle Angaben ohne Gewähr.",
"is_taxable": false,
"name": "Limousine - EinfachMobil Tagestarif",
"per_min_pricing": [ { "start": 0, "interval": 1440, "rate": 35.00 } ],
"per_km_pricing": [ { "start": 0, "interval": 1, "rate": 0.41 } ],
"plan_id": "limousine_day",
"price": 0,
"url": "https://www.oberschwabenmobil.de/Preis.html"
},
{
"currency": "EUR",
"description": "Stundentarif: 3,50€ zzgl. 0,41€/km. Alle Angaben ohne Gewähr.",
"is_taxable": false,
"name": "Kombiwagen - EinfachMobil Stundentarif",
"per_min_pricing": [ { "start": 0, "interval": 60, "rate": 3.50 } ],
"per_km_pricing": [ { "start": 0, "interval": 1, "rate": 0.41 } ],
"plan_id": "station_wagon_hour_daytime",
"price": 0,
"url": "https://www.oberschwabenmobil.de/Preis.html"
},
{
"currency": "EUR",
"description": "Tagestarif: 35,00€ zzgl. 0,41€/km. Alle Angaben ohne Gewähr.",
"is_taxable": false,
"name": "Kombiwagen - EinfachMobil Tagestarif",
"per_min_pricing": [ { "start": 0, "interval": 1440, "rate": 35.00 } ],
"per_km_pricing": [ { "start": 0, "interval": 1, "rate": 0.41 } ],
"plan_id": "station_wagon_day",
"price": 0,
"url": "https://www.oberschwabenmobil.de/Preis.html"
}
],
"system_information": {
"attribution_organization_name": "OberSchwabenMobil e.V.",
"attribution_url": "https://www.oberschwabenmobil.de/",
"email": "[email protected]",
"feed_contact_email": "[email protected]",
"language": "de",
"license_id": "DL-DE-BY-2.0",
"license_url": "https://www.govdata.de/dl-de/by-2-0",
"name": "OberSchwabenMobil CarSharing",
"operator": "OberSchwabenMobil e.V.",
"phone_number": "+49 (0)241 95788-366",
"purchase_url": "https://www.oberschwabenmobil.de/Verein.html",
"rental_apps": {
"android": {
"discovery_uri": "https://go.moqo.de/deeplink/openApp",
"store_uri": "https://play.google.com/store/apps/details?id=de.moqo.work"
},
"ios": {
"discovery_uri": "https://go.moqo.de/deeplink/openApp",
"store_uri": "https://apps.apple.com/us/app/moqo/id1385011262"
}
},
"system_id": "oberschwabenmobil",
"timezone": "Europe/Berlin",
"url": "https://www.oberschwabenmobil.de/"
}
},
"provider_data": {
"team_id": "1154505515"
}
}

6 changes: 4 additions & 2 deletions x2gbfs/providers/moqo.py
Original file line number Diff line number Diff line change
Expand Up @@ -144,11 +144,13 @@ def _extract_from_parkings(
'name': elem['name'],
'lat': center['lat'],
'lon': center['lng'],
'address': address,
'post_code': elem['zipcode'],
'rental_methods': ['key'],
}

if address:
station['address'] = address
if elem.get('zipcode'):
station['post_code'] = elem['zipcode']
if elem.get('capacity_max'):
station['capacity'] = elem['capacity_max']

Expand Down
10 changes: 7 additions & 3 deletions x2gbfs/x2gbfs.py
Original file line number Diff line number Diff line change
Expand Up @@ -54,12 +54,16 @@ def build_extractor(provider: str, feed_config: Dict[str, Any]) -> BaseProvider:
or provider.startswith('teilauto_')
):
return CantamenIXSIProvider(feed_config)
if provider in ['stadtwerk_tauberfranken', 'zeag_energie', 'flinkster_carsharing']:
if provider in [
'stadtwerk_tauberfranken',
'zeag_energie',
'flinkster_carsharing',
'oberschwabenmobil',
'gmuend_bewegt',
]:
return MoqoProvider(feed_config)
if provider in ['noi']:
return NoiProvider()
if provider in ['flinkster']:
return FlinksterProvider(feed_config)

raise ValueError(f'Unknown config {provider}')

Expand Down

0 comments on commit c9df54d

Please sign in to comment.