@tng/soa-node-event
v1.2.0
Published
SOA-Event for Node ================
Downloads
7
Readme
SOA-Event for Node
安装
yarn add @tng/soa-node-event
request 模块
- https://github.com/teambition/tws-auth
- https://github.com/teambition/node-teambition
使用
const SOAEvent = require('@tng/soa-node-event')
const TWSAuth = require('tws-auth')
const Teambition = require('teambition')
// use tws-auth
let twsAuth = new TWSAuth({ ... })
let soaevent = new SOAEvent({ twsAuth: twsAuth })
// use teambition
let teambition = new Teambition({ ... })
let soaevent = new SOAEvent({ teambition: teambition })
// 创建日程
let event = yield soaevent.events().create({
title: 'new event',
startDate: '2018-01-01',
endDate: '2018-01-02',
_creatorId: 'creator id'
})
// 获取日程信息
let eventInfo = yield soaevent.events(event._id).info()
接口
- events()
- .create(data): 创建日程
- .info(): 获取日程详情
- .remove(): 删除日程
- .update(): 更新日程
- .members().update(): 更新日程成员
- .search(): 搜索日程
- .activities().list(): 获取日程动态列表
- .activities().create(): 新建日程动态