Documentation ¶
Index ¶
- Constants
- func DeleteIPChannel(client *TwilioIPMessagingClient, serviceSid, sid string) error
- func DeleteIPCredential(client *TwilioIPMessagingClient, sid string) error
- func DeleteIPRole(client *TwilioIPMessagingClient, serviceSid, sid string) error
- func DeleteIPService(client *TwilioIPMessagingClient, sid string) error
- func DeleteIPUser(client *TwilioIPMessagingClient, serviceSid, sid string) error
- func RemoveIPMemberFromChannel(client *TwilioIPMessagingClient, serviceSid, channelSid, sid string) error
- 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 IPChannel
- func GetIPChannel(client *TwilioIPMessagingClient, serviceSid string, sid string) (*IPChannel, error)
- func NewIPChannel(client *TwilioIPMessagingClient, serviceSid string, friendlyName string, ...) (*IPChannel, error)
- func UpdateIPChannel(client *TwilioIPMessagingClient, serviceSid string, sid string, ...) (*IPChannel, error)
- type IPChannelList
- func (c *IPChannelList) FirstPage() (*IPChannelList, error)
- func (c *IPChannelList) GetAllChannels() ([]IPChannel, error)
- func (c *IPChannelList) GetChannels() []IPChannel
- func (c *IPChannelList) HasNextPage() bool
- func (c *IPChannelList) HasPreviousPage() bool
- func (c *IPChannelList) LastPage() (*IPChannelList, error)
- func (c *IPChannelList) NextPage() (*IPChannelList, error)
- func (c *IPChannelList) PreviousPage() (*IPChannelList, error)
- type IPCredential
- func GetIPCredential(client *TwilioIPMessagingClient, sid string) (*IPCredential, error)
- func NewIPCredential(client *TwilioIPMessagingClient, friendlyName string, kind string, ...) (*IPCredential, error)
- func UpdateIPCredential(client *TwilioIPMessagingClient, sid string, friendlyName string, kind string, ...) (*IPCredential, error)
- type IPCredentialList
- func (s *IPCredentialList) FirstPage() (*IPCredentialList, error)
- func (s *IPCredentialList) GetAllCredentials() ([]IPCredential, error)
- func (s *IPCredentialList) GetCredentials() []IPCredential
- func (s *IPCredentialList) HasNextPage() bool
- func (s *IPCredentialList) HasPreviousPage() bool
- func (s *IPCredentialList) LastPage() (*IPCredentialList, error)
- func (s *IPCredentialList) NextPage() (*IPCredentialList, error)
- func (s *IPCredentialList) PreviousPage() (*IPCredentialList, error)
- type IPMember
- type IPMemberList
- func (c *IPMemberList) FirstPage() (*IPMemberList, error)
- func (c *IPMemberList) GetAllMembers() ([]IPMember, error)
- func (c *IPMemberList) GetMembers() []IPMember
- func (c *IPMemberList) HasNextPage() bool
- func (c *IPMemberList) HasPreviousPage() bool
- func (c *IPMemberList) LastPage() (*IPMemberList, error)
- func (c *IPMemberList) NextPage() (*IPMemberList, error)
- func (c *IPMemberList) PreviousPage() (*IPMemberList, error)
- type IPMessage
- type IPMessageList
- func (c *IPMessageList) FirstPage() (*IPMessageList, error)
- func (c *IPMessageList) GetAllMessages() ([]IPMessage, error)
- func (c *IPMessageList) GetMessages() []IPMessage
- func (c *IPMessageList) HasNextPage() bool
- func (c *IPMessageList) HasPreviousPage() bool
- func (c *IPMessageList) LastPage() (*IPMessageList, error)
- func (c *IPMessageList) NextPage() (*IPMessageList, error)
- func (c *IPMessageList) PreviousPage() (*IPMessageList, error)
- type IPRole
- func GetIPRole(client *TwilioIPMessagingClient, serviceSid, sid string) (*IPRole, error)
- func NewIPRole(client *TwilioIPMessagingClient, serviceSid string, friendlyName string, ...) (*IPRole, error)
- func UpdateIPRole(client *TwilioIPMessagingClient, serviceSid string, sid string, ...) (*IPRole, error)
- type IPRoleList
- func (s *IPRoleList) FirstPage() (*IPRoleList, error)
- func (s *IPRoleList) GetAllRoles() ([]IPRole, error)
- func (s *IPRoleList) GetRoles() []IPRole
- func (s *IPRoleList) HasNextPage() bool
- func (s *IPRoleList) HasPreviousPage() bool
- func (s *IPRoleList) LastPage() (*IPRoleList, error)
- func (s *IPRoleList) NextPage() (*IPRoleList, error)
- func (s *IPRoleList) PreviousPage() (*IPRoleList, error)
- type IPService
- type IPServiceList
- func (s *IPServiceList) FirstPage() (*IPServiceList, error)
- func (s *IPServiceList) GetAllServices() ([]IPService, error)
- func (s *IPServiceList) GetServices() []IPService
- func (s *IPServiceList) HasNextPage() bool
- func (s *IPServiceList) HasPreviousPage() bool
- func (s *IPServiceList) LastPage() (*IPServiceList, error)
- func (s *IPServiceList) NextPage() (*IPServiceList, error)
- func (s *IPServiceList) PreviousPage() (*IPServiceList, error)
- type IPUser
- type IPUserList
- func (s *IPUserList) FirstPage() (*IPUserList, error)
- func (s *IPUserList) GetAllUsers() ([]IPUser, error)
- func (s *IPUserList) GetUsers() []IPUser
- func (s *IPUserList) HasNextPage() bool
- func (s *IPUserList) HasPreviousPage() bool
- func (s *IPUserList) LastPage() (*IPUserList, error)
- func (s *IPUserList) NextPage() (*IPUserList, error)
- func (s *IPUserList) PreviousPage() (*IPUserList, error)
- 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 MessagingServiceSid
- type Meta
- 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
- type TwilioIPMessagingClient
- type Webhooks
Constants ¶
const ( IP_MESSAGING_ROOT = "https://ip-messaging.twilio.com" IP_MESSAGING_VERSION = "v1" IP_MESSAGING_ROOT_URL = IP_MESSAGING_ROOT + "/" + IP_MESSAGING_VERSION )
Constants for the IP Messaging service.
const ( PermissionCreateChannel = "createChannel" PermissionJoinChannel = "joinChannel" PermissionDestroyChannel = "destroyChannel" PermissionInviteMember = "inviteMember" PermissionRemoveMember = "removeMember" PermissionEditChannelName = "editChannelName" PermissionEditChannelAttributes = "editChannelAttributes" PermissionAddMember = "addMember" PermissionEditAnyMessage = "editAnyMessage" PermissionDeleteAnyMessage = "deleteAnyMessage" PermissionSendMessage = "sendMessage" PermissionLeaveChannel = "leaveChannel" PermissionEditOwnMessage = "editOwnMessage" PermissionDeleteOwnMessage = "deleteOwnMessage" )
Permissions allowed for IP Roles.
const ( WebhookOnMessageSend = "Webhooks.OnMessageSend" WebhookOnMessageRemove = "Webhooks.OnMessageRemove" WebhookOnMessageUpdate = "Webhooks.OnMessageUpdate" WebhookOnChannelAdd = "Webhooks.OnChannelAdd" WebhookOnChannelUpdate = "Webhooks.OnChannelUpdate" WebhookOnChannelDestroy = "Webhooks.OnChannelDestroy" WebhookOnMemberAdd = "Webhooks.OnMemberAdd" WebhookOnMemberRemove = "Webhooks.OnMemberRemove" )
Webhooks available for services to specify
const ROOT = "https://api.twilio.com"
const VERSION = "2010-04-01"
Variables ¶
This section is empty.
Functions ¶
func DeleteIPChannel ¶
func DeleteIPChannel(client *TwilioIPMessagingClient, serviceSid, sid string) error
DeleteIPChannel deletes the given IP Channel.
func DeleteIPCredential ¶
func DeleteIPCredential(client *TwilioIPMessagingClient, sid string) error
DeleteIPCredential deletes the given IP Credential.
func DeleteIPRole ¶
func DeleteIPRole(client *TwilioIPMessagingClient, serviceSid, sid string) error
DeleteIPRole deletes the given IP Role.
func DeleteIPService ¶
func DeleteIPService(client *TwilioIPMessagingClient, sid string) error
DeleteIPService deletes the given IP Service.
func DeleteIPUser ¶
func DeleteIPUser(client *TwilioIPMessagingClient, serviceSid, sid string) error
DeleteIPUser deletes the given IP user.
func RemoveIPMemberFromChannel ¶
func RemoveIPMemberFromChannel(client *TwilioIPMessagingClient, serviceSid, channelSid, sid string) error
RemoveIPMemberFromChannel removes the given member from the channel.
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 IPChannel ¶
type IPChannel struct { Sid string `json:"sid"` AccountSid string `json:"account_sid"` ServiceSid string `json:"service_sid"` FriendlyName string `json:"friendly_name"` UniqueName string `json:"unique_name"` Attributes string `json:"attributes"` Type string `json:"type"` DateCreated string `json:"date_created"` DateUpdated string `json:"date_updated"` CreatedBy string `json:"created_by"` URL string `json:"url"` Links map[string]string `json:"links"` }
IPChannel is a IP Messaging Channel resource.
func GetIPChannel ¶
func GetIPChannel(client *TwilioIPMessagingClient, serviceSid string, sid string) (*IPChannel, error)
GetIPChannel returns the specified IP Channel.
func NewIPChannel ¶
func NewIPChannel(client *TwilioIPMessagingClient, serviceSid string, friendlyName string, uniqueName string, public bool, attributes string) (*IPChannel, error)
NewIPChannel creates a new IP Messaging Channel.
type IPChannelList ¶
type IPChannelList struct { Client Client Channels []IPChannel `json:"channels"` Meta Meta `json:"meta"` }
IPChannelList gives the results for querying the set of channels. Returns the first page by default.
func ListIPChannels ¶
func ListIPChannels(client *TwilioIPMessagingClient, serviceSid string) (*IPChannelList, error)
ListIPChannels returns the first page of channels.
func (*IPChannelList) FirstPage ¶
func (c *IPChannelList) FirstPage() (*IPChannelList, error)
FirstPage returns the first page of channels.
func (*IPChannelList) GetAllChannels ¶
func (c *IPChannelList) GetAllChannels() ([]IPChannel, error)
GetAllChannels returns all of the channels from all of the pages (from here forward).
func (*IPChannelList) GetChannels ¶
func (c *IPChannelList) GetChannels() []IPChannel
GetChannels recturns the current page of channels.
func (*IPChannelList) HasNextPage ¶
func (c *IPChannelList) HasNextPage() bool
HasNextPage returns whether or not there is a next page of channels.
func (*IPChannelList) HasPreviousPage ¶
func (c *IPChannelList) HasPreviousPage() bool
HasPreviousPage indicates whether or not there is a previous page of results.
func (*IPChannelList) LastPage ¶
func (c *IPChannelList) LastPage() (*IPChannelList, error)
LastPage returns the last page of channels.
func (*IPChannelList) NextPage ¶
func (c *IPChannelList) NextPage() (*IPChannelList, error)
NextPage returns the next page of channels.
func (*IPChannelList) PreviousPage ¶
func (c *IPChannelList) PreviousPage() (*IPChannelList, error)
PreviousPage returns the previous page of channels.
type IPCredential ¶
type IPCredential struct { Sid string `json:"sid"` AccountSid string `json:"account_sid"` FriendlyName string `json:"friendly_name"` Type string `json:"type"` // apns or gcm Sandbox bool `json:"sandbox"` URL string `json:"url"` }
IPCredential is a IP Messaging Credential resource.
func GetIPCredential ¶
func GetIPCredential(client *TwilioIPMessagingClient, sid string) (*IPCredential, error)
GetIPCredential returns information on the specified credential.
func NewIPCredential ¶
func NewIPCredential(client *TwilioIPMessagingClient, friendlyName string, kind string, sandbox bool, apnsCert string, apnsPrivateKey string, gcmApiKey string) (*IPCredential, error)
NewIPCredential creates a new IP Messaging Credential. Kind must be apns or gcm.
func UpdateIPCredential ¶
func UpdateIPCredential(client *TwilioIPMessagingClient, sid string, friendlyName string, kind string, sandbox bool) (*IPCredential, error)
UpdateIPCredential updates an existing IP Messaging Credential.
type IPCredentialList ¶
type IPCredentialList struct { Client Client Credentials []IPCredential `json:"credentials"` Meta Meta `json:"meta"` }
IPCredentialList gives the results for querying the set of credentials. Returns the first page by default.
func ListIPCredentials ¶
func ListIPCredentials(client *TwilioIPMessagingClient) (*IPCredentialList, error)
ListIPCredentials returns the first page of credentials.
func (*IPCredentialList) FirstPage ¶
func (s *IPCredentialList) FirstPage() (*IPCredentialList, error)
FirstPage returns the first page of credentials.
func (*IPCredentialList) GetAllCredentials ¶
func (s *IPCredentialList) GetAllCredentials() ([]IPCredential, error)
GetAllCredentials returns all of the credentials from all of the pages (from here forward).
func (*IPCredentialList) GetCredentials ¶
func (s *IPCredentialList) GetCredentials() []IPCredential
GetCredentials returns the current page of credentials.
func (*IPCredentialList) HasNextPage ¶
func (s *IPCredentialList) HasNextPage() bool
HasNextPage returns whether or not there is a next page of credentials.
func (*IPCredentialList) HasPreviousPage ¶
func (s *IPCredentialList) HasPreviousPage() bool
HasPreviousPage indicates whether or not there is a previous page of results.
func (*IPCredentialList) LastPage ¶
func (s *IPCredentialList) LastPage() (*IPCredentialList, error)
LastPage returns the last page of credentials.
func (*IPCredentialList) NextPage ¶
func (s *IPCredentialList) NextPage() (*IPCredentialList, error)
NextPage returns the next page of credentials.
func (*IPCredentialList) PreviousPage ¶
func (s *IPCredentialList) PreviousPage() (*IPCredentialList, error)
PreviousPage returns the previous page of credentials.
type IPMember ¶
type IPMember struct { Sid string `json:"sid"` AccountSid string `json:"account_sid"` ChannelSid string `json:"channel_sid"` ServiceSid string `json:"service_sid"` Identity string `json:"identity"` RoleSid *string `json:"role_sid"` DateCreated string `json:"date_created"` DateUpdated string `json:"date_updated"` URL string `json:"url"` }
IPMember is a IP Messaging Member resource.
func AddIPMemberToChannel ¶
func AddIPMemberToChannel(client *TwilioIPMessagingClient, serviceSid string, channelSid string, identity string, roleSid string) (*IPMember, error)
AddIPMemberToChannel adds a member to a channel.
func GetIPChannelMember ¶
func GetIPChannelMember(client *TwilioIPMessagingClient, serviceSid, channelSid, sid string) (*IPMember, error)
GetIPChannelMember returns the specified IP Member in the channel.
type IPMemberList ¶
type IPMemberList struct { Client Client Members []IPMember `json:"members"` Meta Meta `json:"meta"` }
IPMemberList gives the results for querying the set of members. Returns the first page by default.
func ListIPMembers ¶
func ListIPMembers(client *TwilioIPMessagingClient, serviceSid, channelSid string) (*IPMemberList, error)
ListIPMembers returns the first page of members.
func (*IPMemberList) FirstPage ¶
func (c *IPMemberList) FirstPage() (*IPMemberList, error)
FirstPage returns the first page of members.
func (*IPMemberList) GetAllMembers ¶
func (c *IPMemberList) GetAllMembers() ([]IPMember, error)
GetAllMembers returns all of the members from all of the pages (from here forward).
func (*IPMemberList) GetMembers ¶
func (c *IPMemberList) GetMembers() []IPMember
GetMembers recturns the current page of members.
func (*IPMemberList) HasNextPage ¶
func (c *IPMemberList) HasNextPage() bool
HasNextPage returns whether or not there is a next page of members.
func (*IPMemberList) HasPreviousPage ¶
func (c *IPMemberList) HasPreviousPage() bool
HasPreviousPage indicates whether or not there is a previous page of results.
func (*IPMemberList) LastPage ¶
func (c *IPMemberList) LastPage() (*IPMemberList, error)
LastPage returns the last page of members.
func (*IPMemberList) NextPage ¶
func (c *IPMemberList) NextPage() (*IPMemberList, error)
NextPage returns the next page of members.
func (*IPMemberList) PreviousPage ¶
func (c *IPMemberList) PreviousPage() (*IPMemberList, error)
PreviousPage returns the previous page of members.
type IPMessage ¶
type IPMessage struct { Sid string `json:"sid"` AccountSid string `json:"account_sid"` ServiceSid string `json:"service_sid"` To string `json:"to"` // channel sid DateCreated string `json:"date_created"` DateUpdated string `json:"date_updated"` WasEdited bool `json:"was_edited"` From string `json:"from"` // identity Body string `json:"body"` URL string `json:"url"` }
IPMessage is a IP Messaging Message resource.
func GetIPChannelMessage ¶
func GetIPChannelMessage(client *TwilioIPMessagingClient, serviceSid, channelSid, sid string) (*IPMessage, error)
GetIPChannelMessage returns the specified IP Message in the channel.
func SendIPMessageToChannel ¶
func SendIPMessageToChannel(client *TwilioIPMessagingClient, serviceSid string, channelSid string, from string, body string) (*IPMessage, error)
SendIPMessageToChannel sends a message to a channel.
type IPMessageList ¶
type IPMessageList struct { Client Client Messages []IPMessage `json:"messages"` Meta Meta `json:"meta"` }
IPMessageList gives the results for querying the set of messages. Returns the first page by default.
func ListIPMessages ¶
func ListIPMessages(client *TwilioIPMessagingClient, serviceSid, channelSid string) (*IPMessageList, error)
ListIPMessages returns the first page of messages for a channel.
func (*IPMessageList) FirstPage ¶
func (c *IPMessageList) FirstPage() (*IPMessageList, error)
FirstPage returns the first page of messages.
func (*IPMessageList) GetAllMessages ¶
func (c *IPMessageList) GetAllMessages() ([]IPMessage, error)
GetAllMessages returns all of the messages from all of the pages (from here forward).
func (*IPMessageList) GetMessages ¶
func (c *IPMessageList) GetMessages() []IPMessage
GetMessages recturns the current page of messages.
func (*IPMessageList) HasNextPage ¶
func (c *IPMessageList) HasNextPage() bool
HasNextPage returns whether or not there is a next page of messages.
func (*IPMessageList) HasPreviousPage ¶
func (c *IPMessageList) HasPreviousPage() bool
HasPreviousPage indicates whether or not there is a previous page of results.
func (*IPMessageList) LastPage ¶
func (c *IPMessageList) LastPage() (*IPMessageList, error)
LastPage returns the last page of messages.
func (*IPMessageList) NextPage ¶
func (c *IPMessageList) NextPage() (*IPMessageList, error)
NextPage returns the next page of messages.
func (*IPMessageList) PreviousPage ¶
func (c *IPMessageList) PreviousPage() (*IPMessageList, error)
PreviousPage returns the previous page of messages.
type IPRole ¶
type IPRole struct { Sid string `json:"sid"` AccountSid string `json:"account_sid"` ServiceSid string `json:"service_sid"` FriendlyName string `json:"friendly_name"` Type string `json:"type"` Permissions []string `json:"permissions"` DateCreated string `json:"date_created"` DateUpdated string `json:"date_updated"` URL string `json:"url"` }
IPRole is a IP Messaging Role resource.
func GetIPRole ¶
func GetIPRole(client *TwilioIPMessagingClient, serviceSid, sid string) (*IPRole, error)
GetIPRole returns information on the specified role.
func NewIPRole ¶
func NewIPRole(client *TwilioIPMessagingClient, serviceSid string, friendlyName string, kind string, permissions []string) (*IPRole, error)
NewIPRole creates a new IP Messaging Role. kind should be "channel" or "service". permissions should be a subset of the permissions consts above.
func UpdateIPRole ¶
func UpdateIPRole(client *TwilioIPMessagingClient, serviceSid string, sid string, friendlyName string, kind string, permissions []string) (*IPRole, error)
UpdateIPRole updates an existing IP Messaging Role.
type IPRoleList ¶
type IPRoleList struct { Client *TwilioIPMessagingClient Roles []IPRole `json:"roles"` Meta Meta `json:"meta"` }
IPRoleList gives the results for querying the set of roles. Returns the first page by default.
func ListIPRoles ¶
func ListIPRoles(client *TwilioIPMessagingClient, serviceSid string) (*IPRoleList, error)
ListIPRoles returns the first page of roles.
func (*IPRoleList) FirstPage ¶
func (s *IPRoleList) FirstPage() (*IPRoleList, error)
FirstPage returns the first page of roles.
func (*IPRoleList) GetAllRoles ¶
func (s *IPRoleList) GetAllRoles() ([]IPRole, error)
GetAllRoles returns all of the roles from all of the pages (from here forward).
func (*IPRoleList) GetRoles ¶
func (s *IPRoleList) GetRoles() []IPRole
GetRoles returns the current page of roles.
func (*IPRoleList) HasNextPage ¶
func (s *IPRoleList) HasNextPage() bool
HasNextPage returns whether or not there is a next page of roles.
func (*IPRoleList) HasPreviousPage ¶
func (s *IPRoleList) HasPreviousPage() bool
HasPreviousPage indicates whether or not there is a previous page of results.
func (*IPRoleList) LastPage ¶
func (s *IPRoleList) LastPage() (*IPRoleList, error)
LastPage returns the last page of roles.
func (*IPRoleList) NextPage ¶
func (s *IPRoleList) NextPage() (*IPRoleList, error)
NextPage returns the next page of roles.
func (*IPRoleList) PreviousPage ¶
func (s *IPRoleList) PreviousPage() (*IPRoleList, error)
PreviousPage returns the previous page of roles.
type IPService ¶
type IPService struct { Sid string `json:"sid"` AccountSid string `json:"account_sid"` FriendlyName string `json:"friendly_name"` DateCreated string `json:"date_created"` DateUpdated string `json:"date_updated"` DefaultServiceRoleSid string `json:"default_service_role_sid"` DefaultChannelRoleSid string `json:"default_channel_role_sid"` TypingIndicatorTimeout uint `json:"typing_indicator_timeout"` Webhooks map[string]string `json:"webhooks"` URL string `json:"url"` Links map[string]string `json:"links"` }
IPService is a IP Messaging Service resource.
func GetIPService ¶
func GetIPService(client *TwilioIPMessagingClient, sid string) (*IPService, error)
GetIPService returns information on the specified service.
func NewIPService ¶
func NewIPService(client *TwilioIPMessagingClient, friendlyName string, defaultServiceRoleSid string, defaultChannelRoleSid string, typingIndicatorTimeout time.Duration, webhooks Webhooks) (*IPService, error)
NewIPService creates a new IP Messaging Service.
func UpdateIPService ¶
func UpdateIPService(client *TwilioIPMessagingClient, sid string, friendlyName string, defaultServiceRoleSid string, defaultChannelRoleSid string, typingIndicatorTimeout time.Duration, webhooks Webhooks) (*IPService, error)
UpdateIPService updates an existing IP Messaging Service.
type IPServiceList ¶
type IPServiceList struct { Client Client Services []IPService `json:"services"` Meta Meta `json:"meta"` }
IPServiceList gives the results for querying the set of services. Returns the first page by default.
func ListIPServices ¶
func ListIPServices(client *TwilioIPMessagingClient) (*IPServiceList, error)
ListIPServices returns the first page of services.
func (*IPServiceList) FirstPage ¶
func (s *IPServiceList) FirstPage() (*IPServiceList, error)
FirstPage returns the first page of services.
func (*IPServiceList) GetAllServices ¶
func (s *IPServiceList) GetAllServices() ([]IPService, error)
GetAllServices returns all of the services from all of the pages (from here forward).
func (*IPServiceList) GetServices ¶
func (s *IPServiceList) GetServices() []IPService
GetServices returns the current page of services.
func (*IPServiceList) HasNextPage ¶
func (s *IPServiceList) HasNextPage() bool
HasNextPage returns whether or not there is a next page of services.
func (*IPServiceList) HasPreviousPage ¶
func (s *IPServiceList) HasPreviousPage() bool
HasPreviousPage indicates whether or not there is a previous page of results.
func (*IPServiceList) LastPage ¶
func (s *IPServiceList) LastPage() (*IPServiceList, error)
LastPage returns the last page of services.
func (*IPServiceList) NextPage ¶
func (s *IPServiceList) NextPage() (*IPServiceList, error)
NextPage returns the next page of services.
func (*IPServiceList) PreviousPage ¶
func (s *IPServiceList) PreviousPage() (*IPServiceList, error)
PreviousPage returns the previous page of services.
type IPUser ¶
type IPUser struct { Sid string `json:"sid"` AccountSid string `json:"account_sid"` ServiceSid string `json:"service_sid"` RoleSid string `json:"role_sid"` Identity string `json:"identity"` DateCreated string `json:"date_created"` DateUpdated string `json:"date_updated"` URL string `json:"url"` }
IPUser is a IP Messaging User resource.
func GetIPUser ¶
func GetIPUser(client *TwilioIPMessagingClient, serviceSid, sid string) (*IPUser, error)
GetIPUser returns information on the specified user.
func NewIPUser ¶
func NewIPUser(client *TwilioIPMessagingClient, serviceSid string, identity string, roleSid string) (*IPUser, error)
NewIPUser creates a new IP Messaging User.
func UpdateIPUser ¶
func UpdateIPUser(client *TwilioIPMessagingClient, serviceSid string, sid string, identity string, roleSid string) (*IPUser, error)
UpdateIPUser updates an existing IP Messaging user.
type IPUserList ¶
type IPUserList struct { Client *TwilioIPMessagingClient Users []IPUser `json:"users"` Meta Meta `json:"meta"` }
IPUserList gives the results for querying the set of users. Returns the first page by default.
func ListIPUsers ¶
func ListIPUsers(client *TwilioIPMessagingClient, serviceSid string) (*IPUserList, error)
ListIPUsers returns the first page of users.
func (*IPUserList) FirstPage ¶
func (s *IPUserList) FirstPage() (*IPUserList, error)
FirstPage returns the first page of users.
func (*IPUserList) GetAllUsers ¶
func (s *IPUserList) GetAllUsers() ([]IPUser, error)
GetAllUsers returns all of the users from all of the pages (from here forward).
func (*IPUserList) GetUsers ¶
func (s *IPUserList) GetUsers() []IPUser
GetUsers returns the current page of users.
func (*IPUserList) HasNextPage ¶
func (s *IPUserList) HasNextPage() bool
HasNextPage returns whether or not there is a next page of users.
func (*IPUserList) HasPreviousPage ¶
func (s *IPUserList) HasPreviousPage() bool
HasPreviousPage indicates whether or not there is a previous page of results.
func (*IPUserList) LastPage ¶
func (s *IPUserList) LastPage() (*IPUserList, error)
LastPage returns the last page of users.
func (*IPUserList) NextPage ¶
func (s *IPUserList) NextPage() (*IPUserList, error)
NextPage returns the next page of users.
func (*IPUserList) PreviousPage ¶
func (s *IPUserList) PreviousPage() (*IPUserList, error)
PreviousPage returns the previous page of users.
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:"incoming_phone_numbers"` }
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 MessagingServiceSid ¶
type MessagingServiceSid string
func (MessagingServiceSid) GetParam ¶
func (sid MessagingServiceSid) GetParam() (string, string)
type Meta ¶
type Meta struct { 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"` Key string `json:"key"` }
Meta is a metadata type for the IP messaging services.
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 NewClient ¶
func NewClient(accountSid, authToken string) *TwilioClient
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
type TwilioIPMessagingClient ¶
type TwilioIPMessagingClient struct {
TwilioClient
}
TwilioIPMessagingClient is used for accessing the Twilio IP Messaging API.
func NewIPMessagingClient ¶
func NewIPMessagingClient(accountSid, authToken string) *TwilioIPMessagingClient
NewIPMessagingClient creates a new Twilio IP Messaging client.