forked from dbsystel/1BahnQL
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathNearbyQuery.js
34 lines (28 loc) · 1.23 KB
/
NearbyQuery.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
class NearbyQuery {
constructor(latitude, longitude, radius, nearbyStationService, parkingspaceService, flinksterService, travelCenterService) {
this.latitude = latitude;
this.longitude = longitude;
this.radius = radius;
//Service Dependencies
this.nearbyStationService = nearbyStationService;
this.parkingspaceService = parkingspaceService;
this.flinksterService = flinksterService;
this.travelCenterService = travelCenterService;
}
parkingSpaces(args) {
return this.parkingspaceService.nearbyParkingspaces(this.latitude, this.longitude, this.radius, args.count, args.offset);
}
travelCenters(args) {
return this.travelCenterService.travelCentersAtLocation(this.latitude, this.longitude, this.radius, args.count, args.offset);
}
flinksterCars(args) {
return this.flinksterService.nearbyFlinksterCars(this.latitude, this.longitude, this.radius, args.count, args.offset);
}
stations(args) {
return this.nearbyStationService.stationNearby(this.latitude, this.longitude, this.radius, args.count, args.offset);
}
bikes(args) {
return this.flinksterService.nearbyFlinksterBikes(this.latitude, this.longitude, this.radius, args.count, args.offset);
}
}
module.exports = NearbyQuery;