https://github.com/sqlwwx/tuling123-client
https://github.com/sqlwwx/tuling123-client
Last synced: about 1 year ago
JSON representation
- Host: GitHub
- URL: https://github.com/sqlwwx/tuling123-client
- Owner: sqlwwx
- Created: 2018-05-31T11:06:39.000Z (about 8 years ago)
- Default Branch: master
- Last Pushed: 2018-05-31T15:39:40.000Z (about 8 years ago)
- Last Synced: 2025-04-22T23:49:10.536Z (about 1 year ago)
- Language: CoffeeScript
- Size: 3.91 KB
- Stars: 2
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# tuling123-client
## Installation
```shell
npm install tuling123-client
```
## Getting Started
```
Robot = require 'tuling123-client'
robot = new Robot(
'0a4114ff7687944016c9d50a07eb0f250',
'http://www.tuling123.com/openapi/api',
(info, options) ->
if info.startsWith '#'
'start command ' + info.substr 1
else
null
)
robot.ask('你好', userid: 'wwx').then console.log
robot.ask('#list', userid: 'wwx').then console.log
robot.ask('#list', userid: 'wwx', (info, options) ->
if info.startsWith '#'
'start command ' + info.substr(1) + ' for ' + options.userid
else
null
).then console.log
```