Skip to content

wildsurfer/turbosms-go

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

turbosms-go

Golang implementation of Turbosms gateway https://turbosms.ua/ua/soap.html. Built on top of code generated by https://github.com/hooklift/gowsdl tool.

Examples

package main

import (
	"fmt"
	sms "github.com/wildsurfer/turbosms-go"
	"log"
)

func main() {
	c := sms.NewClient("username", "password")
	r, err := c.GetCreditBalance()

	if err != nil {
		log.Fatal(err)
	} else {
		fmt.Printf("Credit balance: %s\n", r.GetCreditBalanceResult)
	}
}
package main

import (
	"fmt"
	sms "github.com/wildsurfer/turbosms-go"
	"log"
)

func main() {
	c := sms.NewClient("username", "password")
	r, err := c.SendSMS("testname", "+123469563457", "Test message", "")

	if err != nil {
		log.Fatal(err)
	} else {
		fmt.Printf("Result: %v\n", r.SendSMSResult)
	}
}

Debug

func main() {
    c := sms.NewClient("myusername", "mypassword")
    c.Debug = true
    
    ...
}

About

Golang implementation of Turbosms gateway https://turbosms.ua/ua/soap.html

Resources

Stars

Watchers

Forks

Packages

No packages published

Languages