Documentation
¶
Overview ¶
A client library for Plivo (www.plivo.com) that can be used to send text messages and make calls. The API is subject to change.
Index ¶
Constants ¶
View Source
const BaseURL = "https://api.plivo.com/v1/"
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Call ¶
type Call struct {
From string `json:"from"` // Mandatory
To string `json:"to"` // Mandatory
AnswerURL string `json:"answer_url"` // Mandatory
AnswerMethod string `json:"answer_method,omitempty"` // Optional, Plivo defaults to POST
RingURL string `json:"ring_url,omitempty"` // Optional
RingMethod string `json:"ring_method,omitempty"` // Optional, Plivo defaults to POST
HangupURL string `json:"hangup_url,omitempty"` // Optional
HangupMethod string `json:"hangup_method,omitempty"` // Optional, Plivo defaults to POST
FallbackURL string `json:"fallback_url,omitempty"` // Optional
FallbackMethod string `json:"fallback_method,omitempty"` // Optional, Plivo defaults to POST
CallerName string `json:"caller_name,omitempty"` // Optional
SendDigits string `json:"send_digits,omitempty"` // Optional
SendOnPreanswer bool `json:"send_on_preanswer,omitempty"` // Optional, Plive defaults to false
TimeLimit uint `json:"time_limit,omitempty"` // Optional
HangupOnRing uint `json:"hangup_on_ring,omitempty"` // Optional
MachineDetection string `json:"machine_detection,omitempty"` // Optional, valid values are true and hangup
MachineDetectionTime uint `json:"machine_detection_time,omitempty"` // Optional, should be >= 2000 and <= 10000 (ms)
MachineDetectionURL string `json:"machine_detection_url,omitempty"` // Optional
MachineDetectionMethod string `json:"machine_detection_method,omitempty"` // Optional, Plivo defaults to POST
SIPHeaders string `json:"sip_headers,omitempty"` // Optional
RingTimeout string `json:"ring_timeout,omitempty"` // Optional
ParentCallUUID string `json:"parent_call_uuid,omitempty"` // Optional
ErrorIfParentNotFound bool `json:"error_if_parent_not_found,omitempty"` // Optional
}
type Message ¶
type Message struct {
Src string `json:"src"` // Mandatory
Dst string `json:"dst"` // Mandatory
Text string `json:"text"` // Mandatory
Type string `json:"type,omitempty"` // Optional
URL string `json:"url,omitempty"` // Optional
Method string `json:"method,omitempty"` // Optional, Plivo defaults to POST
Log bool `json:"log,omitempty"` // Optional, Plivo defaults to true
}
The Message type is used for sending text messages via the JSON API.
Documentation is at: https://www.plivo.com/docs/api/message/#send-a-message
Click to show internal directories.
Click to hide internal directories.
