func voice_status() { sender := luosimao.NewVoiceSender(voiceAuth, luosimao.JSON) resp, err := sender.Status(1000) if err != nil { fmt.Println(err.Error()) } else { b, _ := json.Marshal(resp) fmt.Println(string(b)) fmt.Println(resp.ErrorDescription()) } }
func send_voice(mobile string, code int32) { sender := luosimao.NewVoiceSender(voiceAuth, luosimao.JSON) resp, err := sender.Send(luosimao.VoiceRequest{Mobile: mobile, Code: code}, 1000) if err != nil { fmt.Println(err.Error()) } else { b, _ := json.Marshal(resp) fmt.Println(string(b)) fmt.Println(resp.ErrorDescription()) } }