module Tbkapi

Constants

TBURI
VERSION

Public Instance Methods

action_params() click to toggle source
# File lib/tbkapi.rb, line 22
def action_params
  {}
end
get_sign(hash, secret) click to toggle source
# File lib/tbkapi.rb, line 26
def get_sign(hash, secret)
  Digest::MD5.hexdigest(hash.sort.flatten.push(secret).unshift(secret).join(""))
end
system_params(method, api_key) click to toggle source
# File lib/tbkapi.rb, line 11
def system_params(method, api_key)
  {
    method: method,
    api_key: api_key,
    timestamp: Time.now.strftime("%F %T"),
    format: "json",
    v: "2.0",
    sign_method: "md5"
  }
end