A simple node wrapper that serves as an abstraction for the Lyft API's public scope endpoints.
Install via NPM
npm install lyft-node
Takes a ride types search query and returns a response wrapped in a Promise.
start [coordinate]
rideType [string](must belyft,lyft_line, orlyft_plus)
import Lyft from 'lyft-node';
const lyft = new Lyft('LYFT_CLIENT_ID', 'LYFT_CLIENT_SECRET');
const query = {
start: {
latitude: 1,
longitude: 2,
},
};
lyft.getRideTypes(query)
.then((result) => {
console.log(result);
})
.catch((error) => {
console.log(error);
});Takes a driver eta search query and returns a response wrapped in a Promise.
start [coordinate]
end [coordinate]rideType [string](must belyft,lyft_line, orlyft_plus)
import Lyft from 'lyft-node';
const lyft = new Lyft('LYFT_CLIENT_ID', 'LYFT_CLIENT_SECRET');
const query = {
start: {
latitude: 1,
longitude: 2,
},
};
lyft.getDriverEta(query)
.then((result) => {
console.log(result);
})
.catch((error) => {
console.log(error);
});Takes a ride estimates search query and returns a response wrapped in a Promise.
start [coordinate]end [coordinate]
rideType [string](must belyft,lyft_line, orlyft_plus)
import Lyft from 'lyft-node';
const lyft = new Lyft('LYFT_CLIENT_ID', 'LYFT_CLIENT_SECRET');
const query = {
start: {
latitude: 1,
longitude: 2,
},
end: {
latitude: 3,
longitude: 4,
},
rideType: 'lyft',
};
lyft.getRideEstimates(query)
.then((result) => {
console.log(result);
})
.catch((error) => {
console.log(error);
});Takes a nearby drivers search query and returns a response wrapped in a Promise.
start [coordinate]
import Lyft from 'lyft-node';
const lyft = new Lyft('LYFT_CLIENT_ID', 'LYFT_CLIENT_SECRET');
const query = {
start: {
latitude: 1,
longitude: 2,
},
};
lyft.getNearbyDrivers(query)
.then((result) => {
console.log(result);
})
.catch((error) => {
console.log(error);
});This project is heavily inspired by Jae Bradley's uber-client
