apis-builder

1.3.0 • Public • Published

APIs Builder

前提

一个支持HTTP Requestclient

安装

yarn add apis-builder

使用

teambition为例

yarn add teambition
const apiBuilder = require('apis-builder')
const HttpClient = require('teambition')
const definitions = require('./definitions')

// 前提: HttpClient
apiBuilder.build(HttpClient, definitions)

let sdk = new HttpClient()
let profile = yield sdk.users().me().get()

TODO

  • definitions 定义支持 ajv 进行参数校验
  • 使用 proxy 进行重构

Readme

Keywords

none

Package Sidebar

Install

npm i apis-builder

Weekly Downloads

5

Version

1.3.0

License

ISC

Unpacked Size

24.2 kB

Total Files

7

Last publish

Collaborators

  • leeqiang