Class: Rwsc::Web::WebClient

Inherits:
Object
  • Object
show all
Defined in:
lib/rwsc/web/web_client.rb

Overview

this class is Rakuten WebSearch web client .

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(operation) ⇒ WebClient

Returns a new instance of WebClient.



12
13
14
# File 'lib/rwsc/web/web_client.rb', line 12

def initialize operation
  @operation = operation
end

Class Method Details

.get_result(opts) ⇒ Object

this method call webservice api .



17
18
19
# File 'lib/rwsc/web/web_client.rb', line 17

def self.get_result(opts)
  return WebClient.new(opts[:operation]).get_result(opts)
end

Instance Method Details

#get_result(opts) ⇒ Object



21
22
23
# File 'lib/rwsc/web/web_client.rb', line 21

def get_result(opts)
  parse_result(get_api_result(opts).body)
end