textbelt

package module
Version: v1.0.0 Latest Latest
Warning

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

Go to latest
Published: Sep 2, 2015 License: MIT Imports: 5 Imported by: 0

README

textbelt.com API for GO GoDoc Build Status

This library sends text messages using http://textbelt.com

Installing

go get
$ go get gopkg.in/dietsche/textbelt.v1
Example Code
package main

import (
    "gopkg.in/dietsche/textbelt.v1"
)

func main() {
    texter := textbelt.New()
    phoneToText := "123-456-7890"
    if err := texter.Text(phoneToText, "txt msg from go!"); err != nil {
        panic(err)
    }
}

Documentation

Index

Constants

View Source
const (
	// Send text messages to the USA
	TextbeltAPIusa = "http://textbelt.com/text"

	// Send text messages to Canada
	TextbeltAPIcanada = "http://textbelt.com/canada"

	// Send text messages internationally
	TextbeltAPIinternational = "http://textbelt.com/intl"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type Client

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

Client is your entry point into the rest of the library.

func New

func New() *Client

New creates a new client that will use the USA version of http://textbelt.com to send text messages.

func NewClientFromURL

func NewClientFromURL(apiURL string) *Client

NewClientFromURL creates a new client using a url of your choosing.

func (*Client) Text

func (c *Client) Text(phoneNumber string, message string) error

Text sends a text message.

Source Files

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
t or T : Toggle theme light dark auto
y or Y : Canonical URL