Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

ca-dmv-poller

Package Overview
Dependencies
Maintainers
1
Versions
3
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

ca-dmv-poller

A tool to poll multiple DMV locations and find the earliest available appointment time.

  • 0.0.3
  • latest
  • npm
  • Socket score

Version published
Weekly downloads
1
Maintainers
1
Weekly downloads
 
Created
Source

CA DMV Poller

A developer API to access the CA DMV appointment system

NOTE: This is a developer API. Use CA DMV Appointment FastFinder, an Android app, if you just want to get an appointment.

Install

Install this module like any other npm package:

$ npm install ca-dmv-poller

Usage

const Poller = require('ca-dmv-poller')

const poller = new Poller({
  itemsToProcess: 1, // Number of items user would like to process
  maxDistanceMiles: 15, // Distance from home location to search for DMV Offices

  // Provide zipCode, coords, or address
  zipCode: '95630', // or
  coords: {
    lat: '38.733792',
    lng: '-121.141315'
  } // or
  address: '1600 Amphitheatre Pkwy, Mountain View, CA 94043',

  mode: 'OfficeVisit', // or 'DriveTest'
  // CID: Apply for, replace, or renew a California DL/ID
  // RID: Apply for, replace, or renew a REAL ID
  // VR: Register or title a vehicle or vessel (boat)
  appointmentTypes: ['CID'],
  // User's appointment information
  appointmentInfo: {
    appointmentInfo: {
      firstName: 'John',
      lastName: 'Doe',
      telArea: '123',
      telPrefix: '456',
      telSuffix: '7890',
      birthDay: '01',
      birthMonth: '01',
      birthYear: '2001',
      dlNumber: 'I0004567', // AKA Permit Number
      requestedTask: 'DT', // (automobile) or 'MC' (motorcycle),
      safetyCourseCompletedSelection: 'TRUE' // or 'FALSE', motorcycle test only
    }
  }
})

poller
  .check()
  .then(results => {
    results.forEach(result => {
      if (result.hasFailed) {
        console.log(
          `The request to ${result.location} (id ${
            result.id
          }) failed because: ${result.cause}`
        )
        return
      }
      console.log('Day of appointment: ', result.date)
      console.log('Days until appointment: ', result.daysUntil)
      console.log('Location of appointment: ', result.location)
    })
  })
  .catch(e => console.error(e))

Special Thanks to Michael Vartan and his tool, ca-dmv-poller, for inspiration and initial implementation of this app.

FAQs

Package last updated on 02 Mar 2019

Did you know?

Socket

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
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc