wework 1.2.2 → 1.2.3
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.md +2 -0
- data/lib/wework/api/methods/appchat.rb +18 -22
- data/lib/wework/version.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 7a4345fc2ec9f6018f7540722d635d74c2b4f6b2886abbe93085c1d44630f744
|
4
|
+
data.tar.gz: a364b04e9f381c81c3d5b8337c51a5454b63258072072474aea11abedeee6960
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: dde259ae99f2b8aea670639cd851b75414ae03fdbb74a1b7b18a5018a41d53c47d331603d02f68f7cfa156acce7c9015694d3be855ef453fc4e1da00bb5afc92
|
7
|
+
data.tar.gz: 22ac7e5b2dd4d09740db1206d046545ba76387317b8e4fda21fd8e0a0585e5d9d36ae5afcc94de3023de6168a0d047d469dcf83da3c0d6470da1b27204141d98
|
data/README.md
CHANGED
@@ -152,6 +152,8 @@ values = JSON.parse data
|
|
152
152
|
|
153
153
|
[Wework::Api::Methods::Message](https://github.com/mycolorway/wework/blob/master/lib/wework/api/methods/message.rb)
|
154
154
|
|
155
|
+
[Wework::Api::Methods::Appchat](https://github.com/mycolorway/wework/blob/master/lib/wework/api/methods/appchat.rb)
|
156
|
+
|
155
157
|
[Wework::Api::Methods::Media](https://github.com/mycolorway/wework/blob/master/lib/wework/api/methods/media.rb)
|
156
158
|
|
157
159
|
[Wework::Api::Methods::Menu](https://github.com/mycolorway/wework/blob/master/lib/wework/api/methods/menu.rb)
|
@@ -5,7 +5,7 @@ module Wework
|
|
5
5
|
module Methods
|
6
6
|
module Appchat
|
7
7
|
|
8
|
-
def
|
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,
|
@@ -13,50 +13,46 @@ module Wework
|
|
13
13
|
chatid: chat_id
|
14
14
|
end
|
15
15
|
|
16
|
-
|
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
|
21
|
+
def appchat_get chat_id
|
26
22
|
get 'appchat/get', { params: { chatid: chat_id } }
|
27
23
|
end
|
28
24
|
|
29
|
-
def
|
30
|
-
|
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
|
34
|
-
|
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
|
38
|
-
|
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
|
42
|
-
|
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
|
46
|
-
|
41
|
+
def video_appchat_send chat_id, video={}
|
42
|
+
appchat_send chat_id, {video: video, msgtype: 'video'}
|
47
43
|
end
|
48
44
|
|
49
|
-
def
|
50
|
-
|
45
|
+
def textcard_appchat_send chat_id, textcard={}
|
46
|
+
appchat_send chat_id, {textcard: textcard, msgtype: 'textcard'}
|
51
47
|
end
|
52
48
|
|
53
|
-
def
|
54
|
-
|
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
|
55
|
+
def appchat_send chat_id, payload={}
|
60
56
|
payload.merge!(chatid: chat_id)
|
61
57
|
post 'appchat/send', payload
|
62
58
|
end
|
data/lib/wework/version.rb
CHANGED