Socket
Socket
Sign inDemoInstall

lyft-node

Package Overview
Dependencies
55
Maintainers
1
Versions
5
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

    lyft-node

This is a Node.js Wrapper for the Lyft API's public scope endpoints


Version published
Weekly downloads
3
decreased by-75%
Maintainers
1
Install size
6.41 MB
Created
Weekly downloads
 

Readme

Source

Build Status Coverage Status npm version

NPM

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 be lyft, lyft_line, or lyft_plus)
Example
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);
  });

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 be lyft, lyft_line, or lyft_plus)
Example
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);
  });

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 be lyft, lyft_line, or lyft_plus)
Example
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);
  });

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
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);
  });

License

MIT

Credits

This project is heavily inspired by Jae Bradley's uber-client

Keywords

FAQs

Last updated on 23 Mar 2017

Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc