Class: Veye::Package::Search
- Inherits:
-
BaseExecutor
- Object
- BaseExecutor
- Veye::Package::Search
- Defined in:
- lib/veye/package/search.rb
Overview
This class includes commands for Package search and presentation renderers.
Class Method Summary collapse
-
.search(api_key, search_term, options) ⇒ Object
TODO: remove options param and extraxt option map in the bin/veye command.
Methods inherited from BaseExecutor
catch_request_error, filter_dependencies, get_formatter, process_dependencies, show_bulk_dependencies, show_dependencies, show_message, show_results, sort_dependencies_by_upgrade_complexity, valid_response?
Methods included from FormatHelpers
#format_exists?, #formats_attached?, #supported_format?
Class Method Details
.search(api_key, search_term, options) ⇒ Object
TODO: remove options param and extraxt option map in the bin/veye command
17 18 19 20 21 22 23 24 25 26 27 |
# File 'lib/veye/package/search.rb', line 17 def self.search(api_key, search_term, ) results = Veye::API::Package.search( api_key, search_term, [:language], ['group-id'], [:page] ) if valid_response?(results, "No results for `#{search_term}`") show_results(@output_formats, results.data, , results.data['paging']) end end |