Documentation
¶
Index ¶
- Constants
- type ApplicationSid
- type AreaCode
- type Body
- type Call
- type CallList
- func (currentCallList *CallList) FirstPage() (*CallList, error)
- func (callList *CallList) GetCalls() []Call
- func (currentCallList *CallList) HasNextPage() bool
- func (currentCallList *CallList) HasPreviousPage() bool
- func (currentCallList *CallList) LastPage() (*CallList, error)
- func (currentCallList *CallList) NextPage() (*CallList, error)
- func (currentCallList *CallList) PreviousPage() (*CallList, error)
- type Callback
- type Capabilites
- type Client
- type DateSent
- type Error
- type FallbackMethod
- type FallbackUrl
- type FriendlyName
- type From
- type IfMachine
- type IncomingPhoneNumber
- type IncomingPhoneNumberList
- type MediaUrl
- type Message
- type MessageList
- func (currentMessageList *MessageList) FirstPage() (*MessageList, error)
- func (m *MessageList) GetMessages() []Message
- func (currentMessageList *MessageList) HasNextPage() bool
- func (currentMessageList *MessageList) HasPreviousPage() bool
- func (currentMessageList *MessageList) LastPage() (*MessageList, error)
- func (currentMessageList *MessageList) NextPage() (*MessageList, error)
- func (currentMessageList *MessageList) PreviousPage() (*MessageList, error)
- type Method
- type MockClient
- type Optional
- type ParentCallSid
- type PhoneNumber
- type Record
- type SendDigits
- type StartTime
- type Status
- type StatusCallback
- type StatusCallbackMethod
- type Timeout
- type To
- type TwilioClient
- type TwilioError
Constants ¶
View Source
const ROOT = "https://api.twilio.com"
View Source
const VERSION = "2010-04-01"
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ApplicationSid ¶
type ApplicationSid string
func (ApplicationSid) GetParam ¶
func (applicationSid ApplicationSid) GetParam() (string, string)
type Call ¶
type Call struct {
Sid string `json:"sid"`
ParentCallSid string `json:"parent_call_sid"`
DateCreated string `json:"date_created"`
DateUpdated string `json:"date_updated"`
AccountSid string `json:"account_sid"`
To string `json:"to"`
From string `json:"from"`
PhoneNumberSid string `json:"phone_number_sid"`
Status string `json:"status"`
StartTime string `json:"start_time"`
EndTime string `json:"end_time"`
Duration string `json:"duration"`
Price string `json:"price"`
PriceUnit string `json:"price_unit"`
Direction string `json:"direction"`
AnsweredBy string `json:"answered_by"`
ForwardedFrom string `json:"forwarded_from"`
CallerName string `json:"caller_name"`
Uri string `json:"uri"`
}
type CallList ¶
type CallList struct {
Client Client
Start int `json:"start"`
Total int `json:"total"`
NumPages int `json:"num_pages"`
Page int `json:"page"`
PageSize int `json:"page_size"`
End int `json:"end"`
Uri string `json:"uri"`
FirstPageUri string `json:"first_page_uri"`
LastPageUri string `json:"last_page_uri"`
NextPageUri string `json:"next_page_uri"`
PreviousPageUri string `json"previous_page_uri"`
Calls []Call `json:"calls"`
}
func (*CallList) HasNextPage ¶
func (*CallList) HasPreviousPage ¶
func (*CallList) PreviousPage ¶
type Capabilites ¶
type FallbackMethod ¶
type FallbackMethod string
func (FallbackMethod) GetParam ¶
func (fallbackMethod FallbackMethod) GetParam() (string, string)
type FallbackUrl ¶
type FallbackUrl string
func (FallbackUrl) GetParam ¶
func (fallbackUrl FallbackUrl) GetParam() (string, string)
type FriendlyName ¶
type FriendlyName string
func (FriendlyName) GetParam ¶
func (friendlyName FriendlyName) GetParam() (string, string)
type IncomingPhoneNumber ¶
type IncomingPhoneNumber struct {
Sid string `json:"sid"`
AccountSid string `json:"account_sid"`
FriendlyName string `json:"friendly_name"`
PhoneNumber string `json:"phone_number"`
VoiceUrl string `json:"voice_url"`
VoiceMethod string `json:"voice_method"`
VoiceFallbackUrl string `json:"voice_fallback_url"`
VoiceFallbackMethod string `json:"voice_fallback_method"`
StatusCallback string `json:"status_callback"`
StatusCallbackMethod string `json:"status_callback_method"`
VoiceCallerIdLookup bool `json:"voice_caller_id_lookup"`
VoiceApplicationId string `json:"voice_application_id"`
DateCreated string `json:"date_created"`
DateUpdated string `json:"date_updated"`
SmsUrl string `json:"sms_url"`
SmsMethod string `json:"sms_method"`
SmsFallbackUrl string `json:"sms_fallback_url"`
SmsFallbackMethod string `json:"sms_fallback_method"`
SmsApplicationId string `json:"sms_application_id"`
Capabilities Capabilites `json:"capabilities"`
ApiVersion string `json:"api_version"`
Uri string `json:"uri"`
}
func BuyPhoneNumber ¶
func BuyPhoneNumber(client Client, number Optional) (*IncomingPhoneNumber, error)
func GetIncomingPhoneNumber ¶
func GetIncomingPhoneNumber(client Client, sid string) (*IncomingPhoneNumber, error)
type IncomingPhoneNumberList ¶
type IncomingPhoneNumberList struct {
Client Client
Start int `json:"start"`
Total int `json:"total"`
NumPages int `json:"num_pages"`
Page int `json:"page"`
PageSize int `json:"page_size"`
End int `json:"end"`
Uri string `json:"uri"`
FirstPageUri string `json:"first_page_uri"`
LastPageUri string `json:"last_page_uri"`
NextPageUri string `json:"next_page_uri"`
PreviousPageUri string `json"previous_page_uri"`
IncomingPhoneNumbers []IncomingPhoneNumber `json:"sms_messages"`
}
func GetIncomingPhoneNumberList ¶
func GetIncomingPhoneNumberList(client Client, optionals ...Optional) (*IncomingPhoneNumberList, error)
type Message ¶
type Message struct {
Sid string `json:"sid"`
DateCreated string `json:"date_created"`
DateUpdated string `json:"date_updated"`
DateSent string `json:"date_sent"`
AccountSid string `json:"account_sid"`
From string `json:"from"`
To string `json:"to"`
Body string `json:"body"`
NumSegments string `json:"num_segments"`
Status string `json:"status"`
Direction string `json:"direction"`
Price string `json:"price"`
PriceUnit string `json:"price_unit"`
ApiVersion string `json:"api_version"`
Uri string `json:"uri"`
}
type MessageList ¶
type MessageList struct {
Client Client
Start int `json:"start"`
Total int `json:"total"`
NumPages int `json:"num_pages"`
Page int `json:"page"`
PageSize int `json:"page_size"`
End int `json:"end"`
Uri string `json:"uri"`
FirstPageUri string `json:"first_page_uri"`
LastPageUri string `json:"last_page_uri"`
NextPageUri string `json:"next_page_uri"`
PreviousPageUri string `json"previous_page_uri"`
Messages []Message `json:"sms_messages"`
}
func GetMessageList ¶
func GetMessageList(client Client, optionals ...Optional) (*MessageList, error)
func (*MessageList) FirstPage ¶
func (currentMessageList *MessageList) FirstPage() (*MessageList, error)
func (*MessageList) GetMessages ¶
func (m *MessageList) GetMessages() []Message
func (*MessageList) HasNextPage ¶
func (currentMessageList *MessageList) HasNextPage() bool
func (*MessageList) HasPreviousPage ¶
func (currentMessageList *MessageList) HasPreviousPage() bool
func (*MessageList) LastPage ¶
func (currentMessageList *MessageList) LastPage() (*MessageList, error)
func (*MessageList) NextPage ¶
func (currentMessageList *MessageList) NextPage() (*MessageList, error)
func (*MessageList) PreviousPage ¶
func (currentMessageList *MessageList) PreviousPage() (*MessageList, error)
type MockClient ¶
func (*MockClient) AccountSid ¶
func (client *MockClient) AccountSid() string
func (*MockClient) AuthToken ¶
func (client *MockClient) AuthToken() string
func (*MockClient) RootUrl ¶
func (client *MockClient) RootUrl() string
type ParentCallSid ¶
type ParentCallSid string
func (ParentCallSid) GetParam ¶
func (parentCallSid ParentCallSid) GetParam() (string, string)
type PhoneNumber ¶
type PhoneNumber string
func (PhoneNumber) GetParam ¶
func (phoneNumber PhoneNumber) GetParam() (string, string)
type SendDigits ¶
type SendDigits string
func (SendDigits) GetParam ¶
func (sendDigits SendDigits) GetParam() (string, string)
type StatusCallback ¶
type StatusCallback string
func (StatusCallback) GetParam ¶
func (statusCallback StatusCallback) GetParam() (string, string)
type StatusCallbackMethod ¶
type StatusCallbackMethod string
func (StatusCallbackMethod) GetParam ¶
func (statusCallbackMethod StatusCallbackMethod) GetParam() (string, string)
type TwilioClient ¶
type TwilioClient struct {
// contains filtered or unexported fields
}
func (*TwilioClient) AccountSid ¶
func (client *TwilioClient) AccountSid() string
func (*TwilioClient) AuthToken ¶
func (client *TwilioClient) AuthToken() string
func (*TwilioClient) RootUrl ¶
func (client *TwilioClient) RootUrl() string
type TwilioError ¶
type TwilioError struct {
Status int `json:"status"`
Message string `json:"message"`
Code int `json:"code"`
MoreInfo string `json:"more_info"`
}
func (TwilioError) Error ¶
func (e TwilioError) Error() string
Click to show internal directories.
Click to hide internal directories.
