mirror of
https://github.com/kevin-DL/services.git
synced 2026-01-21 15:05:01 +00:00
Generate clients (#206)
This commit is contained in:
18
examples/sms/send/go/sendSms.go
Executable file
18
examples/sms/send/go/sendSms.go
Executable file
@@ -0,0 +1,18 @@
|
||||
package example
|
||||
|
||||
import (
|
||||
"fmt"
|
||||
"github.com/micro/services/clients/go/sms"
|
||||
"os"
|
||||
)
|
||||
|
||||
// Send an SMS.
|
||||
func SendSms() {
|
||||
smsService := sms.NewSmsService(os.Getenv("MICRO_API_TOKEN"))
|
||||
rsp, err := smsService.Send(&sms.SendRequest{
|
||||
From: "Alice",
|
||||
Message: "Hi there!",
|
||||
To: "+447681129",
|
||||
})
|
||||
fmt.Println(rsp, err)
|
||||
}
|
||||
Reference in New Issue
Block a user