ubahnverleih / WoBike

Documentation of Bike Sharing APIs 🚴🛴🛵
958 stars 131 forks source link

Add Zeus #166

Open robbi5 opened 4 years ago

robbi5 commented 4 years ago

Site: https://de.zeusscooters.com/download iOS: https://apps.apple.com/ie/app/zeus-scooters/id1484472542 Android: https://play.google.com/store/apps/details?id=com.zeus.app

Using Fleetbird: https://zeus.frontend.fleetbird.eu/api/prod/v1.06/ https://zeus.frontend.fleetbird.eu/api/prod/v1.06/locations/ https://zeus.frontend.fleetbird.eu/api/prod/v1.06/cars/ https://zeus.frontend.fleetbird.eu/api/prod/v1.06/map/cars/

robbi5 commented 3 years ago

Zeus switched in some markets to the platform of AtomMobility (https://atommobility.com)

Base URL: https://app.rideatom.com Required Headers are

App-Public-Key: a97be4a75ead97ad50e83c9b374b72c77861f730cafc355e
Authorization: Basic base64(<jwt>:)

The jwt is used as the basic auth username, the password is empty.

Aquire jwt by registering with

POST /api/v1/user/phone/code/request HTTP/1.1
Content-Type: application/x-www-form-urlencoded; charset=utf-8
App-Public-Key: a97be4a75ead97ad50e83c9b374b72c77861f730cafc355e

device_os=IOS&device_os_version=14.5.1&flow=REGISTRATION&language=DE&phone=171%203920000&phone_prefix=%2B49

Response:

{
    "phone_token": "eyJTOKENTOKEN.eyJTOKENTOKEN-TOKEN-TOKEN",
    "phone": "1713920000",
    "left_seconds": 60
}

Confirm SMS by

POST /api/v1/user/phone/code/verify HTTP/1.1
Content-Type: application/x-www-form-urlencoded; charset=utf-8
App-Public-Key: a97be4a75ead97ad50e83c9b374b72c77861f730cafc355e

code=123456&language=DE&phone_token=eyJTOKENTOKEN.eyJTOKENTOKEN-TOKEN-TOKEN

Get Locations by

GET https://app.rideatom.com/api/v1/user/scooters?user_latitude=0.000000&user_longitude=0.000000&user_location_timestamp=0&skip_zones=1&fleet_id=0

{
    "scooters": [{
        "id": 9523,
        "nr": "3130",
        "battery_level": 100,
        "battery_info": "75 km",
        "price_info": "\u20ac1.00 + \u20ac0.19/min",
        "image_url": "https://s3-eu-west-1.amazonaws.com/rideatom/zeus/model/1621272269",
        "type": "SCOOTER",
        "coordinates": {
            "longitude": 9.993444666666667,
            "latitude": 48.39592533333333
        },
        "ride_info": "",
        "allow_pause": true,
        "pause_info": "\u20ac0.05/min",
        "card_layout": "SIMPLE",
        "fuel_type": "ELECTRIC",
        "name": "ZEUS 3130",
        "manual_unlock": false,
        "battery_mode": "FULL",
        "map_icons": {
            "active_full": "https://s3-eu-west-1.amazonaws.com/rideatom/zeus/map-icons/1617899690",
            "active_medium": "https://s3-eu-west-1.amazonaws.com/rideatom/zeus/map-icons/1617899691",
            "active_low": "https://s3-eu-west-1.amazonaws.com/rideatom/zeus/map-icons/1617899692",
            "inactive_full": "https://s3-eu-west-1.amazonaws.com/rideatom/zeus/map-icons/1617899693",
            "inactive_medium": "https://s3-eu-west-1.amazonaws.com/rideatom/zeus/map-icons/1617899694",
            "inactive_low": "https://s3-eu-west-1.amazonaws.com/rideatom/zeus/map-icons/1617899695"
        }
    },
    ...
    ],
    "show_add_balance_bar": true
}