@@ -53,6 +53,7 @@ class Client
5353 # faster). [default: true]
5454 # * `async`: [Boolean] Support non-blocking job submission. [default: false]
5555 # * `timeout`: [Integer] HTTP get max timeout in seconds [default: 120s == 2m]
56+ # * `symbolize_names`: [Boolean] Convert JSON keys to symbols. [default: true]
5657 #
5758 # **Key:**kr
5859 #
@@ -134,7 +135,7 @@ def location(params = {})
134135 end
135136
136137 # Retrieve search result from the Search Archive API
137- #
138+ #
138139 # ```ruby
139140 # client = SerpApi::Client.new(engine: 'google', api_key: ENV['SERPAPI_KEY'])
140141 # results = client.search(q: 'Coffee', location: 'Portland')
@@ -191,9 +192,7 @@ def query(params)
191192 q = @params . clone . merge ( params )
192193
193194 # do not pollute default params with custom params
194- if q . key? ( :symbolize_names )
195- q . delete ( :symbolize_names )
196- end
195+ q . delete ( :symbolize_names ) if q . key? ( :symbolize_names )
197196
198197 # delete empty key/value
199198 q . compact
@@ -209,7 +208,6 @@ def persistent?
209208 # @param [String] endpoint HTTP service URI
210209 # @param [Symbol] decoder type :json or :html
211210 # @param [Hash] params custom search inputs
212- # @param [Boolean] symbolize_names if true, convert JSON keys to symbols more memory efficient.
213211 # @return [String|Hash] raw HTML or decoded response as JSON / Hash
214212 def get ( endpoint , decoder = :json , params = { } )
215213 # execute get via open socket
0 commit comments