module Vufer

Constants

BASE_URI
VERSION

Public Class Methods

summary() click to toggle source

Returns a summary from targets, quota and images from Vuforia.

@result [JSON] object containing all the info about targets, quota and images.

# File lib/vufer.rb, line 21
def summary
  time = Time.now.httpdate
  signature = Vufer::Signature.generate('/summary', nil, 'GET', time)

  res = Faraday.get("#{Vufer::BASE_URI}/summary", {}, {
    'Date': time,
    'Authorization': "VWS #{Vufer.access_key}:#{signature}"
  })

  JSON.parse(res.body)
rescue StandardError => e
  e.message
end