# auto-pi

> send http request easier by openApi

Latest version **0.1.7** (published 2023-12-06) · MIT License license · 0 weekly downloads

## Install

```sh
npm install auto-pi
pnpm add auto-pi
yarn add auto-pi
bun add auto-pi
```

## Health

**Score 25/100 (F)** — status: abandoned.

Positive: has types; esm support; no vulnerabilities.

Warnings: low downloads; pre 1.0.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 0.1.7 |
| Published | 2023-12-06 |
| First published | 2023-08-09 |
| Weekly downloads | 0 |
| License | MIT License |
| TypeScript types | bundled |
| Module format | ESM + CommonJS |
| Dependencies | 1 |
| Unpacked size | 23.8 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 1 |
| Author | ChuanLinRabbit |
| Maintainers | izeya |
| Keywords | utils, http, axios, openApi |

## Links

- npm: https://www.npmjs.com/package/auto-pi
- Repository: https://github.com/ChuanLinRabbit/AutoPi
- npm.io page: https://npm.io/package/auto-pi

## Dependencies (1)

- [qs](https://npm.io/package/qs.md) ^6.11.2

## Alternatives

- [launchdarkly-js-client-sdk](https://npm.io/package/launchdarkly-js-client-sdk.md) — 2.5M weekly downloads
- [@elastic/elasticsearch](https://npm.io/package/@elastic/elasticsearch.md) — 2.1M weekly downloads
- [@c8y/client](https://npm.io/package/@c8y/client.md) — 15.3K weekly downloads
- [@signaldb/maverickjs](https://npm.io/package/@signaldb/maverickjs.md) — 1.7K weekly downloads
- [@bbc/http-transport-cache](https://npm.io/package/@bbc/http-transport-cache.md) — 1.2K weekly downloads

## Recent versions

- 0.1.7 (latest) — 2023-12-06
- 0.1.6 — 2023-12-06
- 0.1.5 — 2023-12-06
- 0.1.4 — 2023-12-06
- 0.1.3 — 2023-12-06
- 0.1.2 — 2023-12-06
- 0.1.1 — 2023-08-09
- 0.1.0 — 2023-08-09

## README

AutoPi_0.1.2
===
安装
---
`npm i auto-pi`

使用
---
```javascript
import {useAutoAxios} from "auto-pi"

const autoAxios = useAutoAxios(axiosInstance, API)
```
api文档
---
```javascript
/**
 * 创建autoAxios实例
 * @param axiosInstance 通过axios.create创建的实列
 * @param openApiJsonDataList openApi配置文件v2链表
 * @return {AutoAxios}
 */
export function useAutoAxios(axiosInstance: axiosInstance, openApiJsonDataList: apiDocs[]): AutoAxios;

/**
 * 发送请求
 * @param url 请求路径
 * @param data 发送数据，不关心位置，自动分配
 * @param tempConfig 覆盖axios的属性，一般不传
 */
autoAxios.sendAxios(url: string, data: object|array, tempConfig: object): Promise<unknown>;

/**
 * 批量发送请求
 * @param {[{url,data,tempConfig}]} arr
 */
autoAxios.sendAll(arr: [{url;data;tempConfig;}]): Promise<any>;

/**
 * 以formData形式发送文件(不入队列)
 */
autoAxios.sendFile(url: string, data: object, tempConfig: object): Promise<any>;
```

---
_Source: https://npm.io/package/auto-pi · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
