Documentation ¶
Index ¶
- Constants
- type Chat
- func (c *Chat) CloseWebView(to string) error
- func (c *Chat) FindFriend(keyword string) (Friend, error)
- func (c *Chat) GetFriendList() ([]Friend, error)
- func (c *Chat) GetOneChatAccessToken(oneChatToken string) (string, error)
- func (c *Chat) GetProfile(oneChatToken string) (Profile, error)
- func (c *Chat) GetSharedToken(oneChatToken string) (string, error)
- func (c *Chat) PushBroadcastFromByte(to []string, file []byte) error
- func (c *Chat) PushBroadcastFromFile(to []string, filename string) error
- func (c *Chat) PushBroadcastMessage(to []string, msg string) error
- func (c *Chat) PushLinkTemplate(to string, title string, detail string, img string, choices []Choice, ...) error
- func (c *Chat) PushQuickReplyTextType(to string, message string, quickReplies []QuickReplyTextType) error
- func (c *Chat) PushTextMessage(to string, msg string, customNotify *string) error
- func (c *Chat) PushWebView(to string, title string, detail string, img string, choices []Choice, ...) error
- type Choice
- type Elements
- type Friend
- type FriendList
- type Group
- type LoginOneChatAccount
- type LoginOneChatResult
- type Profile
- type QuickReplyTextType
Constants ¶
View Source
const ( ProductionEndpoint = "https://chat-api.one.th" TemplateTypeWebView = "webview" TemplateTypeLink = "link" )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Chat ¶
func NewChatBot ¶
func (*Chat) CloseWebView ¶
func (*Chat) GetFriendList ¶
func (*Chat) GetOneChatAccessToken ¶
func (*Chat) PushBroadcastFromByte ¶
func (*Chat) PushBroadcastFromFile ¶
func (*Chat) PushBroadcastMessage ¶
func (*Chat) PushLinkTemplate ¶
func (*Chat) PushQuickReplyTextType ¶
func (c *Chat) PushQuickReplyTextType(to string, message string, quickReplies []QuickReplyTextType) error
func (*Chat) PushTextMessage ¶
type FriendList ¶
type LoginOneChatAccount ¶
type LoginOneChatAccount struct { Profile struct { AccessToken string `json:"access_token"` AccountTitleEng string `json:"account_title_eng"` AccountTitleTh string `json:"account_title_th"` Email string `json:"email"` FirstNameEng string `json:"first_name_eng"` FirstNameTh string `json:"first_name_th"` IdCardNum string `json:"id_card_num"` IdCardType string `json:"id_card_type"` Ip string `json:"ip"` LastNameEng string `json:"last_name_eng"` LastNameTh string `json:"last_name_th"` Loa string `json:"loa"` Name string `json:"name"` NickName string `jaon:"nickname"` OneId string `json:"one_id"` Phone string `json:"phone"` Status string `json:"status"` TokenService string `json:"tokenservice"` TokenUser string `json:"tokenuser"` Type string `json:"type"` Username string `json:"username"` } `json:"profile"` }
type LoginOneChatResult ¶
type LoginOneChatResult struct { Account LoginOneChatAccount `json:"account"` Business []string `json:"business"` Government []string `json:"goverment"` Message string `json:"message"` Status string `json:"status"` }
Click to show internal directories.
Click to hide internal directories.