Sha256: a43bc79ce60068787fd71a61d6edc50d82f0fecd9b75c01b4952efa965eafd6c
Contents?: true
Size: 545 Bytes
Versions: 11
Compression:
Stored size: 545 Bytes
Contents
require 'net/http' require "digest/md5" require "json" 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
11 entries across 11 versions & 1 rubygems