Class: Naver::Vision

Inherits:
Client show all
Defined in:
lib/naver/vision.rb

Overview

Naver Vision API

Class Method Summary collapse

Methods inherited from Client

#connection, connection, connection=, parse

Class Method Details

.celebrity(image:) ⇒ Hash

유명인 얼굴인식(Beta)


8
9
10
11
12
# File 'lib/naver/vision.rb', line 8

def celebrity(image:)
  params = {}
  params[:image] = Faraday::UploadIO.new(image, "image/jpeg")
  parse(JSON.parse(connection.post("/v1/vision/celebrity", params).body))
end

.face(image:) ⇒ Hash

얼굴 감지(Beta)


17
18
19
20
21
# File 'lib/naver/vision.rb', line 17

def face(image:)
  params = {}
  params[:image] = Faraday::UploadIO.new(image, "image/jpeg")
  parse(JSON.parse(connection.post("/v1/vision/face", params).body))
end