sms

package
v0.0.0-...-421306c Latest Latest
Warning

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

Go to latest
Published: Feb 8, 2024 License: BSD-2-Clause Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Delete

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

Delete Cancel sending Scheduled Sms. Return true if have been successfully deleted.

Types

type ListParams

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

ListParams provides additional message list options.

func (*ListParams) QueryParams

func (lp *ListParams) QueryParams() string

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 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, params *ListParams) (*MessageList, error)

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

type Params

type Params struct {
	GroupIds          []string
	Type              string
	Reference         string
	Validity          int
	Gateway           int
	TypeDetails       TypeDetails
	DataCoding        string
	ReportURL         string
	ScheduledDatetime time.Time
	ShortenURLs       bool
}

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