alidayu

package
v0.0.0-...-2083224 Latest Latest
Warning

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

Go to latest
Published: Jun 8, 2021 License: Apache-2.0 Imports: 10 Imported by: 0

README

alidayu

fork from github.com/ltt1987/alidayu, just for alidayu sms send

阿里大鱼Go语言开发包。One Golang package for alidayu service.

阿里大鱼API说明文档:http://open.taobao.com/doc2/apiDetail.htm?spm=0.0.0.0.bkKKhG&apiId=25450
官网:http://alidayu.com

###使用方法:

  • 发送短信:alidayu.SendSMS

func main() {
	alidayu.AppKey = "...your AppKey..."
	alidayu.AppSecret = "...your AppSecret..."

	success, resp := alidayu.SendSMS("18888888888", "身份验证", "SMS_4000328", `{"code":"1234","product":"alidayu"}`)
	fmt.Println("Success:", success)
	fmt.Println(resp)
}

Documentation

Index

Constants

View Source
const (
	// URL alidayu url
	URL string = "http://gw.api.taobao.com/router/rest"
	// MethodSendSMS send sms
	MethodSendSMS string = "alibaba.aliqin.fc.sms.num.send"
	// MethodCallTTS call tts
	MethodCallTTS string = "alibaba.aliqin.fc.tts.num.singlecall"
	// MethodCallVoice call voice
	MethodCallVoice string = "alibaba.aliqin.fc.voice.num.singlecall"
	// MethodCallDouble call double
	MethodCallDouble string = "alibaba.aliqin.fc.voice.num.doublecall"
)

Variables

View Source
var AppKey string

AppKey app key

View Source
var AppSecret string

AppSecret app secret

Functions

func DoPost

func DoPost(m map[string]string) (success bool, response string)

DoPost post data 2 alidayu

func SendSMS

func SendSMS(recNum, smsFreeSignName, smsTemplateCode, smsParam string) (success bool, response string)

SendSMS send sms by alidayu

Types

This section is empty.

Jump to

Keyboard shortcuts

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