in progress

This commit is contained in:
2026-01-31 19:30:41 +03:00
parent c62ca01584
commit 69ec3a6050
7 changed files with 267 additions and 2 deletions

24
sms.go Normal file
View File

@@ -0,0 +1,24 @@
package smsc
const (
UrlSMS = "https://smsc.ru/rest/send/"
)
type RequestSMS struct {
ApiKey string `json:"apikey"`
Phone string `json:"phones"`
Message string `json:"mes"`
}
type ResponseSMS struct {
Response
ID int `json:"id"`
Cnt int `json:"cnt"`
}
func SendSMS(req RequestSMS) (resp ResponseSMS) {
if err := requestPost(UrlSMS, req, &resp); err != nil {
resp.Error = err.Error()
}
return
}