wework 1.2.1 → 1.2.2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/wework/api/agent.rb +2 -1
- data/lib/wework/api/methods/appchat.rb +66 -0
- data/lib/wework/version.rb +1 -1
- data/wework.gemspec +3 -3
- metadata +11 -10
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 829fa5cbcce5118fda6feb9a69ae0d0c7e9e141d9908c4d33acd28e60d0d7682
|
4
|
+
data.tar.gz: e35007b84e3975b0acf3b6bb04ac4aab7cd82a68d31425460182a22634c92f93
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: bbc0ea76b208d8250533ad00584d195c6008b2feb6750936b57e121d8d283eac04a14f5afed5ef4783275bfebd8e590b0fe78e9374983fabfe3c36f46db93def
|
7
|
+
data.tar.gz: c9d7b9dc30fb7c1f7f40066e8b7a7519349e99fd62882f1a35eb1b6dbd5351d10bfdb0813fa063f31188ffb91daffc50f8af367e47fabf230ac40a6567f64f5a
|
data/lib/wework/api/agent.rb
CHANGED
@@ -0,0 +1,66 @@
|
|
1
|
+
require "erb"
|
2
|
+
|
3
|
+
module Wework
|
4
|
+
module Api
|
5
|
+
module Methods
|
6
|
+
module Appchat
|
7
|
+
|
8
|
+
def create_group group_name, owner_id, group_user_ids, chat_id
|
9
|
+
post 'appchat/create',
|
10
|
+
name: group_name,
|
11
|
+
owner: owner_id,
|
12
|
+
userlist: group_user_ids,
|
13
|
+
chatid: chat_id
|
14
|
+
end
|
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={}
|
21
|
+
payload.merge! chatid: chat_id
|
22
|
+
post 'appchat/update', payload
|
23
|
+
end
|
24
|
+
|
25
|
+
def get_group chat_id
|
26
|
+
get 'appchat/get', { params: { chatid: chat_id } }
|
27
|
+
end
|
28
|
+
|
29
|
+
def group_text_message_send chat_id, content
|
30
|
+
message_send chat_id, {text: {content: content}, msgtype: 'text'}
|
31
|
+
end
|
32
|
+
|
33
|
+
def group_image_message_send chat_id, media_id
|
34
|
+
message_send chat_id, {image: {media_id: media_id}, msgtype: 'image'}
|
35
|
+
end
|
36
|
+
|
37
|
+
def group_voice_message_send chat_id, media_id
|
38
|
+
message_send chat_id, {voice: {media_id: media_id}, msgtype: 'voice'}
|
39
|
+
end
|
40
|
+
|
41
|
+
def group_file_message_send chat_id, media_id
|
42
|
+
message_send chat_id, {file: {media_id: media_id}, msgtype: 'file'}
|
43
|
+
end
|
44
|
+
|
45
|
+
def group_video_message_send chat_id, video={}
|
46
|
+
message_send chat_id, {video: video, msgtype: 'video'}
|
47
|
+
end
|
48
|
+
|
49
|
+
def group_textcard_message_send chat_id, textcard={}
|
50
|
+
message_send chat_id, {textcard: textcard, msgtype: 'textcard'}
|
51
|
+
end
|
52
|
+
|
53
|
+
def group_news_message_send chat_id, news=[]
|
54
|
+
message_send chat_id, {news: {articles: news}, msgtype: 'news'}
|
55
|
+
end
|
56
|
+
|
57
|
+
private
|
58
|
+
|
59
|
+
def message_send chat_id, payload={}
|
60
|
+
payload.merge!(chatid: chat_id)
|
61
|
+
post 'appchat/send', payload
|
62
|
+
end
|
63
|
+
end
|
64
|
+
end
|
65
|
+
end
|
66
|
+
end
|
data/lib/wework/version.rb
CHANGED
data/wework.gemspec
CHANGED
@@ -22,9 +22,9 @@ Gem::Specification.new do |spec|
|
|
22
22
|
|
23
23
|
spec.add_dependency 'http', '>= 2.2'
|
24
24
|
spec.add_dependency 'activesupport', '~> 5.0'
|
25
|
-
spec.add_dependency 'redis'
|
26
|
-
spec.add_dependency 'builder', '
|
27
|
-
spec.add_dependency 'sinatra', '
|
25
|
+
spec.add_dependency 'redis'
|
26
|
+
spec.add_dependency 'builder', '>= 3.2'
|
27
|
+
spec.add_dependency 'sinatra', '>= 2.0'
|
28
28
|
|
29
29
|
spec.add_development_dependency "bundler", "~> 1.13"
|
30
30
|
spec.add_development_dependency "rake", "~> 10.0"
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: wework
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.2.
|
4
|
+
version: 1.2.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- seandong
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2018-
|
11
|
+
date: 2018-11-07 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: http
|
@@ -42,42 +42,42 @@ dependencies:
|
|
42
42
|
name: redis
|
43
43
|
requirement: !ruby/object:Gem::Requirement
|
44
44
|
requirements:
|
45
|
-
- - "
|
45
|
+
- - ">="
|
46
46
|
- !ruby/object:Gem::Version
|
47
|
-
version: '
|
47
|
+
version: '0'
|
48
48
|
type: :runtime
|
49
49
|
prerelease: false
|
50
50
|
version_requirements: !ruby/object:Gem::Requirement
|
51
51
|
requirements:
|
52
|
-
- - "
|
52
|
+
- - ">="
|
53
53
|
- !ruby/object:Gem::Version
|
54
|
-
version: '
|
54
|
+
version: '0'
|
55
55
|
- !ruby/object:Gem::Dependency
|
56
56
|
name: builder
|
57
57
|
requirement: !ruby/object:Gem::Requirement
|
58
58
|
requirements:
|
59
|
-
- - "
|
59
|
+
- - ">="
|
60
60
|
- !ruby/object:Gem::Version
|
61
61
|
version: '3.2'
|
62
62
|
type: :runtime
|
63
63
|
prerelease: false
|
64
64
|
version_requirements: !ruby/object:Gem::Requirement
|
65
65
|
requirements:
|
66
|
-
- - "
|
66
|
+
- - ">="
|
67
67
|
- !ruby/object:Gem::Version
|
68
68
|
version: '3.2'
|
69
69
|
- !ruby/object:Gem::Dependency
|
70
70
|
name: sinatra
|
71
71
|
requirement: !ruby/object:Gem::Requirement
|
72
72
|
requirements:
|
73
|
-
- - "
|
73
|
+
- - ">="
|
74
74
|
- !ruby/object:Gem::Version
|
75
75
|
version: '2.0'
|
76
76
|
type: :runtime
|
77
77
|
prerelease: false
|
78
78
|
version_requirements: !ruby/object:Gem::Requirement
|
79
79
|
requirements:
|
80
|
-
- - "
|
80
|
+
- - ">="
|
81
81
|
- !ruby/object:Gem::Version
|
82
82
|
version: '2.0'
|
83
83
|
- !ruby/object:Gem::Dependency
|
@@ -172,6 +172,7 @@ files:
|
|
172
172
|
- lib/wework/api/contact.rb
|
173
173
|
- lib/wework/api/corp.rb
|
174
174
|
- lib/wework/api/methods/agent.rb
|
175
|
+
- lib/wework/api/methods/appchat.rb
|
175
176
|
- lib/wework/api/methods/approval.rb
|
176
177
|
- lib/wework/api/methods/batch.rb
|
177
178
|
- lib/wework/api/methods/checkin.rb
|