npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

blip-deliveries

v0.3.10

Published

A wrapper for the Blip.delivery API to make same-day deliveries using code

Downloads

46

Readme

Blip logo

Make Same-day deliveries with Blip

To get started integrating same-day deliveries into your application, use require('blip-deliveries')('YOURSTOREID') and replace YOURSTOREID with the storeID you recieved after signing up for an account. To get started in testmode, replace YOURSTOREID with test

For example;

var blip = require('blip-deliveries')('test') is Testmode

var blip = require('blip-deliveries')('-L679TFg97g9bj12e') is Livemode

Registration: You can get a storeID by signing up at www.blip.delivery or contacting sales.

Get a delivery Quote

To get a new delivery quote, use getQuote(options) where options is an object containing a delivery address, and a pickup address.

var blip = require('blip-deliveries')('test'); //Replace 'test' with your storeID to switch to livemode

// Enter the full address along with the locality/sublocality

const quote = await blip.getQuote({
    pickupAddress: "156 Enfield Place, Mississauga, ON",
    deliveryAddress: "3573 Mississauga Rd, Mississauga, ON"
})

Create a delivery request

To create a new delivery request, use createNewDelivery(options) where options is an object containing required delivery details.

var blip = require('blip-deliveries')('test'); //Replace 'test' with your storeID to switch to livemode

// All fields are required

const delivery = await blip.createNewDelivery({
    "delivery": {
        "instructions": "Deliver to the lobby", //Instructions to deliver
        "contact": {
            "name": "John Smith", // Name of the reciever
            "number": "+16479839837" // Number of the reciever
        },
        "location": {
            "address": "156 Enfield Place, Mississauga, ON" // Address of the dropoff point
        }
    },
    "pickup": {
        "order_number": "ABC123", // Your own order number for identifying and tracking
        "instructions": "Pickup from the main desk", // Instructions to pickup
        "contact": {
            "number": "+16478229867" // Pickup point helpline incase driver cannot find you
        },
        "location": {
            "address": "100 City Centre Drive, Missisauga, ON" // Address of the pickup point
        }
    }
})

Cancel delivery

A delivery can only be cancelled if it hasn't already been taken by a driver. Therefore, if a driver is en-route to the pickup point, the delivery cannot be cancelled. We will eventually add support for cancellations before pickup.

To cancel a delivery, use cancelDelivery(options) where options is an object containing the deliveryID of the delivery you want to cancel.

var blip = require('blip-deliveries')('test'); //Replace 'test' with your storeID to switch to livemode

// A deliveryID is required

const cancellation = await blip.cancelDelivery({
    "deliveryID": "ASF781" // Replace with your deliveryID
})

Get delivery status

A delivery object has a status property after being created. It contains the following;

timeTaken The Unix epoch time in seconds when the delivery was accepted by a courier. This is the time at which the courier starts to drive towards the pickup location

pickupETA The Unix epoch time in seconds of an approximate ETA to the pickup point.

timePickedUp The Unix epoch time in seconds when the courier picked up the order from the pickup location

dropoffETA The Unix epoch time in seconds of an approximate ETA to the dropoff point

timeDelivered The Unix epoch time in seconds when the courier delivered the order to the dropoff location

courier The information of the driver currently on your delivery job

To get the current status for a delivery, use getDeliveryStatus(options) where options is an object containing the deliveryID of the delivery

var blip = require('blip-deliveries')('test'); //Replace 'test' with your storeID to switch to livemode

// A deliveryID is required

const status = await blip.getDeliveryStatus({
    "deliveryID": "ASF781" // Replace with your deliveryID
})

Get driver location

After a delivery has been accepted, it contains a courier property. The courier is a driver that has been dispatched, who's location updates every 500-700 meters. This function should not be called more than once every 3 minutes, as doing so may result in excess charges to your account. Furthermore, a status code of 400 will be returned if the deliveryID references a delivery that has not been picked up. To ensure a status code of 200, make sure to call getDeliveryStatus first, and check if it contains a courier property.

To get the currentLocation of your driver, use getDriverLocation(options) where options is an object containing the deliveryID of the delivery to track

var blip = require('blip-deliveries')('test'); //Replace 'test' with your storeID to switch to livemode

// A deliveryID is required

const status = await blip.getDriverLocation({
    "deliveryID": "ASF781" // Replace with your deliveryID
})

Notes

If you'd like to contribute, send an email to [email protected] We're always looking to improve our tools and user experience. If you have any questions or would like new features added, contact [email protected]

Go build something great!