Documentation
¶
Index ¶
- Constants
- Variables
- type Balance
- type Client
- func (c *Client) Balance() (*Balance, error)
- func (c *Client) HLR(id string) (*HLR, error)
- func (c *Client) Lookup(phoneNumber string, params *LookupParams) (*Lookup, error)
- func (c *Client) LookupHLR(phoneNumber string, params *LookupParams) (*HLR, error)
- func (c *Client) Message(id string) (*Message, error)
- func (c *Client) NewHLR(msisdn, reference string) (*HLR, error)
- func (c *Client) NewLookupHLR(phoneNumber string, params *LookupParams) (*HLR, error)
- func (c *Client) NewMessage(originator string, recipients []string, body string, msgParams *MessageParams) (*Message, error)
- func (c *Client) NewVoiceMessage(recipients []string, body string, params *VoiceMessageParams) (*VoiceMessage, error)
- func (c *Client) OtpGenerate(recipient string, params *OtpParams) (*OtpMessage, error)
- func (c *Client) OtpVerify(recipient string, token string, params *OtpParams) (*OtpMessage, error)
- func (c *Client) VoiceMessage(id string) (*VoiceMessage, error)
- type Error
- type Formats
- type HLR
- type Lookup
- type LookupParams
- type Message
- type MessageParams
- type OtpMessage
- type OtpParams
- type Recipient
- type Recipients
- type TypeDetails
- type VoiceMessage
- type VoiceMessageParams
Constants ¶
View Source
const ( ClientVersion = "2.3.0" Endpoint = "https://rest.messagebird.com" )
Variables ¶
View Source
var ( ErrResponse = errors.New("The MessageBird API returned an error") ErrUnexpectedResponse = errors.New("The MessageBird API is currently unavailable") )
Functions ¶
This section is empty.
Types ¶
type Client ¶
type Client struct { AccessKey string // The API access key HTTPClient *http.Client // The HTTP client to send requests on DebugLog *log.Logger // Optional logger for debugging purposes }
func (*Client) Balance ¶
Balance returns the balance information for the account that is associated with the access key.
func (*Client) HLR ¶
HLR looks up an existing HLR object for the specified id that was previously created by the NewHLR function.
func (*Client) Lookup ¶
func (c *Client) Lookup(phoneNumber string, params *LookupParams) (*Lookup, error)
Lookup performs a new lookup for the specified number.
func (*Client) LookupHLR ¶
func (c *Client) LookupHLR(phoneNumber string, params *LookupParams) (*HLR, error)
LookupHLR performs a HLR lookup for the specified number.
func (*Client) NewLookupHLR ¶
func (c *Client) NewLookupHLR(phoneNumber string, params *LookupParams) (*HLR, error)
NewLookupHLR creates a new HLR lookup for the specified number.
func (*Client) NewMessage ¶
func (c *Client) NewMessage(originator string, recipients []string, body string, msgParams *MessageParams) (*Message, error)
NewMessage creates a new message for one or more recipients.
func (*Client) NewVoiceMessage ¶
func (c *Client) NewVoiceMessage(recipients []string, body string, params *VoiceMessageParams) (*VoiceMessage, error)
NewVoiceMessage creates a new voice message for one or more recipients.
func (*Client) OtpGenerate ¶
func (c *Client) OtpGenerate(recipient string, params *OtpParams) (*OtpMessage, error)
OtpGenerate generates a new One-Time-Password for one recipient.
func (*Client) VoiceMessage ¶
func (c *Client) VoiceMessage(id string) (*VoiceMessage, error)
VoiceMessage retrieves the information of an existing VoiceMessage.
type LookupParams ¶
type MessageParams ¶
type OtpMessage ¶
type Recipients ¶
type TypeDetails ¶
type TypeDetails map[string]interface{}
type VoiceMessage ¶
Click to show internal directories.
Click to hide internal directories.