Merge pull request #18 from blide/master

Manager -> User
This commit is contained in:
Alex Lushpai 2018-09-18 16:19:33 +03:00 committed by GitHub
commit c723bc0e5e
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 15 additions and 15 deletions

View File

@ -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)

View File

@ -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)

View File

@ -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"`
}