Skip to content

leafney/rose-notify

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

36 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

rose-notify

Webhook-based message notification service


Support

  • DingTalk
  • FeiShu
  • WoChat (企业微信)
  • Bark
  • Chanify
  • PushDeer
  • Slack
  • 息知
  • Telegram
  • Discord
method default host custom host need token/key support secret support text support title support markdown details
DingTalk README
FeiShu README
WoChat README
Bark README
Chanify README
PushDeer README
息知 README
Slack README
Telegram README

How to use

single support

func main() {
	// initialization
	bot := NewDingTalk("token")
	
	// Chain call to set secret
	bot.SetDebug(true).UseSecret("secret")

	// Call the generic method
	err := bot.SendText("Hello World!")
	
	// call unique method
	err := bot.SendTextAt("hello", []string{}, true)

	// Use the new token to call the general method
	err := bot.UseToken("another token").SendText("你好")
}

Multiple support

func main() {
    // use dingtalk :
    n := dingtalk.NewDingTalk("token").UseSecret("secret")
    // or use bark :
    n := bark.NewBark("token").SetDebug(true).SetAutoCopy(true)
    // or use slack : 
    n := slack.NewSlack("token")
    
    ner := NewNotify(n)
    if err := ner.SendNotify("Hello World!"); err != nil {
    t.Log(err)
    }
}

About

Webhook-based message notification service (基于webhook的消息通知服务)

Topics

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages