@tride/grab-handler
Advanced tools
Comparing version 0.4.2 to 0.4.3
10
index.js
@@ -40,6 +40,5 @@ const { create } = require("axios"); | ||
}; | ||
this.getMotorBikePrice = this.getMotorBikePrice.bind(this); | ||
this.getEstimate = this.getEstimate.bind(this); | ||
this.getCurrentRides = this.getCurrentRides.bind(this); | ||
this.getEstimate = this.getMotorBikePrice; | ||
this.requestRide = this.requestRide.bind(this); | ||
@@ -49,3 +48,3 @@ this.cancelRide = this.cancelRide.bind(this); | ||
async getMotorBikePrice(start = {}, end = {}) { | ||
async getEstimate(start = {}, end = {}) { | ||
if (!start.long || !start.lat || !end.lat || !end.long) { | ||
@@ -88,2 +87,3 @@ throw new Error("no start or end lat/lon"); | ||
return { | ||
service: 'grab', | ||
price: upperBound / 100, | ||
@@ -141,2 +141,3 @@ requestKey: { | ||
return { | ||
service: 'grab', | ||
requestId: data.code | ||
@@ -146,5 +147,6 @@ }; | ||
async getRideStatus(rideId) { | ||
async rideStatus(rideId) { | ||
return await this.grabBase.get(`/api/passenger/v3/rides/${rideId}/status`); | ||
} | ||
async getCurrentRides() { | ||
@@ -151,0 +153,0 @@ const url = "/api/passenger/v3/current"; |
{ | ||
"name": "@tride/grab-handler", | ||
"version": "0.4.2", | ||
"version": "0.4.3", | ||
"main": "index.js", | ||
@@ -5,0 +5,0 @@ "repository": "git@github.com:trride/grab-handler.git", |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
New author
Supply chain riskA new npm collaborator published a version of the package for the first time. New collaborators are usually benign additions to a project, but do indicate a change to the security surface area of a package.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
260
117075
1