textmagic

package
v0.0.0-...-e1b3a39 Latest Latest
Warning

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

Go to latest
Published: Aug 30, 2022 License: BSD-2-Clause Imports: 5 Imported by: 0

README

TextMagic

Provider

To configure the TextMagic provider, you need to specify a username and an API key.

providers:
  textmagic:
    username: 'donaldduck'
    api_key: 'JNV7NgCKNzQVXNOEpZxwU4c9blGEfF'

You can find your username and API key by going to https://my.textmagic.com/online/api/rest-api/keys.

The TextMagic provider supports SMS text messages only.

A TextMagic trial account can be created at https://www.textmagic.com/.

You can test the TextMagic API without spending SMS credits by using a mobile number that beings with 999. For example, 999742033616, 999742033617, and so on.

Receivers

To configure a TextMagic receiver you must specify a list of targets. The from field is optional.

receivers:
  - name: 'team1'
    provider: textmagic
    to:
      - '+999742033616'
      - '+999742033617'
  - name: 'team2'
    provider: textmagic
    to:
      - '+999742033616'
      - '+999742033617'
    from: '08039591643'

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Config

type Config struct {
	Username string `yaml:"username"`
	APIKey   string `yaml:"api_key"`
}

type TextMagic

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

func NewTextMagic

func NewTextMagic(config Config) *TextMagic

func (*TextMagic) Send

func (tm *TextMagic) Send(message sachet.Message) (err error)

Jump to

Keyboard shortcuts

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