@@ -5,58 +5,54 @@ module Api
5
5
module Methods
6
6
module Appchat
7
7
8
- def create_group group_name , owner_id , group_user_ids , chat_id
8
+ def appchat_create group_name , owner_id , group_user_ids , chat_id
9
9
post 'appchat/create' ,
10
10
name : group_name ,
11
11
owner : owner_id ,
12
12
userlist : group_user_ids ,
13
13
chatid : chat_id
14
14
end
15
15
16
- # name: group_name
17
- # owner: owner_id
18
- # add_user_list: add_user_list
19
- # del_user_list: del_user_list
20
- def update_group chat_id , payload = { }
16
+ def appchat_update chat_id , payload = { }
21
17
payload . merge! chatid : chat_id
22
18
post 'appchat/update' , payload
23
19
end
24
20
25
- def get_group chat_id
21
+ def appchat_get chat_id
26
22
get 'appchat/get' , { params : { chatid : chat_id } }
27
23
end
28
24
29
- def group_text_message_send chat_id , content
30
- message_send chat_id , { text : { content : content } , msgtype : 'text' }
25
+ def text_appchat_send chat_id , content
26
+ appchat_send chat_id , { text : { content : content } , msgtype : 'text' }
31
27
end
32
28
33
- def group_image_message_send chat_id , media_id
34
- message_send chat_id , { image : { media_id : media_id } , msgtype : 'image' }
29
+ def image_appchat_send chat_id , media_id
30
+ appchat_send chat_id , { image : { media_id : media_id } , msgtype : 'image' }
35
31
end
36
32
37
- def group_voice_message_send chat_id , media_id
38
- message_send chat_id , { voice : { media_id : media_id } , msgtype : 'voice' }
33
+ def voice_appchat_send chat_id , media_id
34
+ appchat_send chat_id , { voice : { media_id : media_id } , msgtype : 'voice' }
39
35
end
40
36
41
- def group_file_message_send chat_id , media_id
42
- message_send chat_id , { file : { media_id : media_id } , msgtype : 'file' }
37
+ def file_appchat_send chat_id , media_id
38
+ appchat_send chat_id , { file : { media_id : media_id } , msgtype : 'file' }
43
39
end
44
40
45
- def group_video_message_send chat_id , video = { }
46
- message_send chat_id , { video : video , msgtype : 'video' }
41
+ def video_appchat_send chat_id , video = { }
42
+ appchat_send chat_id , { video : video , msgtype : 'video' }
47
43
end
48
44
49
- def group_textcard_message_send chat_id , textcard = { }
50
- message_send chat_id , { textcard : textcard , msgtype : 'textcard' }
45
+ def textcard_appchat_send chat_id , textcard = { }
46
+ appchat_send chat_id , { textcard : textcard , msgtype : 'textcard' }
51
47
end
52
48
53
- def group_news_message_send chat_id , news = [ ]
54
- message_send chat_id , { news : { articles : news } , msgtype : 'news' }
49
+ def news_appchat_send chat_id , news = [ ]
50
+ appchat_send chat_id , { news : { articles : news } , msgtype : 'news' }
55
51
end
56
52
57
53
private
58
54
59
- def message_send chat_id , payload = { }
55
+ def appchat_send chat_id , payload = { }
60
56
payload . merge! ( chatid : chat_id )
61
57
post 'appchat/send' , payload
62
58
end
0 commit comments