Documentation
¶
Index ¶
- type AddLabelsRequest
- type ChatwootClient
- func (client *ChatwootClient) AddLabel(conversationId int, label string) error
- func (client *ChatwootClient) AddLabels(conversationId int, labels []string) error
- func (client *ChatwootClient) Assign(conversationId int, assignee_id int) error
- func (client *ChatwootClient) AssignTeam(conversationId int, team_id int) error
- func (client *ChatwootClient) CreateContact(createContactRequest CreateContactRequest) (CreateContactResponse, error)
- func (client *ChatwootClient) CreateIncomingMessage(conversationId int, content string) (CreateNewMessageResponse, error)
- func (client *ChatwootClient) CreateIncomingPrivateMessage(conversationId int, content string) (CreateNewMessageResponse, error)
- func (client *ChatwootClient) CreateNewConversation(createNewConversationRequest CreateNewConversationRequest) (CreateNewConversationResponse, error)
- func (client *ChatwootClient) CreateNewMessage(conversationId int, createMessageRequest CreateNewMessageRequest) (CreateNewMessageResponse, error)
- func (client *ChatwootClient) CreateOutgoingMessage(conversationId int, content string) (CreateNewMessageResponse, error)
- func (client *ChatwootClient) CreateOutgoingPrivateMessage(conversationId int, content string) (CreateNewMessageResponse, error)
- func (client *ChatwootClient) GetMessages(conversationId string) (ChatwootMessages, error)
- func (client *ChatwootClient) SearchContact(query string) (SearchContactResponse, error)
- type ChatwootMessages
- type Contact
- type ContactInbox
- type CreateContactPayload
- type CreateContactRequest
- type CreateContactResponse
- type CreateNewConversationRequest
- type CreateNewConversationResponse
- type CreateNewMessageRequest
- type CreateNewMessageResponse
- type GetMessagesResponse
- type SearchContactResponse
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type AddLabelsRequest ¶
type AddLabelsRequest struct {
Labels []string `json:"labels"`
}
type ChatwootClient ¶
Please note that certain functions like to add labels or assign agents are blocked when using an Agent Bot Token therefore an AgentToken has to be provided. The client uses the AgentBotToken wherever possible.
func NewChatwootClient ¶
func NewChatwootClient(baseUrl string, accountId int, agentBotToken string) ChatwootClient
func NewChatwootClientWithAgentToken ¶
func NewChatwootClientWithAgentToken(baseUrl string, accountId int, agentBotToken string, agentToken string) ChatwootClient
func (*ChatwootClient) AddLabel ¶
func (client *ChatwootClient) AddLabel(conversationId int, label string) error
func (*ChatwootClient) AddLabels ¶
func (client *ChatwootClient) AddLabels(conversationId int, labels []string) error
func (*ChatwootClient) Assign ¶
func (client *ChatwootClient) Assign(conversationId int, assignee_id int) error
func (*ChatwootClient) AssignTeam ¶
func (client *ChatwootClient) AssignTeam(conversationId int, team_id int) error
func (*ChatwootClient) CreateContact ¶
func (client *ChatwootClient) CreateContact(createContactRequest CreateContactRequest) (CreateContactResponse, error)
func (*ChatwootClient) CreateIncomingMessage ¶
func (client *ChatwootClient) CreateIncomingMessage(conversationId int, content string) (CreateNewMessageResponse, error)
func (*ChatwootClient) CreateIncomingPrivateMessage ¶
func (client *ChatwootClient) CreateIncomingPrivateMessage(conversationId int, content string) (CreateNewMessageResponse, error)
func (*ChatwootClient) CreateNewConversation ¶
func (client *ChatwootClient) CreateNewConversation(createNewConversationRequest CreateNewConversationRequest) (CreateNewConversationResponse, error)
func (*ChatwootClient) CreateNewMessage ¶
func (client *ChatwootClient) CreateNewMessage(conversationId int, createMessageRequest CreateNewMessageRequest) (CreateNewMessageResponse, error)
func (*ChatwootClient) CreateOutgoingMessage ¶
func (client *ChatwootClient) CreateOutgoingMessage(conversationId int, content string) (CreateNewMessageResponse, error)
func (*ChatwootClient) CreateOutgoingPrivateMessage ¶
func (client *ChatwootClient) CreateOutgoingPrivateMessage(conversationId int, content string) (CreateNewMessageResponse, error)
func (*ChatwootClient) GetMessages ¶
func (client *ChatwootClient) GetMessages(conversationId string) (ChatwootMessages, error)
func (*ChatwootClient) SearchContact ¶
func (client *ChatwootClient) SearchContact(query string) (SearchContactResponse, error)
type ChatwootMessages ¶
type Contact ¶
type Contact struct {
ID int `json:"id"`
Email string `json:"email"`
ContactInboxes []ContactInbox `json:"contact_inboxes"`
}
type ContactInbox ¶
type ContactInbox struct {
SourceID string `json:"source_id"`
}
type CreateContactPayload ¶
type CreateContactPayload struct {
Contact Contact `json:"contact"`
}
type CreateContactRequest ¶
type CreateContactRequest struct {
InboxID int `json:"inbox_id,omitempty"`
Name string `json:"name,omitempty"`
EMail string `json:"email,omitempty"`
PhoneNumber string `json:"phone_number,omitempty"`
Avatar string `json:"avatar,omitempty"`
AvatarUrl string `json:"avatar_url,omitempty"`
Identifier string `json:"identifier,omitempty"`
CustomAttributes interface{} `json:"custom_attributes,omitempty"`
}
type CreateContactResponse ¶
type CreateContactResponse struct {
Payload CreateContactPayload `json:"payload"`
}
type CreateNewMessageRequest ¶
type CreateNewMessageRequest struct {
Content string `json:"content"`
MessageType string `json:"message_type"`
Private bool `json:"private"`
}
Struct that allows to build minimal create message requests.
func NewCreateNewMessageRequest ¶
func NewCreateNewMessageRequest(content string, messageType string, private bool) CreateNewMessageRequest
type GetMessagesResponse ¶
type GetMessagesResponse struct {
Meta interface{} `json:"meta"`
Payload ChatwootMessages `json:"payload"`
}
type SearchContactResponse ¶
type SearchContactResponse struct {
Payload []Contact `json:"payload"`
}
Click to show internal directories.
Click to hide internal directories.