Class: Gcp::Vision::Client

Inherits:
Object
  • Object
show all
Includes:
Configuration
Defined in:
lib/gcp/vision/client.rb

Instance Method Summary collapse

Methods included from Configuration

#config, #configure

Instance Method Details

#annotate_image(requests) ⇒ Object



10
11
12
13
14
# File 'lib/gcp/vision/client.rb', line 10

def annotate_image(requests)
  client = ::HTTPClient.new
  response = client.post(config.endpoint_uri, requests.to_json, 'Content-Type' => 'application/json')
  Gcp::Vision::Response.new(response)
end