Class: YoutubeSearch

Inherits:
SerpApiSearch show all
Defined in:
lib/search/youtube_search.rb

Overview

Youtube Search Result for Ruby powered by SerpApi

Search API Usage

“‘ruby parameter =

search_query: "query",
api_key: "Serp API Key"

search = YoutubeSearch.new(parameter)

html_results = search.get_html hash_results = search.get_hash json_results = search.get_json

“‘ doc: serpapi.com/youtube-search-api

Constant Summary

Constants inherited from SerpApiSearch

SerpApiSearch::BACKEND, SerpApiSearch::VERSION

Instance Attribute Summary

Attributes inherited from SerpApiSearch

#params

Instance Method Summary collapse

Methods inherited from SerpApiSearch

#api_key, api_key=, #construct_url, #engine, #get_account, #get_hash, #get_hash_with_images, #get_html, #get_json, #get_json_with_images, #get_location, #get_search_archive, serp_api_key=

Constructor Details

#initialize(params = {}) ⇒ YoutubeSearch

Returns a new instance of YoutubeSearch.



24
25
26
27
# File 'lib/search/youtube_search.rb', line 24

def initialize(params = {})
  super(params, YOUTUBE_ENGINE)
  check_params([:search_query, :engine])
end