A simple Node client that serves as an abstraction for the Uber Estimates API.
Install via NPM
npm install uber-estimates-clientGets the estimated price range for start and end coordinates.
start(a coordinate)end(a coordinate)seats(optional)- default value is 2
- maximum value is 2
import UberEstimatesClient from 'uber-estimates-client';
const client = new UberEstimatesClient({ serverToken: 'my-server-token' });
let parameters = {
start: {
latitude: 1,
longitude: 2,
},
end: {
latitude: 3,
longitude: 4,
},
seats: 1,
};
return client.getPriceEstimates(parameters);Gets the ETA for a given location and optional product
start(a coordinate)productId(optional)- must be a
string
- must be a
import UberEstimatesClient from 'uber-estimates-client';
const client = new UberEstimatesClient({ serverToken: 'my-server-token' });
let query = {
start: {
latitude: 1,
longitude: 2,
},
productId: 'jaebaebae',
};
return client.getArrivalTimes(query);