Module: SearchApi
- Defined in:
- lib/searchapi.rb,
lib/searchapi/error.rb,
lib/searchapi/client.rb,
lib/searchapi/version.rb,
lib/searchapi/resource.rb,
lib/searchapi/response.rb,
lib/searchapi/configuration.rb,
lib/searchapi/resources/bing.rb,
lib/searchapi/resources/baidu.rb,
lib/searchapi/resources/naver.rb,
lib/searchapi/resources/yahoo.rb,
lib/searchapi/resources/airbnb.rb,
lib/searchapi/resources/google.rb,
lib/searchapi/resources/yandex.rb,
lib/searchapi/resources/youtube.rb,
lib/searchapi/resources/duckduckgo.rb,
lib/searchapi/resources/bing_images.rb,
lib/searchapi/resources/bing_videos.rb,
lib/searchapi/resources/ebay_search.rb,
lib/searchapi/resources/google_jobs.rb,
lib/searchapi/resources/google_lens.rb,
lib/searchapi/resources/google_maps.rb,
lib/searchapi/resources/google_news.rb,
lib/searchapi/resources/tripadvisor.rb,
lib/searchapi/resources/google_local.rb,
lib/searchapi/resources/shein_search.rb,
lib/searchapi/resources/amazon_search.rb,
lib/searchapi/resources/google_events.rb,
lib/searchapi/resources/google_forums.rb,
lib/searchapi/resources/google_hotels.rb,
lib/searchapi/resources/google_images.rb,
lib/searchapi/resources/google_shorts.rb,
lib/searchapi/resources/google_trends.rb,
lib/searchapi/resources/google_videos.rb,
lib/searchapi/resources/google_ai_mode.rb,
lib/searchapi/resources/google_finance.rb,
lib/searchapi/resources/google_flights.rb,
lib/searchapi/resources/google_patents.rb,
lib/searchapi/resources/google_scholar.rb,
lib/searchapi/resources/tiktok_profile.rb,
lib/searchapi/resources/walmart_search.rb,
lib/searchapi/resources/apple_app_store.rb,
lib/searchapi/resources/google_shopping.rb,
lib/searchapi/resources/meta_ad_library.rb,
lib/searchapi/resources/google_play_store.rb,
lib/searchapi/resources/instagram_profile.rb,
lib/searchapi/resources/reddit_ad_library.rb,
lib/searchapi/resources/google_ai_overview.rb,
lib/searchapi/resources/tiktok_ads_library.rb,
lib/searchapi/resources/google_autocomplete.rb,
lib/searchapi/resources/linkedin_ad_library.rb,
lib/searchapi/resources/google_rank_tracking.rb,
lib/searchapi/resources/yandex_reverse_image.rb,
lib/searchapi/resources/facebook_business_page.rb,
lib/searchapi/resources/google_about_this_domain.rb,
lib/searchapi/resources/google_ads_transparency_center.rb
Defined Under Namespace
Modules: Resources Classes: AuthenticationError, Client, Configuration, Error, NotFoundError, RateLimitError, Resource, Response, ServerError, TimeoutError, ValidationError
Constant Summary collapse
- RESOURCES =
Registry mapping accessor names to resource classes.
{ # Google engines google: Resources::Google, google_rank_tracking: Resources::GoogleRankTracking, google_events: Resources::GoogleEvents, google_maps: Resources::GoogleMaps, google_scholar: Resources::GoogleScholar, google_news: Resources::GoogleNews, google_jobs: Resources::GoogleJobs, google_shopping: Resources::GoogleShopping, google_flights: Resources::GoogleFlights, google_images: Resources::GoogleImages, google_videos: Resources::GoogleVideos, google_trends: Resources::GoogleTrends, google_autocomplete: Resources::GoogleAutocomplete, google_finance: Resources::GoogleFinance, google_hotels: Resources::GoogleHotels, google_about_this_domain: Resources::GoogleAboutThisDomain, google_ai_mode: Resources::GoogleAiMode, google_ads_transparency_center: Resources::GoogleAdsTransparencyCenter, google_local: Resources::GoogleLocal, google_shorts: Resources::GoogleShorts, google_lens: Resources::GoogleLens, google_forums: Resources::GoogleForums, google_patents: Resources::GooglePatents, google_ai_overview: Resources::GoogleAiOverview, google_play_store: Resources::GooglePlayStore, # Other search engines amazon_search: Resources::AmazonSearch, bing: Resources::Bing, bing_images: Resources::BingImages, bing_videos: Resources::BingVideos, baidu: Resources::Baidu, yandex: Resources::Yandex, yandex_reverse_image: Resources::YandexReverseImage, duckduckgo: Resources::DuckDuckGo, yahoo: Resources::Yahoo, naver: Resources::Naver, youtube: Resources::YouTube, # App stores apple_app_store: Resources::AppleAppStore, # E-commerce walmart_search: Resources::WalmartSearch, shein_search: Resources::SheinSearch, ebay_search: Resources::EbaySearch, # Travel & hospitality airbnb: Resources::Airbnb, tripadvisor: Resources::TripAdvisor, # Social media profiles instagram_profile: Resources::InstagramProfile, tiktok_profile: Resources::TiktokProfile, facebook_business_page: Resources::FacebookBusinessPage, # Ad libraries linkedin_ad_library: Resources::LinkedinAdLibrary, reddit_ad_library: Resources::RedditAdLibrary, meta_ad_library: Resources::MetaAdLibrary, tiktok_ads_library: Resources::TiktokAdsLibrary }.freeze
- VERSION =
"0.1.0"
Class Attribute Summary collapse
Class Method Summary collapse
- .client ⇒ Object
- .configure {|configuration| ... } ⇒ Object
- .method_missing(name, *args, &block) ⇒ Object
- .reset! ⇒ Object
- .resources ⇒ Object
- .respond_to_missing?(name, include_private = false) ⇒ Boolean
Class Attribute Details
.configuration ⇒ Object
143 144 145 |
# File 'lib/searchapi.rb', line 143 def configuration @configuration ||= Configuration.new end |
Class Method Details
.client ⇒ Object
151 152 153 |
# File 'lib/searchapi.rb', line 151 def client @client ||= Client.new(configuration) end |
.configure {|configuration| ... } ⇒ Object
147 148 149 |
# File 'lib/searchapi.rb', line 147 def configure yield(configuration) end |
.method_missing(name, *args, &block) ⇒ Object
165 166 167 168 169 170 171 |
# File 'lib/searchapi.rb', line 165 def method_missing(name, *args, &block) if RESOURCES.key?(name) resources[name] ||= RESOURCES[name].new(client) else super end end |
.reset! ⇒ Object
155 156 157 158 159 |
# File 'lib/searchapi.rb', line 155 def reset! @configuration = nil @client = nil @resources = nil end |
.resources ⇒ Object
161 162 163 |
# File 'lib/searchapi.rb', line 161 def resources @resources ||= {} end |
.respond_to_missing?(name, include_private = false) ⇒ Boolean
173 174 175 |
# File 'lib/searchapi.rb', line 173 def respond_to_missing?(name, include_private = false) RESOURCES.key?(name) || super end |