A Node Wrapper for the Lyft API
Introduction
A simple node wrapper that serves as an abstraction for the Lyft API's public scope endpoints.
Installation
Install via NPM
npm install lyft-node
Usage
Get Ride Types
Takes a ride types search query and returns a response wrapped in a Promise.
Ride Types Search Query
Required:
start [coordinate]
Optional:
rideType [string]
(must belyft
,lyft_line
, orlyft_plus
)
Example
; const lyft = 'LYFT_CLIENT_ID' 'LYFT_CLIENT_SECRET'; const query = start: latitude: 1 longitude: 2 ; lyft ;
Get Driver ETA
Takes a driver eta search query and returns a response wrapped in a Promise.
Driver ETA Search Query
Required:
start [coordinate]
Optional:
end [coordinate]
rideType [string]
(must belyft
,lyft_line
, orlyft_plus
)
Example
; const lyft = 'LYFT_CLIENT_ID' 'LYFT_CLIENT_SECRET'; const query = start: latitude: 1 longitude: 2 ; lyft ;
Get Ride Estimates
Takes a ride estimates search query and returns a response wrapped in a Promise.
Ride Estimates Search Query
Required:
start [coordinate]
end [coordinate]
rideType [string]
(must belyft
,lyft_line
, orlyft_plus
)
Example
; const lyft = 'LYFT_CLIENT_ID' 'LYFT_CLIENT_SECRET'; const query = start: latitude: 1 longitude: 2 end: latitude: 3 longitude: 4 rideType: 'lyft'; lyft ;
Get Nearby Drivers
Takes a nearby drivers search query and returns a response wrapped in a Promise.
Time Estimates Search Query
Required:
start [coordinate]
Example
; const lyft = 'LYFT_CLIENT_ID' 'LYFT_CLIENT_SECRET'; const query = start: latitude: 1 longitude: 2 ; lyft ;
License
Credits
This project is heavily inspired by Jae Bradley's uber-client