# egg-pop-core

> The core SDK of Aliyun POP API.

Latest version **1.0.1** (published 2020-06-26) · MIT license · 0 weekly downloads

## Install

```sh
npm install egg-pop-core
pnpm add egg-pop-core
yarn add egg-pop-core
bun add egg-pop-core
```

## Health

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

Positive: has types; no vulnerabilities; high quality score.

Warnings: low downloads; no esm support.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 1.0.1 |
| Published | 2020-06-26 |
| First published | 2020-06-26 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | bundled |
| Module format | CommonJS |
| Node | >=8.0.0 |
| Dependencies | 1 |
| Unpacked size | 7.9 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 1 |
| Author | Harold3c2 |
| Maintainers | hezhuowei |
| Keywords | egg, eggPlugin, egg-plugin, typescript |

## Links

- npm: https://www.npmjs.com/package/egg-pop-core
- Repository: https://github.com/hezhuowei/egg-pop-core
- Homepage: https://github.com/hezhuowei/egg-pop-core#readme
- Issues: https://github.com/hezhuowei/egg-pop-core/issues
- npm.io page: https://npm.io/package/egg-pop-core

## Dependencies (1)

- [@alicloud/pop-core](https://npm.io/package/@alicloud/pop-core.md) ^1.7.9

## Alternatives

- [@openai/codex-sdk](https://npm.io/package/@openai/codex-sdk.md) — 731.4K weekly downloads
- [babel-plugin-transform-react-jsx](https://npm.io/package/babel-plugin-transform-react-jsx.md) — 565.0K weekly downloads
- [babel-helper-remove-or-void](https://npm.io/package/babel-helper-remove-or-void.md) — 508.5K weekly downloads
- [@pnpm/store-controller-types](https://npm.io/package/@pnpm/store-controller-types.md) — 186.9K weekly downloads
- [react-native-signature-canvas](https://npm.io/package/react-native-signature-canvas.md) — 155.6K weekly downloads

## Recent versions

- 1.0.1 (latest) — 2020-06-26
- 1.0.0 — 2020-06-26

## README

# egg-pop-core

[![NPM version][npm-image]][npm-url]
[![build status][travis-image]][travis-url]
[![Test coverage][codecov-image]][codecov-url]
[![David deps][david-image]][david-url]
[![Known Vulnerabilities][snyk-image]][snyk-url]
[![npm download][download-image]][download-url]

[npm-image]: https://img.shields.io/npm/v/egg-pop-core.svg?style=flat-square
[npm-url]: https://npmjs.org/package/egg-pop-core
[travis-image]: https://img.shields.io/travis/eggjs/egg-pop-core.svg?style=flat-square
[travis-url]: https://travis-ci.org/eggjs/egg-pop-core
[codecov-image]: https://img.shields.io/codecov/c/github/eggjs/egg-pop-core.svg?style=flat-square
[codecov-url]: https://codecov.io/github/eggjs/egg-pop-core?branch=master
[david-image]: https://img.shields.io/david/eggjs/egg-pop-core.svg?style=flat-square
[david-url]: https://david-dm.org/eggjs/egg-pop-core
[snyk-image]: https://snyk.io/test/npm/egg-pop-core/badge.svg?style=flat-square
[snyk-url]: https://snyk.io/test/npm/egg-pop-core
[download-image]: https://img.shields.io/npm/dm/egg-pop-core.svg?style=flat-square
[download-url]: https://npmjs.org/package/egg-pop-core

support typescript

## Install

```bash
$ npm i egg-pop-core --save
```

## Configuration

```js
// {app_root}/config/config.default.js
exports.popCore = {
  client: {
    accessKeyId: "accessKeyId",
    accessKeySecret: "accessKeySecret",
    apiVersion: "2017-05-25",
    endpoint: "https://dysmsapi.aliyuncs.com",
  },
};
```

### Multiple client

```js
// {app_root}/config/config.default.js
exports.popCore = {
  clients: {
    client1: {
      accessKeyId: "accessKeyId",
      accessKeySecret: "accessKeySecret",
      apiVersion: "2017-05-25",
      endpoint: "https://dysmsapi.aliyuncs.com",
    },
    client2: {
      accessKeyId: "accessKeyId",
      accessKeySecret: "accessKeySecret",
      apiVersion: "2017-05-25",
      endpoint: "https://dysmsapi.aliyuncs.com",
    },
    //...
  },
};
```

```js
// {app_root}/config/plugin.js
exports.popCore = {
  enable: true,
  package: "egg-pop-core",
};
```

## Usage

```js
const param = {
  SignName: "name",
  TemplateCode: "SMS_11111111",
  TemplateParam: JSON.stringify({ code }),
  PhoneNumbers: "156xxxxxxxx",
};
const res = await app.popCore.request("SendSms", param, { method: "POST" });
console.log(res);
```

see [config/config.default.js](config/config.default.js) for more detail.

## Questions & Suggestions

Please open an issue [here](https://github.com/eggjs/egg/issues).

## License

[MIT](LICENSE)

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