@ourstreets/plate-lookup-etimspayments
v0.2.2
Published
A library to lookup citation information in municipalities using etimspayments
Readme
@ourstreets/plate-lookup-etimspayments
API
Table of Contents
EtimspaymentsLookup
Lookup service class for municipalities using etimspayments.
Uses Puppeteer and Tesseract.js to load etimspayments powered ticket payments systems to get unpaid citations.
Parameters
urlstring The URL of the etimspayments instancebrowserobject? Puppeeteer browser instancetesseractWorkerobject? Tesseract worker instance
initialize
Initialize the browser and tesseractWorker if needed
teardown
Close the puppeteer browser and terminate the tesseractWorker
lookup
Lookup a plate
Parameters
statestring The state of the license plate (2 character state code)numberstring The plate numbers and lettersoptionsobject the only option currently is theretryCaptchakey. specify an integer to retry on captcha errorsoptions.retry(optional, default0)
Returns Array<Object> An array of citation objects
screenshotDOMElement
Takes a screenshot of a DOM element on the page, with optional padding.
Parameters
pagePage pupeteer page objectopts!{path: string, selector: string, padding: (number | undefined)}? (optional, default{})
Returns <
>
