Class: GoogleCloudVision::Classifier

Inherits:
Object
  • Object
show all
Defined in:
lib/google_cloud_vision.rb

Overview

classifier for face, text and label detection

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(api_key, images) ⇒ Classifier

Returns a new instance of Classifier.



12
13
14
15
16
# File 'lib/google_cloud_vision.rb', line 12

def initialize(api_key, images)
  @url = "https://vision.googleapis.com/v1/images:annotate?key=#{api_key}"
  @images = images
  call_vision_api(requests(images))
end

Instance Attribute Details

#responseObject (readonly)

Returns the value of attribute response.



10
11
12
# File 'lib/google_cloud_vision.rb', line 10

def response
  @response
end