Module: Echowrap::API::Oauth
Constant Summary
Constants included from Utils
Utils::API_KEY_CANNOT_CALL_THIS_METHOD, Utils::INVALID_PARAMETER, Utils::MISSING_OR_INVALID_KEY, Utils::MISSING_PARAMETER, Utils::RATE_LIMIT_EXCEEDED, Utils::SUCCESS
Instance Method Summary collapse
-
#oauth_timestamp(options = {}) ⇒ Integer
Returns the current time of The Echo Nest API server.
Instance Method Details
#oauth_timestamp(options = {}) ⇒ Integer
Returns the current time of The Echo Nest API server. This time can be used to synchronize the local time with The Echo Nest allowing you to set a proper timestamp used generate authenticated requests to the API. This call returns the number of seconds elapsed since midnight, 1 January 1970.
18 19 20 21 |
# File 'lib/echowrap/api/oauth.rb', line 18 def (={}) response = send(:get, '/api/v4/oauth/timestamp', ) response[:body][:response][:current_time] end |