Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ErrorResponse ¶
type ListWebhooks ¶
type MessageReceive ¶
type MessageReceive struct {
Trigger string `json:"trigger"`
App struct {
ID string `json:"_id"`
} `json:"app"`
Messages []struct {
ID string `json:"_id"`
Type string `json:"type"`
Text string `json:"text"`
Role string `json:"role"`
AuthorID string `json:"authorId"`
Name string `json:"name"`
Received float64 `json:"received"`
Source struct {
Type string `json:"type"`
} `json:"source"`
} `json:"messages"`
AppUser struct {
ID string `json:"_id"`
UserID string `json:"userId"`
Properties struct {
} `json:"properties"`
SignedUpAt time.Time `json:"signedUpAt"`
Clients []struct {
Active bool `json:"active"`
ID string `json:"id"`
LastSeen time.Time `json:"lastSeen"`
Platform string `json:"platform"`
} `json:"clients"`
} `json:"appUser"`
}
type RequestMessage ¶
type ResponseMessage ¶
type ResponseMessage struct {
Message struct {
ID string `json:"_id"`
AuthorID string `json:"authorId"`
Role string `json:"role"`
Type string `json:"type"`
Name string `json:"name"`
Text string `json:"text"`
AvatarURL string `json:"avatarUrl"`
Received float64 `json:"received"`
} `json:"message"`
Conversation struct {
ID string `json:"_id"`
UnreadCount int `json:"unreadCount"`
} `json:"conversation"`
}
type Smooch ¶
func (*Smooch) ListWebhooks ¶
func (s *Smooch) ListWebhooks() (*ListWebhooks, error)
func (*Smooch) SendMessage ¶
func (s *Smooch) SendMessage(userID, text string) (*ResponseMessage, error)
func (*Smooch) SubscribeToWebhook ¶
Click to show internal directories.
Click to hide internal directories.