sms

package
v5.3.0+incompatible Latest Latest
Warning

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

Go to latest
Published: Jul 3, 2019 License: BSD-2-Clause Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ListParams

type ListParams struct {
	Originator string
	Direction  string
	Type       string
	Limit      int
	Offset     int
}

ListParams provides additional message list options.

type Message

type Message struct {
	ID                string
	HRef              string
	Direction         string
	Type              string
	Originator        string
	Body              string
	Reference         string
	Validity          *int
	Gateway           int
	TypeDetails       TypeDetails
	DataCoding        string
	MClass            int
	ReportURL         string
	ScheduledDatetime *time.Time
	CreatedDatetime   *time.Time
	Recipients        messagebird.Recipients
}

Message struct represents a message at MessageBird.com

func Create

func Create(c *messagebird.Client, originator string, recipients []string, body string, msgParams *Params) (*Message, error)

Create creates a new message for one or more recipients.

func Delete

func Delete(c *messagebird.Client, id string) (*Message, error)

Cancel sending Scheduled Sms

func Read

func Read(c *messagebird.Client, id string) (*Message, error)

Read retrieves the information of an existing Message.

type MessageList

type MessageList struct {
	Offset     int
	Limit      int
	Count      int
	TotalCount int
	Links      map[string]*string
	Items      []Message
}

MessageList represents a list of Messages.

func List

func List(c *messagebird.Client, msgListParams *ListParams) (*MessageList, error)

List retrieves all messages of the user represented as a MessageList object.

type Params

type Params struct {
	Type              string
	Reference         string
	Validity          int
	Gateway           int
	TypeDetails       TypeDetails
	DataCoding        string
	ReportURL         string
	ScheduledDatetime time.Time
}

Params provide additional message send options and used in URL as params.

type TypeDetails

type TypeDetails map[string]interface{}

TypeDetails is a hash with extra information. Is only used when a binary or premium message is sent.

Jump to

Keyboard shortcuts

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