slack-ruby/slack-ruby-client

View on GitHub
bin/commands/apps_activities.rb

Summary

Maintainability
A
3 hrs
Test Coverage
# frozen_string_literal: true
# This file was auto-generated by lib/tasks/web.rake

module Slack
  module Cli
    class App
      desc 'AppsActivities methods.'
      command 'apps_activities' do |g|
        g.desc 'Get logs for a specified app'
        g.long_desc %( Get logs for a specified app )
        g.command 'list' do |c|
          c.flag 'app_id', desc: 'The id of the app to get activities from.'
          c.flag 'component_id', desc: "The component id of log events to be returned. Will be 'FnXXXXXX' for functions, and 'WfXXXXXX' for worflows."
          c.flag 'component_type', desc: "The component type of log events to be returned. Acceptable values are ('events_api', 'workflows', 'functions', 'tables')."
          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. See pagination for more detail."
          c.flag 'limit', desc: 'The maximum number of items to return.'
          c.flag 'log_event_type', desc: 'The event type of log events to be returned.'
          c.flag 'max_date_created', desc: 'The latest timestamp of the log to retrieve (epoch microseconds).'
          c.flag 'min_date_created', desc: 'The earliest timestamp of the log to retrieve (epoch microseconds).'
          c.flag 'min_log_level', desc: "The minimum log level of the log events to be returned. Defaults to 'info'. Acceptable values (in order of relative importance from smallest to largest) are ('trace', 'debug', 'info', 'warn', 'error', 'fatal')."
          c.flag 'sort_direction', desc: 'The direction you want the data sorted by (always by timestamp).'
          c.flag 'source', desc: "The source of log events to be returned. Acceptable values are ('slack', 'developer')."
          c.flag 'team_id', desc: 'The team who owns this log.'
          c.flag 'trace_id', desc: 'The trace id of log events to be returned.'
          c.action do |_global_options, options, _args|
            puts JSON.dump(@client.apps_activities_list(options))
          end
        end
      end
    end
  end
end