-
-
Notifications
You must be signed in to change notification settings - Fork 223
Expand file tree
/
Copy pathadmin_analytics_messages.rb
More file actions
36 lines (34 loc) · 2.35 KB
/
admin_analytics_messages.rb
File metadata and controls
36 lines (34 loc) · 2.35 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
# frozen_string_literal: true
# This file was auto-generated by lib/tasks/web.rake
module Slack
module Cli
class App
desc 'AdminAnalyticsMessages methods.'
command 'admin_analytics_messages' do |g|
g.desc 'Retrieves activity metrics for messages from a given channel.'
g.long_desc %( Retrieves activity metrics for messages from a given channel. )
g.command 'activity' do |c|
c.flag 'channel', desc: 'Channel ID for channel of the message activity to query.'
c.flag 'oldest_ts', desc: 'Oldest timestamp to include in the results. Defaults to 7 days before current time. If not passed while still passing the latest_ts parameter, defaults to 7 days before latest_ts.'
c.flag 'latest_ts', desc: 'Most recent timestamp to include in results. Defaults to current time. If not passed while still passing the oldest_ts parameter, defaults to 7 days after oldest_ts.'
c.flag 'cursor', desc: "Paginate through collections of data by setting the cursor parameter to a next_cursor attribute returned by a previous request's response_metadata. Default value fetches the first 'page' of the collection."
c.flag 'limit', desc: 'Maximum number of entries to return. The maximum limit is 100.'
c.action do |_global_options, options, _args|
puts JSON.dump(@client.admin_analytics_messages_activity(options))
end
end
g.desc 'Retrieves metadata for a list of messages from a given channel.'
g.long_desc %( Retrieves metadata for a list of messages from a given channel. )
g.command 'metadata' do |c|
c.flag 'channel', desc: 'Channel ID for channel containing the messages to query.'
c.flag 'oldest_ts', desc: 'Oldest timestamp to include in the results.'
c.flag 'latest_ts', desc: 'Most recent timestamp to include in the results. If not passed, defaults to current time.'
c.flag 'cursor', desc: "Paginate through collections of data by setting the cursor parameter to a next_cursor attribute returned by a previous request's response_metadata. Default value fetches the first 'page' of the collection. See pagination for more details."
c.action do |_global_options, options, _args|
puts JSON.dump(@client.admin_analytics_messages_metadata(options))
end
end
end
end
end
end