Skip to content

Commit

Permalink
Moscow: electric bikes support
Browse files Browse the repository at this point in the history
  • Loading branch information
sthocs committed Jun 27, 2021
1 parent 399e5f1 commit 28876e3
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
3 changes: 2 additions & 1 deletion data/cities.json
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,8 @@
"name": "Moscow",
"commercial_name": "Velobike",
"country_code": "RU",
"allStationsDetailsUrl": "https://velobike.ru/proxy/parkings/"
"allStationsDetailsUrl": "https://velobike.ru/proxy/parkings/",
"hasElectricBikes": true
},
{
"provider": "EcoBici",
Expand Down
3 changes: 2 additions & 1 deletion src/parser/russia/parsermoscow.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,8 @@ QList<Station*> ParserMoscow::parseStationsList(QString allStations, bool withDe
station->opened = !stationJson["IsLocked"].toBool();
station->bike_stands = stationJson["TotalPlaces"].toInt();
station->available_bike_stands = stationJson["FreePlaces"].toInt();
station->available_bikes = station->bike_stands - station->available_bike_stands;
station->available_bikes = stationJson["AvailableOrdinaryBikes"].toInt();
station->available_electric_bikes = stationJson["AvailableElectricBikes"].toInt();
}
stationsList.append(station);
}
Expand Down

0 comments on commit 28876e3

Please sign in to comment.