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

Version Path
tbkapi-1.1.4 lib/tbkapi.rb
tbkapi-1.1.2 lib/tbkapi.rb
tbkapi-1.1.0 lib/tbkapi.rb
tbkapi-1.0.4 lib/tbkapi.rb
tbkapi-1.0.3 lib/tbkapi.rb
tbkapi-1.0.2 lib/tbkapi.rb
tbkapi-1.0.1 lib/tbkapi.rb
tbkapi-1.0.0 lib/tbkapi.rb
tbkapi-0.0.9 lib/tbkapi.rb
tbkapi-0.0.8 lib/tbkapi.rb
tbkapi-0.0.7 lib/tbkapi.rb