plivo

package module
v0.0.0-...-9ed1a79 Latest Latest
Warning

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

Go to latest
Published: Jun 13, 2015 License: MIT Imports: 12 Imported by: 2

README

plivo-go

GoDoc

Cmd

  1. plivoSendMass - 大量發送簡訊
  2. plivoQuickSend - 快速單發簡訊

Docker

Download image

docker pull toomore/plivo-go

Send mass SMS with CSV.

docker run -d -v <local_csv_path>:<container_csv_path> -e PLIVOID=<ID> -e PLIVOTOKEN=<TOKEN> -e PLIVOSRC=<SRC> toomore/plivo-go plivoSendMass -csv=<container_csv_path>

549fc9920a6ec943a86b2f5afc569ef78d54a67e432e11888f0ddf5081158750

Read send logs

docker logs 549fc9920a6ec943a86b2f5afc569ef78d54a67e432e11888f0ddf5081158750

License

The MIT License (MIT)

Copyright © 2015 Toomore Chiang, http://toomore.net/ toomore0929@gmail.com

Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the “Software”), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED “AS IS”, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

http://toomore.mit-license.org/

Documentation

Overview

Package plivo is to send SMS tools.

Index

Examples

Constants

View Source
const PlivoAPI = "https://api.plivo.com/v1/Account"

PlivoAPI URL.

Variables

This section is empty.

Functions

func MakeBulkDst

func MakeBulkDst(dst, sep string) string

MakeBulkDst to format bulk dst numbers.

Example
fmt.Println(MakeBulkDst("1,2,3,4,5", ","))
Output:

1<2<3<4<5

Types

type Account

type Account struct {
	User     string
	Password string
}

Account struct

type Message

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

Message struct

Example
account := &Account{User: TestUser, Password: TestPassword}
msg := NewMessage(TestDst, TestSrc, "Hello 世界!", account)
fmt.Println(msg)
msg.Send()
Output:

<dst: "123456789" src: "886976543210" text: "Hello 世界!" Len: 9>

func NewMessage

func NewMessage(dst, src, text string, account *Account) *Message

NewMessage new a Message.

func (Message) Len

func (m Message) Len() int

Len to show length of Message text.

func (Message) Send

func (m Message) Send()

Send to send SMS.

func (Message) String

func (m Message) String() string

String to print string.

func (Message) URL

func (m Message) URL(urlpath string) string

URL to render api full URL.

Directories

Path Synopsis
cmd
plivoQuickSend
快速單發 Plivo SMS.
快速單發 Plivo SMS.
plivoSendMass
大量發送 Plivo SMS.
大量發送 Plivo SMS.

Jump to

Keyboard shortcuts

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