1.0.0 • Published 3 years ago

@snapp-store/snapp-box-sdk v1.0.0

Weekly downloads
-
License
MIT
Repository
github
Last release
3 years ago

snapp-box-sdk

snapp-box SDK is a Typescript library for dealing with app.snpb.ir 3rd party api 🛵.

Installation

Use the package manager npm to install snapp-box-sdk.

npm install @snapp-store/snapp-box-sdk

Usage

Pass your API key and environment between "staging" or "production" to snapp-box class and create an instance of it.

import SnappBox from '@snapp-store/snapp-box-sdk';

const snappBox = new SnappBox('<YOUR_snapp-box_API_KEY>', 'staging');

const someFancyFunction = async () => {
  // some loginc here

  const accountBalance = await snappBox.methods.getAccountBalance();

  return accountBalance;
};

Available Methods

  • getAccountBalance()
  • createOrder(CreateOrderRequest)
  • cancelOrder(CancelOrderRequest)
  • getOrderList(GetOrderListRequest)
  • getPrice(GetPriceRequest)
  • getOrderDetailsV2(id)
  • getCities()
  • updateOrder(UpdateOrderRequest)
  • verification(Verification)

Contributing

Pull requests are welcome. For major changes, please open an issue first to discuss what you would like to change.

Please make sure to update tests as appropriate.

License

MIT