Skip to content

le-vlad/turbosms

Repository files navigation

Features

  • Sending message to phone number;
  • Sending message to many phone numbers together;

Description

Is a golang client for SMS Gateway service (turbosms.com.ua)

Usage examples

Creating a new instance

var (
	turboSMS  *TurboSMS
	err       error
)

// username, password must be type string
if turboSMS, err = New(username, password); err != nil {
	t.Fatal(err)
}

Build a message

m := NewMessageBuilder()
message, err = m.SetSign("SignExample").
	SetBody("Message Body").
	SetDestination("+380999999111").
	Build()

Send a message

var (
	turboSMS  *TurboSMS
	messageID string
	err       error
)

// username, password must be type string
if turboSMS, err = New(username, password); err != nil {
	t.Fatal(err)
}

// m = was build by message builder
if messageID, err = turboSMS.SendMessage(m); err != nil {
	t.Fatal(err)
}

TODO

  • Balance checking functionality
  • Getting status of the message functionality

End

About

Golang client for TurboSMS

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages