module AndroidAppIndex
Constants
- VERSION
Public Class Methods
get(package)
click to toggle source
# File lib/android_app_index.rb, line 77 def self.get(package) @index.get_object(package) rescue Algolia::AlgoliaProtocolError # Handle the error that occurs if the app is not yet indexed. index package end
index(package, name = nil, icon_url = nil)
click to toggle source
# File lib/android_app_index.rb, line 84 def self.index(package, name = nil, icon_url = nil) @index_and_parse_play_store.call(package, name, icon_url) rescue OpenURI::HTTPError { error: 'no_app_found', error_message: "Unable to find an app with package=#{package}" } end
search(query)
click to toggle source
# File lib/android_app_index.rb, line 93 def self.search(query) search_results = @index.search( query, attributesToRetrieve: 'package,icon_url,name', hitsPerPage: 100 ) search_results['hits'].map(&@hit_to_result) end