Skip to content

oliverkirk-root/FreeClover

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

11 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

FreeClover

基于Go的OpenShamrock登录框架,兼容OpenShamrock的接口

连接方式

  • HTTP
  • 被动HTTP
  • 主动WebSocket
  • 被动WebSocket

使用方法

安装

go get github.com/oliverkirk-sudo/FreeClover

package main

import (
	"github.com/duke-git/lancet/v2/formatter"
	"github.com/oliverkirk-sudo/FreeClover/client"
	entity "github.com/oliverkirk-sudo/FreeClover/entity/openshamrock"
)

func main() {
	bot := client.GetAdapterClient()
	bot.WithOpenShamrockHttpClient("http:https://192.168.2.181:5801", "auth_token")

	ad := bot.HttpAdapter //http适配器

	msgList := ad.Message.AppendMessageList(
		ad.Message.Plain("测试文本"),
		ad.Message.Face(123),
	)
	resp := ad.Api.Message.SendPrivateMessage(00000,false,msgList)
	pretty, err := formatter.Pretty(resp)
	if err != nil {
		return
	}
	println(pretty)
}

许可证

AGPL-3.0

About

基于Golang的OpenShamrock适配器

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Go 100.0%