Module: C3po::Client
- Included in:
- C3po
- Defined in:
- lib/c3po/client.rb
Instance Method Summary collapse
-
#fetch(query) ⇒ String
Query a web service.
Instance Method Details
#fetch(query) ⇒ String
Query a web service.
Returns a translated string or an array of errors.
22 23 24 25 26 27 28 29 30 31 |
# File 'lib/c3po/client.rb', line 22 def fetch(query) request = set_request query request.on_complete {|response| process_reponse response} hydra = Typhoeus::Hydra.hydra hydra.queue request hydra.run @response if @errors.empty? end |