Module: Pddapi
- Included in:
- Pinduoduo
- Defined in:
- lib/pddapi.rb,
lib/pddapi/version.rb,
lib/pddapi/api_pinduoduo.rb
Defined Under Namespace
Classes: Pinduoduo
Constant Summary collapse
- PDDURI =
Your code goes here…
"http://gw-api.pinduoduo.com/api/router"
- VERSION =
"0.1.0"
Instance Method Summary collapse
Instance Method Details
#action_params ⇒ Object
20 21 22 |
# File 'lib/pddapi.rb', line 20 def action_params {} end |
#get_sign(hash, secret) ⇒ Object
24 25 26 |
# File 'lib/pddapi.rb', line 24 def get_sign(hash, secret) Digest::MD5.hexdigest(hash.sort.flatten.push(secret).unshift(secret).join('')) end |
#system_params(method, client_id) ⇒ Object
11 12 13 14 15 16 17 18 |
# File 'lib/pddapi.rb', line 11 def system_params(method, client_id) { type: method, client_id: client_id, timestamp: Time.now.to_i, data_type: 'JSON' } end |