Socket
Book a DemoInstallSign in
Socket

node-paps

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

node-paps

a nodejs paps.sn integration

0.4.0
latest
Source
npmnpm
Version published
Maintainers
1
Created
Source

Coverage Status License Npm version Npm downloads .github/workflows/integrate.yml Issues PR

Paps API integration

Fully tested API integration of https://paps.sn with typescript

Gain some extra time by using this library if you're looking looking forward to integrate delivery system on your website.

Usage

Development

cp sample.env .env
// modify .env to match your credentials at developers.paps.sn

// lint
yarn lint

// build before pushing to make sure everything is working
yarn build

// run the tests
yarn test

NodeJS

const Paps = require('node-paps')
const dotenv = require('dotenv')
dotenv.config()
const { NODE_ENV, PAPS_API_KEY, PAPS_API_URL } = process.env
const IN_PRODUCTION = NODE_ENV === 'production'

const paps = new Paps({
  apiKey: PAPS_API_KEY,
  test: !IN_PRODUCTION,
  url: PAPS_API_URL
})
// use as you want
// paps.createPickup({...})
// paps.createPickupAndDelivery({...})
// paps.createDelivery({...})
// paps.viewTask({...})
// paps.viewTasks({...})

Typescript

import Paps from 'node-paps'
import dotenv from 'dotenv'
dotenv.config()
const { NODE_ENV, PAPS_API_KEY, PAPS_API_URL } = process.env
const IN_PRODUCTION = NODE_ENV === 'production'

const paps = new Paps({
  apiKey: PAPS_API_KEY,
  test: !IN_PRODUCTION,
  url: PAPS_API_URL
})
// use as you want
// paps.createPickup({...})
// paps.createPickupAndDelivery({...})
// paps.createDelivery({...})
// paps.viewTask({...})
// paps.viewTasks({...})

Documentation

You want some doc ? Read the tests

TODO

  • tests: cover all use cases
  • get the support team at paps.sn to clarify some API response
  • use mock instead of hitting real endpoint

License

Contributors

Babacar Cissé DIA

FAQs

Package last updated on 08 May 2020

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

About

Packages

Stay in touch

Get open source security insights delivered straight into your inbox.

  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc

U.S. Patent No. 12,346,443 & 12,314,394. Other pending.