Class: Zara4::API::Communication::Util
- Inherits:
-
Object
- Object
- Zara4::API::Communication::Util
- Defined in:
- lib/zara4/api/communication/util.rb
Class Method Summary collapse
-
.calculate_expiry_time(expires_in_seconds) ⇒ Object
Calculate the expiry time from the given lifetime time.
-
.url(path) ⇒ Object
Get the url to the given path.
Instance Method Summary collapse
Class Method Details
.calculate_expiry_time(expires_in_seconds) ⇒ Object
Calculate the expiry time from the given lifetime time.
22 23 24 25 |
# 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) ⇒ Object
Get the url to the given path.
8 9 10 |
# File 'lib/zara4/api/communication/util.rb', line 8 def self.url(path) return Zara4::API::Communication::Config::api_endpoint_url() + path end |
Instance Method Details
#post(target_url, data) ⇒ Object
14 15 16 |
# File 'lib/zara4/api/communication/util.rb', line 14 def post(target_url, data) end |