dingrobot

package module
v0.0.0-...-18a295f Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Dec 14, 2017 License: MIT Imports: 4 Imported by: 4 modules, 3 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

README

dingrobot

DingTake Robot API

Prepare DingTalk robot access_token, See my article https://testerhome.com/topics/11217 if you dont know how to get it.

Usage

import "github.com/codeskyblue/dingrobot"

func main(){
    robot := dingrobot.New("xxxxx-access_token-*****")
    // send text message
    robot.Text("Hi")
    // send markdown message
    robot.Markdown("**Hi**")
    // send link
    robot.Link("Google", "Google homepage", "https://www.google.com.hk")

    // At someone
    robot.At("13811223344").Text("test at someone")

    // At all
    robot.AtAll(true).Text("test at all message")
}

TODO

  • FeedCard
  • ActionCard
  • ImageUpload

LICENSE

MIT

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Robot

type Robot struct {
	// contains filtered or unexported fields
}

func New

func New(token string) *Robot

func (*Robot) AtAll

func (r *Robot) AtAll(ok bool) *Robot

func (*Robot) AtMobiles

func (r *Robot) AtMobiles(tels ...string) *Robot
func (r *Robot) Link(title, text string, url string, picUrl string) error

func (*Robot) Markdown

func (r *Robot) Markdown(title string, text string) error

func (*Robot) Text

func (r *Robot) Text(content string) error

Directories

Path Synopsis

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL
⌂ 换网址