Sha256: 57ba2b88ba43ffb3345b50b07348f6d66089231e99ba2600e531e55f342ec52f

Contents?: true

Size: 801 Bytes

Versions: 1

Compression:

Stored size: 801 Bytes

Contents

# frozen_string_literal: true

require_relative "base"

module Monday
  module Resources
    # Represents Monday.com's activity log resource.
    class ActivityLog < Base
      DEFAULT_SELECT = %w[id event data].freeze

      # Retrieves the activity logs for boards.
      #
      # Requires board_ids to retrieve the logs.
      # Allows filtering activity logs using the args option.
      # Allows customizing the values to retrieve using the select option.
      # By default, ID, event and data are retrieved.
      def query(board_ids, args: {}, select: DEFAULT_SELECT)
        request_query = "query{boards(ids: #{board_ids})" \
                        "{activity_logs#{Util.format_args(args)}{#{Util.format_select(select)}}}}"

        make_request(request_query)
      end
    end
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
monday_ruby-1.0.0 lib/monday/resources/activity_log.rb