This package has been deprecated

Author message:

Package no longer supported. Contact Support at https://www.npmjs.com/support for more info.

localz-driver-uri-generator

1.0.2 • Public • Published

Localz Driver URI Generator

Handles object validation, base64 encoding, and query stringifying.

Types

Notify

For notifying customers of a driver's approach.

type - 'notify'

data schema - shown using Joi object syntax

Joi.object().keys({
  user: Joi.object().required().keys({
    id: Joi.string().required(),
    password: Joi.string(),
    firstname: Joi.string(),
    lastname: Joi.string(),
    mobile: Joi.string()
  }),
  job: Joi.object().required().keys({
    id: Joi.string().required(),
    start: Joi.string().isoDate(),
    end: Joi.string().isoDate()
  }),
  contact: Joi.object().required().keys({
    address: Joi.string().required(),
    postcode: Joi.string().required(),
    name: Joi.string(),
    phone: Joi.string()
  })
})

Usage

Specify the type of URI, the correct data object, and optionally a callback.

import generateURI from 'localz-driver-uri-generator'

const uri = generateURI('notify', data, 'someapp://')

Readme

Keywords

none

Package Sidebar

Install

npm i localz-driver-uri-generator

Weekly Downloads

2

Version

1.0.2

License

ISC

Last publish

Collaborators

  • localzadmin