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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 829fa5cbcce5118fda6feb9a69ae0d0c7e9e141d9908c4d33acd28e60d0d7682
4
- data.tar.gz: e35007b84e3975b0acf3b6bb04ac4aab7cd82a68d31425460182a22634c92f93
3
+ metadata.gz: 7a4345fc2ec9f6018f7540722d635d74c2b4f6b2886abbe93085c1d44630f744
4
+ data.tar.gz: a364b04e9f381c81c3d5b8337c51a5454b63258072072474aea11abedeee6960
5
5
  SHA512:
6
- metadata.gz: bbc0ea76b208d8250533ad00584d195c6008b2feb6750936b57e121d8d283eac04a14f5afed5ef4783275bfebd8e590b0fe78e9374983fabfe3c36f46db93def
7
- data.tar.gz: c9d7b9dc30fb7c1f7f40066e8b7a7519349e99fd62882f1a35eb1b6dbd5351d10bfdb0813fa063f31188ffb91daffc50f8af367e47fabf230ac40a6567f64f5a
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 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,
@@ -13,50 +13,46 @@ module Wework
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
@@ -1,3 +1,3 @@
1
1
  module Wework
2
- VERSION = '1.2.2'.freeze
2
+ VERSION = '1.2.3'.freeze
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: wework
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.2.2
4
+ version: 1.2.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - seandong