iys.org.tr (İleti Yönetim Sistemi) Golang API
go get github.com/ozgur-yalcin/iys
package main
import (
"time"
iys "github.com/ozgur-yalcin/iys/src"
)
func main() {
api := new(iys.API)
api.Config = iys.Config{
BaseURL: "https://api.sandbox.iys.org.tr",
UserCode: "123456",
BrandCode: "123456",
Username: "[email protected]",
Password: "pass",
}
auth := api.Authorize()
if auth {
request := new(iys.Request)
request.Recipient = "[email protected]" // Alıcı adresi
request.RecipientType = iys.Individual // Alıcı türü
request.ConsentSource = iys.Web // Adres kaynağı
request.ConsentType = iys.Mail // İzin türü
request.ConsentStatus = iys.Accept // İşlem türü
zone, _ := time.LoadLocation("Europe/Istanbul") // Saat dilimi
request.ConsentDate = time.Now().In(zone).Format("2006-01-02 15:04:05") // İzin tarihi
api.CreateConsent(request)
}
}
package main
import (
"time"
iys "github.com/ozgur-yalcin/iys/src"
)
func main() {
api := new(iys.API)
api.Config = iys.Config{
BaseURL: "https://api.sandbox.iys.org.tr",
UserCode: "123456",
BrandCode: "123456",
Username: "[email protected]",
Password: "pass",
}
auth := api.Authorize()
if auth {
request := new(iys.Request)
request.Recipient = "+905055555555" // Alıcı adresi
request.RecipientType = iys.Individual // Alıcı türü
request.ConsentSource = iys.Web // Adres kaynağı
request.ConsentType = iys.Sms // İzin türü
request.ConsentStatus = iys.Accept // İşlem türü
zone, _ := time.LoadLocation("Europe/Istanbul") // Saat dilimi
request.ConsentDate = time.Now().In(zone).Format("2006-01-02 15:04:05") // İzin tarihi
api.CreateConsent(request)
}
}
package main
import (
"time"
iys "github.com/ozgur-yalcin/iys/src"
)
func main() {
api := new(iys.API)
api.Config = iys.Config{
BaseURL: "https://api.sandbox.iys.org.tr",
UserCode: "123456",
BrandCode: "123456",
Username: "[email protected]",
Password: "pass",
}
auth := api.Authorize()
if auth {
request := new(iys.Request)
request.Recipient = "+905055555555" // Alıcı adresi
request.RecipientType = iys.Individual // Alıcı türü
request.ConsentSource = iys.Web // Adres kaynağı
request.ConsentType = iys.Call // İzin türü
request.ConsentStatus = iys.Accept // İşlem türü
zone, _ := time.LoadLocation("Europe/Istanbul") // Saat dilimi
request.ConsentDate = time.Now().In(zone).Format("2006-01-02 15:04:05") // İzin tarihi
api.CreateConsent(request)
}
}