https://github.com/moonwalker/gowiraya
https://github.com/moonwalker/gowiraya
backend
Last synced: 3 months ago
JSON representation
- Host: GitHub
- URL: https://github.com/moonwalker/gowiraya
- Owner: moonwalker
- License: mit
- Created: 2018-03-13T11:44:26.000Z (over 8 years ago)
- Default Branch: master
- Last Pushed: 2024-04-05T08:28:48.000Z (about 2 years ago)
- Last Synced: 2025-01-01T02:18:41.768Z (over 1 year ago)
- Topics: backend
- Language: Go
- Homepage:
- Size: 15.6 KB
- Stars: 0
- Watchers: 11
- Forks: 0
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# GoWiraya
Go library for sending SMS with Wiraya.
Note that the ip needs to be whitelisted at Wiraya.
## Usage
```go
client, err := gowiraya.NewWirayaClient("xapikey")
if err != nil {
fmt.Println(err)
return
}
data := gowiraya.SendMessage{
Recipient: "4612345678",
Sender: "Test",
Message: "This is the message",
}
resp, err := client.SendMessageFromAlpha(data)
if err != nil {
fmt.Println(err)
return
}
data2 := gowiraya.MessageStatus{
MessageId: resp.Result,
}
resp2, err := client.GetMessageStatus(data2)
if err != nil {
fmt.Println(err)
return
}
fmt.Println("Status for message: " + resp2.Result)
```