google_search_results 2.1.0 → 2.2.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: c9850029f90956175395320f506e034bf6373397954c31452cef7e4fbe56d46d
4
- data.tar.gz: '082c1dc59ab2526df21009b2bf127378c76039c828a7bee459b8efd1f8e9c58b'
3
+ metadata.gz: f00191ba840fc5fdcde18b6e46293dca43ddd5cff4fa4896d72efc65544d92d2
4
+ data.tar.gz: 23c60e7e337ccc23fe9d4f7b3b5d1cb9257b877490042c79eccfaaa46ba51ac3
5
5
  SHA512:
6
- metadata.gz: 810293f9210d09d120d50123cf593d42c958204beb7154922f839ca217dd8d093518401fd59a1842f06e6e67b5e18b9cc16984b2df6bdd0d43a4f98508304cfa
7
- data.tar.gz: e2aedc34c37f8b4779651e475c3b21011680d783686557bb562bdb546b98bf074f31256933aad066e21ce78988696bade30630e4690290e494e0d3dc291d2634
6
+ metadata.gz: 327808805373bc9aa99c38c1255e031b728b6c59737b6bed6332a70efa9d2a534787621ba162d176204c14e49521f45c1950b95db0098f80be48150b0a2fab43
7
+ data.tar.gz: 6f55bb911ae9c9620e5cb41de6d0ed36a13c82c883202af8228817be6500eab2dee3678b83bee0cca3ce648052604c3b9cbd48bc825194e53d31d2dcc06a17b5
@@ -9,3 +9,5 @@ require_relative 'search/youtube_search.rb'
9
9
  require_relative 'search/walmart_search.rb'
10
10
  require_relative 'search/duckduckgo_search.rb'
11
11
  require_relative 'search/homedepot_search.rb'
12
+ require_relative 'search/apple_store_search.rb'
13
+ require_relative 'search/naver_search.rb'
@@ -0,0 +1,34 @@
1
+ require_relative 'serp_api_search'
2
+
3
+ # Apple Store Search Result for Ruby powered by SerpApi
4
+ #
5
+ # Search API Usage
6
+ #
7
+ # ```ruby
8
+ # parameter = {
9
+ # term: "laptop",
10
+ # api_key: "Your SERP API Key"
11
+ # }
12
+ #
13
+ # search = AppleStoreSearch.new(parameter)
14
+ #
15
+ # html_results = search.get_html
16
+ # hash_results = search.get_hash
17
+ # json_results = search.get_json
18
+ #
19
+ # ```
20
+ #
21
+ # doc: https://serpapi.com/bing-search-api
22
+
23
+ class AppleStoreSearch < SerpApiSearch
24
+
25
+ def initialize(params = {})
26
+ super(params, APPLE_STORE_ENGINE)
27
+ check_params([:term, :engine])
28
+ end
29
+
30
+ def get_location
31
+ raise SerpApiException.new('location is not supported by ' + APPLE_STORE_ENGINE)
32
+ end
33
+
34
+ end
@@ -0,0 +1,36 @@
1
+ require_relative 'serp_api_search'
2
+
3
+ # Naver Search Result for Ruby powered by SerpApi
4
+ #
5
+ # Search API Usage
6
+ #
7
+ # ```ruby
8
+ # parameter = {
9
+ # q: "query",
10
+ # location: "city,state,country",
11
+ # api_key: "Your SERP API Key"
12
+ # }
13
+ #
14
+ # search = NaverSearch.new(parameter)
15
+ # search.params[:location] = "Portland"
16
+ #
17
+ # html_results = search.get_html
18
+ # hash_results = search.get_hash
19
+ # json_results = search.get_json
20
+ #
21
+ # ```
22
+ #
23
+ # doc: https://serpapi.com/bing-search-api
24
+
25
+ class NaverSearch < SerpApiSearch
26
+
27
+ def initialize(params = {})
28
+ super(params, NAVER_ENGINE)
29
+ check_params([:query, :engine])
30
+ end
31
+
32
+ def get_location
33
+ raise SerpApiException.new('location is not supported by ' + NAVER_ENGINE)
34
+ end
35
+
36
+ end
@@ -11,12 +11,14 @@ YOUTUBE_ENGINE = 'youtube'
11
11
  DUCKDUCKGO_ENGINE = 'duckduckgo'
12
12
  WALMART_ENGINE = 'walmart'
13
13
  HOMEDEPOT_ENGINE = 'home_depot'
14
+ APPLE_STORE_ENGINE = 'apple_app_store'
15
+ NAVER_ENGINE = 'naver'
14
16
 
15
17
  # Generic HTTP client for serpapi.com
16
18
  #
17
19
  class SerpApiSearch
18
20
 
19
- VERSION = "2.1.0"
21
+ VERSION = "2.2.0"
20
22
  BACKEND = "serpapi.com"
21
23
 
22
24
  attr_accessor :params
@@ -173,7 +175,7 @@ class SerpApiSearch
173
175
  end
174
176
  end
175
177
  if !missing.empty?
176
- raise SerpApiException.new("missing required keys in params.\n #{missing.join(',')}")
178
+ raise SerpApiException.new("missing required keys in params: \n - #{missing.join("\n -")}")
177
179
  end
178
180
  end
179
181
 
metadata CHANGED
@@ -1,15 +1,15 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: google_search_results
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.1.0
4
+ version: 2.2.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - hartator
8
8
  - jvmvik
9
- autorequire:
9
+ autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2021-10-11 00:00:00.000000000 Z
12
+ date: 2021-12-15 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: rake
@@ -75,12 +75,14 @@ extensions: []
75
75
  extra_rdoc_files: []
76
76
  files:
77
77
  - lib/google_search_results.rb
78
+ - lib/search/apple_store_search.rb
78
79
  - lib/search/baidu_search.rb
79
80
  - lib/search/bing_search.rb
80
81
  - lib/search/duckduckgo_search.rb
81
82
  - lib/search/ebay_search.rb
82
83
  - lib/search/google_search.rb
83
84
  - lib/search/homedepot_search.rb
85
+ - lib/search/naver_search.rb
84
86
  - lib/search/serp_api_search.rb
85
87
  - lib/search/walmart_search.rb
86
88
  - lib/search/yahoo_search.rb
@@ -91,7 +93,7 @@ licenses:
91
93
  - MIT
92
94
  metadata:
93
95
  yard.run: yri
94
- post_install_message:
96
+ post_install_message:
95
97
  rdoc_options: []
96
98
  require_paths:
97
99
  - lib
@@ -106,8 +108,9 @@ required_rubygems_version: !ruby/object:Gem::Requirement
106
108
  - !ruby/object:Gem::Version
107
109
  version: '0'
108
110
  requirements: []
109
- rubygems_version: 3.0.3
110
- signing_key:
111
+ rubygems_version: 3.2.22
112
+ signing_key:
111
113
  specification_version: 4
112
- summary: Get Google, Bing, Baidu, Ebay, Yahoo, Yandex Search Results via SerpApi.com
114
+ summary: Get Google, Bing, Baidu, Ebay, Yahoo, Yandex, Home depot, Naver, Apple, Duckduckgo,
115
+ Youtube search results via SerpApi.com
113
116
  test_files: []