Giter Club home page Giter Club logo

rose-notify's Introduction

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)
    }
}

rose-notify's People

Contributors

leafney avatar

Watchers

 avatar

rose-notify's Issues

优化方法调用

  • 支持链式调用
  • 优化初始化时参数配置,去除默认host
  • 统一 key / token / secret 的名称
  • 统一调用方法

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.