opes

package module
v1.0.3 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: May 2, 2020 License: MIT Imports: 13 Imported by: 0

README

opes-go

OPES MT-SMS API client for go

Documentation

Index

Constants

View Source
const (
	StatusSuccess              = 200
	StatusAuthenticationFailed = 416
	StatusGeneralError         = 406
)

Message response code

Variables

This section is empty.

Functions

This section is empty.

Types

type Message

type Message struct {
	ID      interface{} `json:"msg_id"`
	Sender  string      `json:"sender"`
	Channel int         `json:"channel"`
	Text    string      `json:"text"`
	MSISDN  string      `json:"msisdn"`
}

Message ...

type SMSResponses

type SMSResponses []struct {
	ResultCode int    `json:"result_code"`
	Result     string `json:"result"`
	Reference  string `json:"reference"`
	Message    string `json:"message"`
}

SMSResponses response

type Service

type Service struct {
	Auth   *auth
	Client *http.Client
}

Service domain implementation for opes SMS API.

func NewSMSService

func NewSMSService() *Service

NewSMSService ...

func (Service) Send

func (s Service) Send(msgs ...Message) SMSResponses

Send message

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL