lib/monday/resources/board_view.rb in monday_ruby-0.6.2 vs lib/monday/resources/board_view.rb in monday_ruby-1.0.0

- old
+ new

@@ -1,21 +1,23 @@ # frozen_string_literal: true +require_relative "base" + module Monday module Resources # Represents Monday.com's board view resource. - module BoardView + class BoardView < Base DEFAULT_SELECT = %w[id name type].freeze # Retrieves board views from a specific board. # # Allows filtering views using the args option. # Allows customizing the values to retrieve using the select option. # By default, ID, name and type fields are retrieved. - def board_views(args: {}, select: DEFAULT_SELECT) - query = "query { boards#{Util.format_args(args)} { views {#{Util.format_select(select)}}}}" + def query(args: {}, select: DEFAULT_SELECT) + request_query = "query{boards#{Util.format_args(args)}{views{#{Util.format_select(select)}}}}" - make_request(query) + make_request(request_query) end end end end