class Zara4::API::Communication::Util
Public Class Methods
calculate_expiry_time(expires_in_seconds)
click to toggle source
Calculate the expiry time from the given lifetime time.
# File lib/zara4/api/communication/util.rb, line 22 def self.calculate_expiry_time(expires_in_seconds) expires_in_seconds = expires_in_seconds - 60 return Time.now + expires_in_seconds end
url(path)
click to toggle source
Get the url to the given path.
# File lib/zara4/api/communication/util.rb, line 8 def self.url(path) return Zara4::API::Communication::Config::api_endpoint_url() + path end
Public Instance Methods
post(target_url, data)
click to toggle source
# File lib/zara4/api/communication/util.rb, line 14 def post(target_url, data) end