Documentation
¶
Index ¶
Constants ¶
View Source
const Version = "0.1"
Version of the program
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Call ¶ added in v0.2.0
type Call struct {
CallID string `json:"call_id"`
To string `json:"to"`
Status string `json:"status"`
ErrorText string `json:"error_text"`
}
Call holds call response data
type CallService ¶ added in v0.2.0
type CallService struct {
// contains filtered or unexported fields
}
CallService is the client holding calling capatibilites
func (*CallService) MakeTTSCall ¶ added in v0.2.0
func (c *CallService) MakeTTSCall(from string, to string, text string, repeat string) (*Call, error)
MakeTTSCall makes an outbound Call reproducing using TTS with the given text.
type Client ¶
type Client struct {
*rest.Client
APIKey string
APISecret string
// FullPath takes a path part (e.g. "Messages") and returns the full API path, including the version (e.g. "/sms").
FullPath func(pathPart string) string
// The API Client uses these resources
Messages *MessageService
Calls *CallService
}
Client holds all the necessary data to handle nexmo API
func NewClient ¶
NewClient creates a Client for interacting with the Nexmo API. This is the main entrypoint for API interactions; view the methods on the subresources for more information.
type Message ¶
type Message struct {
MessageCount string `json:"message-count"`
Messages []struct {
To string `json:"to"`
MessageID string `json:"message-id"`
Status string `json:"status"`
ClientReference string `json:"client-ref"`
RemainingBalance string `json:"remaining-balance"`
MessagePrice string `json:"message-price"`
Network string `json:"network"`
ErrorText string `json:"error-text"`
} `json:"messages"`
}
Message holds message response data
type MessageService ¶
type MessageService struct {
// contains filtered or unexported fields
}
MessageService is the client holding messaging capatibilites
func (*MessageService) SendMessage ¶
SendMessage sends an outbound Message with the given text.
Click to show internal directories.
Click to hide internal directories.