lib/monday/resources/activity_log.rb in monday_ruby-0.6.2 vs lib/monday/resources/activity_log.rb in monday_ruby-1.0.0
- old
+ new
@@ -1,23 +1,25 @@
# frozen_string_literal: true
+require_relative "base"
+
module Monday
module Resources
# Represents Monday.com's activity log resource.
- module ActivityLog
+ 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 activity_logs(board_ids, args: {}, select: DEFAULT_SELECT)
- query = "query { boards(ids: #{board_ids}) " \
- "{ activity_logs#{Util.format_args(args)} {#{Util.format_select(select)}}}}"
+ 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(query)
+ make_request(request_query)
end
end
end
end