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

tookan

v1.3.1

Published

a library to intract with Tookan API v2, referance https://tookanapi.docs.apiary.io/

Downloads

16

Readme

Tookan

Tookan, this project is to intract the application with tookan API's this lib us using v2 of tookan to intagrate with you can find the API on following link https://tookanapi.docs.apiary.io

Config the tookan library

Set the environment variable where we keep the tookan key and the tookan user id

save our tookan key with this env variable

tookan_key

the user id you can get it in your tookan login

tookan_userid

Install

npm i tookan

Initialization

A simple example to create client

let Tookan_help = require("tookan");

All Functions

Get all agents available

just call this method to get the available agents in our tookan

tookan_res = await Tookan_help.get_agents()

Create a Delivery Task

Create a payload as follows

 let payload = {
        order_id: "1582325102",
        job_description: "Its a delivery order for testing the tookan delivery network",
        job_delivery_phone: "19999999999",
        job_delivery_datetime: "09/01/2018 19:00:01",
        job_delivery_address: "Big Streeet, North Earth, Galaxy unknown",
        customer_username: "Mark",
        customer_email: "[email protected]",
    } 

And send this payload to a tookan

tookan_res = await Tookan_help.create_delivery(payload)

Create a Pickup Task

Create a payload as follows

  let payload_pickup = {
        order_id: "1582325101",
        job_description: 'Its a delivery order for testing the tookan delivery network',
        job_pickup_phone: "19999999999",
        job_pickup_datetime: "09/01/2018 19:00:01",
        job_pickup_address: "Big Streeet, North Earth, Galaxy unknown",
        job_pickup_name:  "Mark",
        job_pickup_email: "[email protected]",
    } 

And send this payload to a tookan

tookan_res = await Tookan_help.create_pickup(payload)

Check the task by its job id

Create a payload as follows

let payload = {
        'job_id':"61112352",
    } 

And send this payload to a tookan

tookan_res = await Tookan_help.check_task(payload)

Check the task by its order_id

Create a payload as follows

let payload = {
        'order_id':"1582325102",
    } 

And send this payload to a tookan

tookan_res = await Tookan_help.check_task_by_orderid(payload)

Delete any task either Pickup/Devlivery

Create a payload as follows

let payload = {
        'job_id':"61112352",
    } 

And send this payload to a tookan

tookan_res = await Tookan_help.rm_task(payload)

Edit delivery task

This api used to edit a task that has already been added. Request Body Parameters : Every parameter is same as while creating a task the only parameter that should added while editing a task is job_id which required to identify the task.

Create a Payload as follows

let payload = {
        "job_id":"1582325102",
        "job_delivery_phone": "19999999999",
        "job_delivery_address": "Big Streeet, North Earth, Galaxy unknown",
        "customer_email":"[email protected]",
        "customer_username":"John Doe",
        "customer_phone":"+919999999999",
        "latitude":"28.5494489",
        "longitude":"77.2001368",
        "job_description":"Beauty services",
        "job_delivery_datetime":"2016-09-30 17:00:00",
        "notify": 1
    } 

And send this payload to a tookan

tookan_res = await Tookan_help.edit_delivery_task(payload)

Edit pickup task

This api used to edit a task that has already been added. Request Body Parameters : Every parameter is same as while creating a task the only parameter that should added while editing a task is job_id which required to identify the task.

Create a Payload as follows

let payload = {
        "job_id":"1582325102",
        "job_description":"Beauty services",
        "job_pickup_phone": "19999999999",
        "job_pickup_datetime":"2016-09-30 16:00:00",
        "job_pickup_address": "Big Streeet, North Earth, Galaxy unknown",
        "job_pickup_name":  "Mark",
        "job_pickup_email": "[email protected]",
        "notify": 1
        "auto_assignment":1
        "job_pickup_latitude":"28.5494489",
        "job_pickup_longitude":"77.2001368",
}

And send this payload to a tookan

tookan_res = await Tookan_help.edit_pickup_task(payload)