telesign

package module
v1.0.0 Latest Latest
Warning

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

Go to latest
Published: Aug 29, 2018 License: MIT Imports: 11 Imported by: 0

README

go_telesign

telesign golang SDK

Installation

go get -u github.com/yedamao/go_telesign

Quick Start

custom_id := "id"
api_key := "key"
client := New("https://rest-ww.telesign.com", custom_id, api_key)

resp, err := client.Send("xxxxxxxxxxxxx", "3388", "en-US", "hello, your code is $$CODE$$ .")
if err != nil {
    t.Error(err)
}
log.Println(resp)

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Error

type Error struct {
	Code        int    `json:"code"`
	Description string `json:"description"`
}

type Response

type Response struct {
	ReferenceId string  `json:"reference_id"`
	ResourceUrl string  `json:"resource_uri"`
	SubResponse string  `json:"sub_resource"`
	Status      Status  `json:"status"`
	Errors      []Error `json:"errors"`
}

type RestClient

type RestClient struct {
	// contains filtered or unexported fields
}

func New

func New(endpoint, customer_id, api_key string) *RestClient

func (*RestClient) Send

func (c *RestClient) Send(to, code, lang, template string) (*Response, error)

type Status

type Status struct {
	UpdatedOn   string `json:"updated_on"`
	Code        int    `json:"code"`
	Description string `json:"description"`
}

Jump to

Keyboard shortcuts

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