Sha256: a9b7e72aaf81cbafe421c2a572122c960e741c675f6f24e67a485df642102cd9
Contents?: true
Size: 530 Bytes
Versions: 3
Compression:
Stored size: 530 Bytes
Contents
require 'net/http' require "digest/md5" require "tbkapi/api_taobaoke" require "tbkapi/version" module Tbkapi TBURI = "http://gw.api.taobao.com/router/rest" 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 def action_params {} end def get_sign(hash, secret) Digest::MD5.hexdigest(hash.sort.flatten.push(secret).unshift(secret).join("")) end end
Version data entries
3 entries across 3 versions & 1 rubygems
Version | Path |
---|---|
tbkapi-0.0.6 | lib/tbkapi.rb |
tbkapi-0.0.5 | lib/tbkapi.rb |
tbkapi-0.0.4 | lib/tbkapi.rb |