You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
import lyft from 'node-lyft';
let defaultClient = lyft.ApiClient.instance;
// Configure OAuth2 access token for authorization: User Authentication
let userAuth = defaultClient.authentications['User Authentication'];
userAuth.accessToken = 'YOUR ACCESS TOKEN';
let apiInstance = new lyft.UserApi();
let request = new lyft.Ride('lyft', new lyft.Location(37.77663, -122.39227));
request.destination = new lyft.Location(37.771, -122.39123);
apiInstance.newRide(request).then((data) => {
console.log('API called successfully. Returned data: ' + data);
}, (error) => {
console.error(error);
});
Pulled above code from Lyft API endpoints page, received following error
TypeError: Cannot call a class as a function
at _classCallCheck (/Users/dlinnell/Desktop/Helios/node_modules/node-lyft/lib/model/LatLng.js:26:99)
at Location.LatLng (/Users/dlinnell/Desktop/Helios/node_modules/node-lyft/lib/model/LatLng.js:43:9)
at new Location (/Users/dlinnell/Desktop/Helios/node_modules/node-lyft/lib/model/Location.js:55:26)
at Request._callback (/Users/dlinnell/Desktop/Helios/routes/lyft_routes.js:62:35)
at Request.self.callback (/Users/dlinnell/Desktop/Helios/node_modules/request/request.js:186:22)
at emitTwo (events.js:125:13)
at Request.emit (events.js:213:7)
at Request. (/Users/dlinnell/Desktop/Helios/node_modules/request/request.js:1163:10)
at emitOne (events.js:115:13)
at Request.emit (events.js:210:7)
The text was updated successfully, but these errors were encountered:
import lyft from 'node-lyft';
let defaultClient = lyft.ApiClient.instance;
// Configure OAuth2 access token for authorization: User Authentication
let userAuth = defaultClient.authentications['User Authentication'];
userAuth.accessToken = 'YOUR ACCESS TOKEN';
let apiInstance = new lyft.UserApi();
let request = new lyft.Ride('lyft', new lyft.Location(37.77663, -122.39227));
request.destination = new lyft.Location(37.771, -122.39123);
apiInstance.newRide(request).then((data) => {
console.log('API called successfully. Returned data: ' + data);
}, (error) => {
console.error(error);
});
Pulled above code from Lyft API endpoints page, received following error
TypeError: Cannot call a class as a function
at _classCallCheck (/Users/dlinnell/Desktop/Helios/node_modules/node-lyft/lib/model/LatLng.js:26:99)
at Location.LatLng (/Users/dlinnell/Desktop/Helios/node_modules/node-lyft/lib/model/LatLng.js:43:9)
at new Location (/Users/dlinnell/Desktop/Helios/node_modules/node-lyft/lib/model/Location.js:55:26)
at Request._callback (/Users/dlinnell/Desktop/Helios/routes/lyft_routes.js:62:35)
at Request.self.callback (/Users/dlinnell/Desktop/Helios/node_modules/request/request.js:186:22)
at emitTwo (events.js:125:13)
at Request.emit (events.js:213:7)
at Request. (/Users/dlinnell/Desktop/Helios/node_modules/request/request.js:1163:10)
at emitOne (events.js:115:13)
at Request.emit (events.js:210:7)
The text was updated successfully, but these errors were encountered: