class BadgerVision::Client
Public Class Methods
image_information(url)
click to toggle source
Extract tags from a given image URL
# File lib/badger_vision/client.rb, line 13 def self.image_information(url) new(request_options: {url: url}).image_information end
new(request_options: {})
click to toggle source
# File lib/badger_vision/client.rb, line 8 def initialize(request_options: {}) @request_options = request_options end
Public Instance Methods
image_information()
click to toggle source
# File lib/badger_vision/client.rb, line 17 def image_information body = Request.post("cgi-bin/image.py", @request_options) ImageInformationResponse.new(parse_response(body)) end
Private Instance Methods
parse_response(body)
click to toggle source
# File lib/badger_vision/client.rb, line 24 def parse_response(body) JSON.parse(body, symbolize_names: true) end