Skip to content

API Documentation

devgen edited this page Feb 9, 2017 · 5 revisions

URL - "uri": "/AbapConnection/sap/opu/odata/SAP/ZWS16_T1_RENTAL_BIKE_ODATA_SRV/"

List of Bike Types { "BikeTypes" : [ { "title" : "DELUXE TOURING BIKE(BLACK)", "id" : "deluxetouringbike_black", "number" : "0", "info" : "Not available currently", "infoState" : "Error" }, { "title" : "DELUXE TOURING BIKE(RED)", "id" : "deluxetouringbike_red", "number" : "10", "info" : "Few available", "infoState" : "Warning" }, { "title" : "DELUXE TOURING BIKE(SILVER)", "id" : "deluxetouringbike_silver", "number" : "20", "info" : "Available", "infoState" : "Success" }, { "title" : "MEN'S OFF ROAD BIKE", "id" : "mensoffroadbike", "number" : "20", "info" : "Available", "infoState" : "Success" }, { "title" : "PROFESSIONAL TOURING BIKE(BLACK)", "id" : "professionaltouringbike_black", "number" : "0", "info" : "Not available currently", "infoState" : "Error" }, { "title" : "PROFESSIONAL TOURING BIKE(RED)", "id" : "professionaltouringbike_red", "number" : "20", "info" : "Available", "infoState" : "Success" }, { "title" : "PROFESSIONAL TOURING BIKE(SILVER)", "id" : "professionaltouringbike_silver", "number" : "10", "info" : "Few available", "infoState" : "Warning" }, { "title" : "WOMEN'S OFF ROAD BIKE", "id" : "womensoffroadbike", "number" : "10", "info" : "Few available", "infoState" : "Warning" } ] }


Issues for Report Problems { "BikeIssues" : [ { "title" : "Handle is not aligned properly", "id" : "handleissue1" }, { "title" : "Loose handle", "id" : "handleissue2" }, { "title" : "Handle grip is bad", "id" : "handleissue3" } ] }


User History { "pastrides": [{ "start": { "name": "85748 Garching, Germany", "lat": 48.2732261, "lng": 11.6851891, "time": "2016-12-01T22:46:53+01:00" }, "end": { "name": "Freimann, 80939 München", "lat": 48.1919794, "lng": 11.6142375, "time": "2016-12-01T23:46:53+01:00" }, "positions": [{ "name": "85748 Garching, Germany", "lat": 48.2732261, "lng": 11.6851891 }, { "name": "Garching-Hochbrück, 85748 Garching bei München", "lat": 48.2473909, "lng": 11.631036

		}, {
			"name": "Fröttmaning, 80939 München",
			"lat": 48.21184539999999,
			"lng": 11.6165192
		}, {
			"name": "Kieferngarten, 80939 München",
			"lat": 48.2038472,
			"lng": 11.6132942
		}, {
			"name": "Freimann, 80939 München",
			"lat": 48.1919794,
			"lng": 11.6142375
		}]
	}, {
		"start": {
			"name": "85748 Garching, Germany",
			"lat": 48.2732261,
			"lng": 11.6851891,
			"time": "2016-12-02T22:46:53+01:00"
		},
		"end": {
			"name": "Freimann, 80939 München",
			"lat": 48.1919794,
			"lng": 11.6142375,
			"time": "2016-12-02T23:46:53+01:00"
		},
		"positions": [{
			"name": "85748 Garching, Germany",
			"lat": 48.2732261,
			"lng": 11.6851891
		}, {
			"name": "Garching-Hochbrück, 85748 Garching bei München",
			"lat": 48.2473909,
			"lng": 11.631036

		}, {
			"name": "Fröttmaning, 80939 München",
			"lat": 48.21184539999999,
			"lng": 11.6165192
		}, {
			"name": "Kieferngarten, 80939 München",
			"lat": 48.2038472,
			"lng": 11.6132942
		}, {
			"name": "Freimann, 80939 München",
			"lat": 48.1919794,
			"lng": 11.6142375
		}]
	}

]

}


Problem list for users to report problems { "ProblemArea": [{ "icon": "resources/img/handle.png", "title": "Handle", "id": "handle", "handle": [{ "title": "Handle is not aligned properly", "id": "handleissue1" }, { "title": "Loose handle", "id": "handleissue2" }, { "title": "Handle grip is bad", "id": "handleissue3" }] }, { "icon": "resources/img/wheels.png", "title": "Wheels", "id": "wheels" }, { "icon": "resources/img/gears.png", "title": "Gear/Chain", "id": "gear" }, { "icon": "resources/img/gears.png", "title": "Seat", "id": "seat" }, { "icon": "resources/img/gears.png", "title": "Light", "id": "light" }] }


List of station locations { "stations": [{ "lat": 48.108889, "lng": 11.473611, "info": "Klinikum Großhadern", "icon": "resources/img/map-marker-icon.png" }, { "lat": 48.11380639999999, "lng": 11.4766509, "info": "Großhadern", "icon": "resources/img/map-marker-icon.png" }, { "lat": 48.118394, "lng": 11.488828, "info": "Haderner Stern", "icon": "resources/img/map-marker-icon.png" }, { "name": "85748 Garching, Germany", "lat": 48.2732261, "lng": 11.6851891, "icon": "resources/img/map-marker-icon.png" }, { "name": "Garching-Hochbrück, 85748 Garching bei München", "lat": 48.2473909, "lng": 11.631036, "icon": "resources/img/map-marker-icon.png"

}, {
	"name": "Fröttmaning, 80939 München",
	"lat": 48.21184539999999,
	"lng": 11.6165192,
	"icon": "resources/img/map-marker-icon.png"
}, {
	"name": "Kieferngarten, 80939 München",
	"lat": 48.2038472,
	"lng": 11.6132942,
	"icon": "resources/img/map-marker-icon.png"
}, {
	"name": "Freimann, 80939 München",
	"lat": 48.1919794,
	"lng": 11.6142375,
	"icon": "resources/img/map-marker-icon.png"
}]

}


Websocket: URL


wss://i67lp1.informatik.tu-muenchen.de:8000/sap/bc/apc/sap/zws16_t1_rental_bike_push_c_i?CUSTOMER_ID=999&BIKE_ID=888


ws://i67lp1.informatik.tu-muenchen.de:8443/sap/bc/apc/sap/zws16_t1_rental_bike_push_c_i?CUSTOMER_ID=999&BIKE_ID=888


Strucutre : { U_TOKEN : "ABC", BIKE_ID : "client1", CUSTOMER_ID : "123", LATITUDE : "0.5", LONGITUDE : "0.5" }


example


Clone this wiki locally