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: 2

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