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.
- 项目地址:github
Usgae
汇联易的开发者文档地址:https://opendocs.huilianyi.com/
$ npm install hlyapi --save配置信息
appId和appSecret需要超级管理员进入到管理后台-> 侧边栏的设置->安全设置才能看到- baseURL: https://api.huilianyi.com // 汇联易webapi请求地址
- appId: 企业ID
- appSecret: 企业密钥
{
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
- Email: yes.heng@icloud.com
- github: https://github.com/CNBlackJ
Change Log
- 2019-06-13:
- token鉴权
- list: 报销单明细增量查询/借款单明细增量查询/报销单报表/费用明细报表/差旅申请报表/差旅申请报表/差旅申请报表