Class: Marver::API::Credentials

Inherits:
Object
  • Object
show all
Defined in:
lib/marver/api/credentials.rb

Class Method Summary collapse

Class Method Details

.getObject



9
10
11
12
13
14
15
16
# File 'lib/marver/api/credentials.rb', line 9

def get
  public_key  = Marver.configuration.public_key
  private_key = Marver.configuration.private_key
  timestamp = Time.now.to_i.to_s
  hash = Digest::MD5.hexdigest(timestamp + private_key + public_key)

  { ts: timestamp, apikey: public_key, hash: hash }
end