Skip to content

Latest commit

 

History

History
32 lines (26 loc) · 783 Bytes

README.md

File metadata and controls

32 lines (26 loc) · 783 Bytes

license documentation

Netgsm.go

An easy-to-use netgsm.com.tr API with golang

Installation

go get github.com/ozgur-yalcin/netgsm.go

Usage

package main

import (
	"encoding/xml"
	"fmt"

	netgsm "github.com/ozgur-yalcin/netgsm.go/src"
)

func main() {
	api, req := netgsm.Api("header", "username", "password")
	req.Body.Msg = "test"
	req.Body.No = "905555555555"
	res := api.Sms(req) // Normal sms
	// res := api.Otp(req) // Hızlı sms
	pretty, _ := xml.MarshalIndent(res, " ", " ")
	fmt.Println(string(pretty))
}