Skip to content

thexdev/biteship-nodejs

Folders and files

NameName
Last commit message
Last commit date

Latest commit

25da46f Β· Sep 8, 2023

History

40 Commits
Aug 26, 2023
Aug 26, 2023
Sep 8, 2023
Sep 8, 2023
Aug 21, 2023
Aug 21, 2023
Aug 21, 2023
Aug 21, 2023
Sep 8, 2023
Aug 21, 2023
Aug 21, 2023
Aug 25, 2023
Aug 21, 2023

Repository files navigation

biteship-nodejs

@thexdev/biteship-nodejs is unofficial NodeJS client for interacting with Biteship API. Since Biteship does not provide package to interact with their API so, I created this simple wrapper for our convenient. Enjoy! πŸš€ 🚚

Getting Started

Before we go, let's ensure you are ready. First, you must ensure your node version is ^18.x because this package is internally use Headers object. After that, please setup your Biteship API Key. Finish? Then, we are ready to go.

Installation

The installation is simple! Just run this command.

npm i @thexdev/biteship-node

How to Use

πŸ’‘ You can also find useful example here.

We need to use the Biteship and command class to perform a specific task. For example if we want to search some areas we can use the RetreiveArea command.

// Using TypeScript
import { Biteship, RetreiveArea } from '@thexdev/biteship-nodejs';

// or using CommonJS
const { Biteship, RetrieveArea } = require('@thexdev/biteship-nodejs');

const biteship = new Biteship(process.env.BITESHIP_API_KEY);

biteship.send(new RetriveArea({ input: 'Jakarta' })).then(console.log);
// See the example result: https://biteship.com/en/docs/api/maps/retrieve_area_single

I though this way looks better instead of calling the raw API using fetch or axios and handle each request manually πŸ˜…. For the command arguments, you can find it all on Biteship official documentation.

List of Commands

  • CreateOrder
  • DeleteOrder
  • RetrieveArea
  • RetrieveCourierRates
  • RetrieveOrder
  • RetrieveTracking
  • SearchRates
  • UpdateOrder

Want to Support Me?

All your support is much appreciated πŸ™