Documentation ¶
Index ¶
- Constants
- func FormatPhonenumber(phoneNumber string) string
- func NewChatD360TemplateTextMessage(data map[string]interface{}) map[string]interface{}
- type D360
- func (d *D360) Autenticate() (rest.IToken, error)
- func (d *D360) GetTemplateInteractive() (*D360_TemplateInteractiveResponse, error)
- func (d *D360) SendMessage(data map[string]interface{}) ([]rest.ISendMessageResponse, error)
- func (d *D360) SendMessageInteractive(data map[string]interface{}) ([]rest.ISendMessageResponse, error)
- func (d *D360) SendMessageTemplate(data map[string]interface{}) ([]rest.ISendMessageResponse, error)
- type D360_Action
- type D360_Body
- type D360_Button
- type D360_Contact
- type D360_Document
- type D360_Footer
- type D360_Header
- type D360_Image
- type D360_Interacrive
- type D360_Language
- type D360_Message
- type D360_MessageInteractiveRequest
- type D360_MessageRequest
- type D360_MessageResponse
- type D360_MessageTemplateRequest
- type D360_Meta
- type D360_Parser
- type D360_Provider
- type D360_Reply
- type D360_Template
- type D360_TemplateComponent
- type D360_TemplateInteractiveResponse
- type D360_TemplateParameter
- type D360_TemplateToMessage
- type D360_Text
- type D360_Video
Constants ¶
View Source
const (
MISSING_RESPONSE_DATA = "faltam dados para o envio da mensagem: "
)
View Source
const (
TOKEN_VALIDITY_MINUTES = 60 * 3
)
Variables ¶
This section is empty.
Functions ¶
func FormatPhonenumber ¶
func NewChatD360TemplateTextMessage ¶ added in v0.6.6
Types ¶
type D360 ¶
type D360 struct {
// contains filtered or unexported fields
}
func NewChatD360 ¶
func (*D360) GetTemplateInteractive ¶
func (d *D360) GetTemplateInteractive() (*D360_TemplateInteractiveResponse, error)
func (*D360) SendMessage ¶
func (d *D360) SendMessage(data map[string]interface{}) ([]rest.ISendMessageResponse, error)
func (*D360) SendMessageInteractive ¶
func (d *D360) SendMessageInteractive(data map[string]interface{}) ([]rest.ISendMessageResponse, error)
func (*D360) SendMessageTemplate ¶
func (d *D360) SendMessageTemplate(data map[string]interface{}) ([]rest.ISendMessageResponse, error)
type D360_Action ¶
type D360_Action struct {
Buttons []D360_Button `json:"buttons"`
}
type D360_Button ¶
type D360_Button struct { Type string `json:"type"` // "reply" "text" Text string `json:"text,omitempty"` Reply D360_Reply `json:"reply,omitempty"` }
type D360_Contact ¶
type D360_Document ¶
type D360_Document struct { Filename string `json:"filename,omitempty"` ID string `json:"id,omitempty"` Link string `json:"link,omitempty"` Provider D360_Provider `json:"provider,omitempty"` }
type D360_Footer ¶
type D360_Footer struct {
}type D360_Header ¶
type D360_Header struct { Type string `json:"type"` // "text" | "image" | "video" | "document" Text string `json:"text,omitempty"` Document D360_Document `json:"document,omitempty"` Video D360_Video `json:"video,omitempty"` Image D360_Image `json:"image,omitempty"` }
type D360_Image ¶
type D360_Interacrive ¶
type D360_Interacrive struct { Type string `json:"type"` // "button" Header D360_Header `json:"header,omitempty"` Body D360_Body `json:"body,omitempty"` Action D360_Action `json:"action,omitempty"` }
type D360_Language ¶
type D360_Message ¶
type D360_Message struct {
ID string `json:"id"`
}
func (*D360_Message) GetID ¶
func (d *D360_Message) GetID() string
type D360_MessageInteractiveRequest ¶
type D360_MessageInteractiveRequest struct { RecipientType string `json:"recipient_type,omitempty"` To string `json:"to"` Type string `json:"type"` Interactive D360_Interacrive `json:"interactive,omitempty"` }
type D360_MessageRequest ¶
type D360_MessageRequest struct { To string `json:"to"` Type string `json:"type"` RecipientType string `json:"recipient_type,omitempty"` Text D360_Text `json:"text,omitempty"` Template D360_TemplateToMessage `json:"template,omitempty"` }
type D360_MessageResponse ¶
type D360_MessageResponse struct { Messages []D360_Message `json:"messages"` Contacts []D360_Contact `json:"contacts"` Meta D360_Meta `json:"meta"` }
type D360_MessageTemplateRequest ¶
type D360_MessageTemplateRequest struct { RecipientType string `json:"recipient_type,omitempty"` To string `json:"to"` Type string `json:"type"` Template D360_TemplateToMessage `json:"template,omitempty"` }
type D360_Parser ¶
type D360_Parser struct {
// contains filtered or unexported fields
}
func NewD360Parser ¶
func NewD360Parser(data map[string]interface{}) *D360_Parser
func (*D360_Parser) SendInteractiveMessageResquest ¶
func (d *D360_Parser) SendInteractiveMessageResquest() (*D360_MessageInteractiveRequest, error)
func (*D360_Parser) SendTemplateMessage ¶
func (d *D360_Parser) SendTemplateMessage() (*D360_MessageTemplateRequest, error)
type D360_Provider ¶
type D360_Provider struct {
Name string `json:"name"`
}
type D360_Reply ¶
type D360_Template ¶
type D360_TemplateComponent ¶
type D360_TemplateComponent struct { Format string `json:"format,omitempty"` Text string `json:"text,omitempty"` Type string `json:"type"` Buttons []D360_Button `json:"buttons,omitempty"` Parameters []D360_TemplateParameter `json:"parameters,omitempty"` }
type D360_TemplateParameter ¶
type D360_TemplateParameter struct { Type string `json:"type,omitempty"` Image D360_Image `json:"image,omitempty"` Text string `json:"text,omitempty"` }
type D360_TemplateToMessage ¶
type D360_TemplateToMessage struct { Components []D360_TemplateComponent `json:"components"` Language D360_Language `json:"language"` Name string `json:"name"` Namespace string `json:"namespace"` }
type D360_Video ¶
type D360_Video struct { ID string `json:"id,omitempty"` Link string `json:"link,omitempty"` Provider D360_Provider `json:"provider,omitempty"` }
Click to show internal directories.
Click to hide internal directories.