New Research: Supply Chain Attack on Axios Pulls Malicious Dependency from npm.Details →
Socket
Book a DemoSign in
Socket

egg-aliyun-openapi

Package Overview
Dependencies
Maintainers
1
Versions
5
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

egg-aliyun-openapi

eggjs plugin for invoke aliyun openapi, wrapper of OpenAPI POP core SDK for Node.js

latest
Source
npmnpm
Version
1.2.1
Version published
Maintainers
1
Created
Source

egg-aliyun-openai

eggjs plugin for invoke aliyun openapi, wrapper of OpenAPI POP core SDK for Node.js

NPM version Build Status codecov David deps Known Vulnerabilities npm download

Quality gate

Functionality

  • vod

Install

$ npm i egg-aliyun-openapi --save

Usage

  • Enable it on plugin configuration:
// {app_root}/config/plugin.[t|j]s
exports.aliyunOpenApi = {
  enable: true,
  package: "egg-aliyun-openapi"
};
  • Configure the access key, access secret, and the mount paths:
// {app_root}/config/config.default.[t|j]s
exports.aliyunOpenApi = {
  key: "your access key id",
  secret: "your secret access key",
  regionId: 'cn-shanghai',
  apiVersion: '2017-03-21',
  mount: {
    vod: '/aliyun-openapi/vod'
  }
};

see config/config.default.ts for more detail.

  • You can call it from client side now:
const res = await app
            .httpRequest()
            .get('/aliyun-openapi/vod?action=GetVideoPlayAuth&videoId=1234')
            .expect(200)

assert.deepStrictEqual(res.body.PlayAuth, 'sstyYuew678999ew90000000xtt7TYUh')

Questions & Suggestions

Please open an issue here.

License

MIT

Test

npm run test-local

Release Notes:

  • 1.0.0: proxy aliyun vod product
  • 1.1.0: proxy ali green
  • 1.2.0: Allow pass PlayConfig to vod

Keywords

egg

FAQs

Package last updated on 19 Nov 2019

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts