Skip to content

la3rence/dingtalkbot-sdk

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

DingTalk Robot SDK (Go)

Usage

export DINGTALK_TOKEN="change me"
export DINGTALK_SECRET="change me"

Test sending messages:

go test ./... -v

Send messages with this SDK in Go:

go get -u github.com/Lonor/dingtalkbot-sdk
package main

import (
	sdk "github.com/Lonor/dingtalkbot-sdk"
	"os"
)

func main() {
	bot := sdk.NewDingBot(os.Getenv("DINGTALK_TOKEN"), os.Getenv("DINGTALK_SECRET"))
	_ = bot.SendSimpleText("hello world")
}

LICENSE

MIT