Method: FaceDetect::Adapter::Google#run

Defined in:
lib/face_detect/adapter/google.rb

#runObject



13
14
15
16
17
18
19
20
21
22
23
# File 'lib/face_detect/adapter/google.rb', line 13

def run
  batch_response = execute
  response = batch_response.responses.first
  if response && response.face_annotations
    response.face_annotations.map do |annotation|
      convert_face(annotation)
    end
  else
    []
  end
end