Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings
This repository was archived by the owner on Jul 14, 2022. It is now read-only.
/go-aidaPublic archive

[DEPRECATED] wechat robot based on wechat-go(wechat web api)

NotificationsYou must be signed in to change notification settings

songtianyi/go-aida

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

71 Commits
 
 
 
 
 
 
 
 

Repository files navigation

不再更新,将被重构并集成到wechat-go

go-aida

go-aida是wechat-go的示例项目,包含Restful API和web页面两部分.

区别

  • go-aida是拥有扫码页面的功能性机器人
  • wechat-go实现了微信的API, 并提供了易用的消息框架, 但并不是可运行程序
  • 只需少量代码即可基于wechat-go创建一个属于自己的个性化机器人,对于更复杂的需求(扫码页面等)可以使用go-aida
  • wechat-go专注在API的稳定性/框架的易用性/通用插件这三方面
  • go-aida专注在机器人的个性化定制上

获取代码

mkdir -p $GOPATH/src/golang.org/xcd $GOPATH/src/golang.org/xgit clone https://github.com/golang/net.gitcd $GOPATH/src/github.com/songtianyi/git clone https://github.com/songtianyi/go-aidacd go-aida/restfulgo get ./...go build .

运行api server

./restful

运行web页面

cd ../webnpm installnode index.js

Restful API文档

domainhttp://your.domain:8080

/create

/create创建一个机器人实例
HEADER
PARAMS

Request

GET /create

Response

200 OK8c30a4e9-e949-4d10-b6d6-ef7b60e3af88

/status

/status获取登录状态
HEADER
PARAMS
uuid该session的uuid

Request

GET /status?uuid=8c30a4e9-e949-4d10-b6d6-ef7b60e3af88

Response

200 OK{"status": "CREATED","qrcode": "../public/qrcode/wd_vvLuDWQ==.jpg","plugins": {"laosj": true,"gifer": false},"startTime": 1496749513,}
status意义
CREATED等待用户扫码,此时已拿到二维码
SERVING扫码登录成功

/enable

/enable开启某个插件
HEADER
PARAMS
uuid该session的uuid
name插件名 eg. gifer

Request

PUT /enable?uuid=8c30a4e9-e949-4d10-b6d6-ef7b60e3af88&name=gifer

Response

200 OK

/disable

/disable关闭某个插件
HEADER
PARAMS
uuid该session的uuid
name插件名 eg. gifer

Request

PUT /disable?uuid=8c30a4e9-e949-4d10-b6d6-ef7b60e3af88&name=gifer

Response

200 OK

About

[DEPRECATED] wechat robot based on wechat-go(wechat web api)

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

[8]ページ先頭

©2009-2025 Movatter.jp