mirror of
https://github.com/retailcrm/mg-bot-api-client-go.git
synced 2024-11-21 12:26:06 +03:00
Manager -> User
This commit is contained in:
parent
2efd96b918
commit
85777b65d6
@ -361,7 +361,7 @@ func (c *MgClient) DialogClose(request uint64) (map[string]interface{}, int, err
|
||||
//
|
||||
// var client = v1.New("https://demo.url", "09jIJ")
|
||||
//
|
||||
// data, status, err := client.Messages(MessagesRequest{ManagerID:5})
|
||||
// data, status, err := client.Messages(MessagesRequest{UserID:5})
|
||||
//
|
||||
// if err != nil {
|
||||
// fmt.Printf("%v", err)
|
||||
|
@ -157,7 +157,7 @@ func TestMgClient_DialogAssign(t *testing.T) {
|
||||
c := client()
|
||||
i, err := strconv.ParseUint(os.Getenv("MG_BOT_DIALOG"), 10, 64)
|
||||
m, err := strconv.ParseUint(os.Getenv("MG_BOT_USER"), 10, 64)
|
||||
req := DialogAssignRequest{DialogID: i, ManagerID: m}
|
||||
req := DialogAssignRequest{DialogID: i, UserID: m}
|
||||
|
||||
_, status, err := c.DialogAssign(req)
|
||||
|
||||
|
26
v1/types.go
26
v1/types.go
@ -110,27 +110,27 @@ type (
|
||||
}
|
||||
|
||||
DialogsRequest struct {
|
||||
ID uint64 `url:"id,omitempty"`
|
||||
ChatID string `url:"chat_id,omitempty" json:"chat_id"`
|
||||
ManagerID string `url:"manager_id,omitempty" json:"manager_id"`
|
||||
BotID string `url:"bot_id,omitempty" json:"bot_id"`
|
||||
Assign uint8 `url:"assign,omitempty"`
|
||||
Active uint8 `url:"active,omitempty"`
|
||||
Since string `url:"since,omitempty"`
|
||||
Until string `url:"until,omitempty"`
|
||||
ID uint64 `url:"id,omitempty"`
|
||||
ChatID string `url:"chat_id,omitempty" json:"chat_id"`
|
||||
UserID string `url:"user_id,omitempty" json:"user_id"`
|
||||
BotID string `url:"bot_id,omitempty" json:"bot_id"`
|
||||
Assign uint8 `url:"assign,omitempty"`
|
||||
Active uint8 `url:"active,omitempty"`
|
||||
Since string `url:"since,omitempty"`
|
||||
Until string `url:"until,omitempty"`
|
||||
}
|
||||
|
||||
DialogAssignRequest struct {
|
||||
DialogID uint64 `url:"dialog_id,omitempty" json:"dialog_id"`
|
||||
ManagerID uint64 `url:"manager_id,omitempty" json:"manager_id"`
|
||||
BotID uint64 `url:"bot_id,omitempty" json:"bot_id"`
|
||||
DialogID uint64 `url:"dialog_id,omitempty" json:"dialog_id"`
|
||||
UserID uint64 `url:"user_id,omitempty" json:"user_id"`
|
||||
BotID uint64 `url:"bot_id,omitempty" json:"bot_id"`
|
||||
}
|
||||
|
||||
MessagesRequest struct {
|
||||
ID uint64 `url:"id,omitempty"`
|
||||
ChatID uint64 `url:"chat_id,omitempty" json:"chat_id"`
|
||||
DialogID uint64 `url:"dialog_id,omitempty" json:"dialog_id"`
|
||||
ManagerID uint64 `url:"manager_id,omitempty" json:"manager_id"`
|
||||
UserID uint64 `url:"user_id,omitempty" json:"user_id"`
|
||||
CustomerID uint64 `url:"customer_id,omitempty" json:"customer_id"`
|
||||
BotID uint64 `url:"bot_id,omitempty" json:"bot_id"`
|
||||
ChannelID uint64 `url:"channel_id,omitempty" json:"channel_id"`
|
||||
@ -274,7 +274,7 @@ type (
|
||||
DialogAssignResponse struct {
|
||||
Responsible Responsible `json:"responsible"`
|
||||
PreviousResponsible Responsible `json:"previous_responsible,omitempty"`
|
||||
LeftManagerID uint64 `json:"left_manager_id,omitempty"`
|
||||
LeftUserID uint64 `json:"left_user_id,omitempty"`
|
||||
IsReAssign bool `json:"is_reassign"`
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user