Class: Veye::Github::Search

Inherits:
BaseExecutor show all
Defined in:
lib/veye/github/search.rb

Overview

Search - find projects on Github

Class Method Summary collapse

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: add missing tests + API call test



16
17
18
19
20
21
22
23
# File 'lib/veye/github/search.rb', line 16

def self.search(api_key, search_term, options)
  results = Veye::API::Github.search(
    api_key, search_term, options[:lang], options[:user], options[:page]
  )
  catch_request_error(results, 'No match')
  paging_dt = results.data['paging']
  show_results(@output_formats, results.data, options, paging_dt)
end