Skip to content

Commit

Permalink
feat(santai): 补充三态使用文档
Browse files Browse the repository at this point in the history
  • Loading branch information
wangjue666 committed Jun 3, 2024
1 parent 531feef commit 1d909c6
Show file tree
Hide file tree
Showing 2 changed files with 45 additions and 1 deletion.
44 changes: 44 additions & 0 deletions packages/santai/README.md
Original file line number Diff line number Diff line change
@@ -1 +1,45 @@
# `@cn-international-express-sdk/santai`

## 快速对接三态物流

### Install

```
pnpm install --save @cn-international-express-sdk/santai
```

### Usage

```bash

import { SanTai, SanTaiTypes } from "@cn-international-express-sdk/santai";

```
For commonJS
```
const { SanTai } = require("@cn-international-express-sdk/santai");
```
Send a request to the API:
```bash
const sanTai = new SanTai({
app_key: "YOUR_APP_KEY",
app_token: "YOUR_APP_TOKEN",
user_id: "YOUR_USER_ID"
});

// create order

await sanTai.genRequest<SanTaiTypes.AddOrderRes>("addOrder", {
addOrderRequestInfo: sendData,
})

// get ship methods

await sanTai.genRequest<SanTaiTypes.GetShipTypesRes>("getShipTypes", { divisionId: 1,})
```
2 changes: 1 addition & 1 deletion packages/santai/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@cn-international-express-sdk/santai",
"version": "3.0.0",
"version": "3.0.1",
"types": "./dist/types/index.d.ts",
"main": "./dist/lib/index.js",
"module": "./dist/es/index.js",
Expand Down

0 comments on commit 1d909c6

Please sign in to comment.