grape-slack-bot 1.8.1 → 1.8.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/CHANGELOG.md +28 -22
- data/README.md +3 -1
- data/lib/slack_bot/api_client.rb +41 -0
- data/lib/slack_bot.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 462d6c0759e3fb43903d74d3f8e68abbd17d856c5075a8ab80e7cfee8e94889b
|
4
|
+
data.tar.gz: 19261c6d660846ff858f6121287736fe5710fe72b71c4655a7a7fa0b6c24de24
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 5969bd2cfbf909f3ad7e25674f0a8cb8ed79a1c5a4da6e11830a845dc1304596b3eabdb982322dbcbc98f0ec248d05ebdbf807517acd06a7a65335e1a9805da4
|
7
|
+
data.tar.gz: ada048cc7462c59bf8b5678b0e69feac4e4192ad5f15202d5fbddde1060d1e52654c9cec29eab287dd5894f71ac2d4e3bbd462325e34813497a64108d1d011f2
|
data/CHANGELOG.md
CHANGED
@@ -1,92 +1,98 @@
|
|
1
|
-
#
|
1
|
+
# CHANGELOG
|
2
|
+
|
3
|
+
## 1.8.2
|
4
|
+
|
5
|
+
- Update Slack API client to have more chat methods
|
6
|
+
|
7
|
+
## 1.8.1
|
2
8
|
|
3
9
|
- Clean up dependencies
|
4
10
|
|
5
|
-
|
11
|
+
## 1.8.0
|
6
12
|
|
7
13
|
- Rewind incoming request body when reading it
|
8
14
|
|
9
|
-
|
15
|
+
## 1.7.2
|
10
16
|
|
11
17
|
- Fix request secret headers parsing
|
12
18
|
|
13
|
-
|
19
|
+
## 1.7.0
|
14
20
|
|
15
21
|
- Add `usersList` and `chat.postEphemeral` methods
|
16
22
|
- Core upgrades and clean up
|
17
23
|
|
18
|
-
|
24
|
+
## 1.6.3
|
19
25
|
|
20
26
|
- Implement callback for modals
|
21
27
|
|
22
|
-
|
28
|
+
## 1.6.2
|
23
29
|
|
24
30
|
- Allow custom handler names for associating with interactions
|
25
31
|
|
26
|
-
|
32
|
+
## 1.6.1
|
27
33
|
|
28
34
|
- Unify command, event and interaction rendering methods
|
29
35
|
|
30
|
-
|
36
|
+
## 1.6.0
|
31
37
|
|
32
38
|
- Better visibility for missing handlers
|
33
39
|
|
34
|
-
|
40
|
+
## 1.5.8
|
35
41
|
|
36
42
|
- Fix event registration
|
37
43
|
- Update event interaction example
|
38
44
|
|
39
|
-
|
45
|
+
## 1.5.7
|
40
46
|
|
41
47
|
- Raise error if handler class not resolved
|
42
48
|
- App home interaction example added
|
43
49
|
- Callback logic and usage fixed
|
44
50
|
- Views improvements
|
45
51
|
|
46
|
-
|
52
|
+
## 1.5.0
|
47
53
|
|
48
54
|
- Complete upgrade of callback storage logic
|
49
55
|
|
50
|
-
|
56
|
+
## 1.4.0
|
51
57
|
|
52
58
|
- Allow setting callback expiration time on save and update
|
53
59
|
|
54
|
-
|
60
|
+
## 1.3.0
|
55
61
|
|
56
62
|
- Clean up callback arguments, remove unused `method_name`
|
57
63
|
|
58
|
-
|
64
|
+
## 1.2.3
|
59
65
|
|
60
66
|
- Minor fix for Events API
|
61
67
|
|
62
|
-
|
68
|
+
## 1.2.2
|
63
69
|
|
64
70
|
- `SlackBot::Callback.find` method will raise `SlackBot::Errors::CallbackNotFound` if callback is not resolved or has wrong data
|
65
71
|
|
66
|
-
|
72
|
+
## 1.2.1
|
67
73
|
|
68
74
|
- Extract `SlackBot::Logger` to separate file
|
69
75
|
|
70
|
-
|
76
|
+
## 1.2.0
|
71
77
|
|
72
78
|
- Remove `Rails.logger` dependency, make logger configurable
|
73
79
|
|
74
|
-
|
80
|
+
## 1.1.0
|
75
81
|
|
76
82
|
- Set minimum ruby version requirement to 2.5.0
|
77
83
|
|
78
|
-
|
84
|
+
## 1.0.5
|
79
85
|
|
80
86
|
- Add superclass `SlackBot::Error` for all errors
|
81
87
|
|
82
|
-
|
88
|
+
## 1.0.2
|
83
89
|
|
84
90
|
- Soften dependencies version requirements
|
85
91
|
|
86
|
-
|
92
|
+
## 1.0.1
|
87
93
|
|
88
94
|
- Bump Faraday version to 2.7.10
|
89
95
|
|
90
|
-
|
96
|
+
## 1.0.0
|
91
97
|
|
92
98
|
- Initial version
|
data/README.md
CHANGED
@@ -4,7 +4,9 @@
|
|
4
4
|
|
5
5
|
Extensible Slack bot implementation gem for [ruby-grape](https://github.com/ruby-grape/grape)
|
6
6
|
|
7
|
-
|
7
|
+
Made in [Kisko Labs](https://www.kiskolabs.com).
|
8
|
+
|
9
|
+
[](https://www.kiskolabs.com)
|
8
10
|
|
9
11
|
## Install
|
10
12
|
|
data/lib/slack_bot/api_client.rb
CHANGED
@@ -53,6 +53,47 @@ module SlackBot
|
|
53
53
|
ApiResponse.new { client.post("chat.update", {channel: channel, ts: ts, text: text, blocks: blocks}.to_json) }
|
54
54
|
end
|
55
55
|
|
56
|
+
def chat_delete(channel:, ts:)
|
57
|
+
ApiResponse.new { client.post("chat.delete", {channel: channel, ts: ts}.to_json) }
|
58
|
+
end
|
59
|
+
|
60
|
+
def chat_unfurl(channel:, ts:, unfurls:, source: nil, unfurl_id: nil, user_auth_blocks: nil, user_auth_message: nil, user_auth_required: nil, user_auth_url: nil)
|
61
|
+
ApiResponse.new { client.post("chat.unfurl", {
|
62
|
+
channel: channel,
|
63
|
+
ts: ts,
|
64
|
+
unfurls: unfurls,
|
65
|
+
source: source,
|
66
|
+
unfurl_id: unfurl_id,
|
67
|
+
user_auth_blocks: user_auth_blocks,
|
68
|
+
user_auth_message: user_auth_message,
|
69
|
+
user_auth_required: user_auth_required,
|
70
|
+
user_auth_url: user_auth_url
|
71
|
+
}.to_json) }
|
72
|
+
end
|
73
|
+
|
74
|
+
def chat_schedule_message(channel:, text:, post_at:, blocks: nil)
|
75
|
+
ApiResponse.new { client.post("chat.scheduleMessage", {channel: channel, text: text, post_at: post_at, blocks: blocks}.to_json) }
|
76
|
+
end
|
77
|
+
|
78
|
+
def scheduled_messages_list(channel: nil, cursor: nil, latest: nil, limit: nil, oldest: nil, team_id: nil)
|
79
|
+
ApiResponse.new { client.post("scheduled_messages.list", {
|
80
|
+
channel: channel,
|
81
|
+
cursor: cursor,
|
82
|
+
latest: latest,
|
83
|
+
limit: limit,
|
84
|
+
oldest: oldest,
|
85
|
+
team_id: team_id
|
86
|
+
}.to_json) }
|
87
|
+
end
|
88
|
+
|
89
|
+
def chat_delete_scheduled_message(channel:, scheduled_message_id:)
|
90
|
+
ApiResponse.new { client.post("chat.deleteScheduledMessage", {channel: channel, scheduled_message_id: scheduled_message_id}.to_json) }
|
91
|
+
end
|
92
|
+
|
93
|
+
def chat_get_permalink(channel:, message_ts:)
|
94
|
+
ApiResponse.new { client.post("chat.getPermalink", {channel: channel, message_ts: message_ts}.to_json) }
|
95
|
+
end
|
96
|
+
|
56
97
|
def users_info(user_id:)
|
57
98
|
ApiResponse.new { client.post("users.info", {user: user_id}.to_json) }
|
58
99
|
end
|
data/lib/slack_bot.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: grape-slack-bot
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.8.
|
4
|
+
version: 1.8.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Andrei Makarov
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2024-12-
|
11
|
+
date: 2024-12-17 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rack
|