messagebird

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: 7 Imported by: 0

README

MessageBird

Provider

To configure the MessageBird provider, you need to specify an access key.

providers:
    messagebird:
        access_key: 'live_qKwVZ02ULV70GqabBYxLU8d5r'
        debug: true
        gateway: 240
        language: en-us
        voice: female
        repeat: 2

The MessageBird provider supports text and voice messages. For text messages you can configure the following parameters (see https://developers.messagebird.com/api/sms-messaging):

  • gateway: an integer specifying the SMS gateway

For voice messages you can configure the following parameters (see https://developers.messagebird.com/api/voice-messaging/):

  • language: specifies the language in which the message needs to be read to the recipient
  • voice: specifies the voice in which the message needs to be read to the recipient
  • repeat: specifies the number of times the message needs to be repeated

Receivers

To configure a MessageBird receiver you must specify a list of targets. By default text messages are send, but you can specify a voice message by setting type: voice for a receiver. The type defaults to text. The from field is not used for voice messages.

receivers:
- name: 'team1'
    provider: messagebird
    to:
      - '+919742033616'
      - '+919742033617'
    type: voice
- name: 'team2'
    provider: messagebird
    to:
      - '+919742033616'
      - '+919742033617'
    from: '08039591643'
    type: text

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Config

type Config struct {
	AccessKey string `yaml:"access_key"`
	Gateway   int    `yaml:"gateway"`
	Debug     bool   `yaml:"debug"`
	Language  string `yaml:"language"`
	Voice     string `yaml:"voice"`
	Repeat    int    `yaml:"repeat"`
}

type MessageBird

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

func NewMessageBird

func NewMessageBird(config Config) *MessageBird

func (*MessageBird) Send

func (mb *MessageBird) Send(message sachet.Message) (err error)

Jump to

Keyboard shortcuts

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