JSPM

hlyapi

0.0.1
  • ESM via JSPM
  • ES Module Entrypoint
  • Export Map
  • Keywords
  • License
  • Repository URL
  • TypeScript Types
  • README
  • Created
  • Published
  • Downloads 12
  • Score
    100M100P100Q25366F
  • License ISC

汇联易 webapi sdk

Package Exports

  • hlyapi

This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (hlyapi) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.

Readme

汇联易webapi nodejs SDK

huilianyi webapi nodejs sdk.

Usgae

汇联易的开发者文档地址:https://opendocs.huilianyi.com/

  • $ npm install hlyapi --save

  • 配置信息

    appIdappSecret需要超级管理员进入到管理后台 -> 侧边栏的设置 -> 安全设置 才能看到

{
  baseURL: 'https://api.huilianyi.com',
  appId: 'i am app id from huilianyi',
  appSecret: 'i am app secret from huilianyi'
}
const HlyApi = require('hlyapi')
const config = require('config').huilianyi // 配置信息参照上面⬆️

const hlyApi = new HylApi(config)

hlyApi.auth().then(token => {
  // cookie 建议本地缓存 避免每次请求都重新获取
  hlyApi.listExpenseReport({
    // 报销单明细增量查询
    startDate: '2018-01-03 17:32:31',
    endDate: '2018-06-24 16:56:32'
  }, token).then(res => {
    console.log(res.data)
  })
})
// 支持await
const HlyApi = require('hlyapi')
const config = require('config').huilianyi // 配置信息参照上面⬆️

const hlyApi = new HylApi(config)
const authToken = await hlyApi.auth()
const options = {
  startDate: '2018-01-03 17:32:31',
  endDate: '2018-06-24 16:56:32'
}
const result = await hlyApi.listExpenseReport(options)
console.log(result.data)

Contact

Change Log

  • 2019-06-13: 
    • token鉴权
    • list: 报销单明细增量查询/借款单明细增量查询/报销单报表/费用明细报表/差旅申请报表/差旅申请报表/差旅申请报表