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