lib/tbkapi/api_taobaoke.rb in tbkapi-0.0.9 vs lib/tbkapi/api_taobaoke.rb in tbkapi-1.0.0

- old
+ new

@@ -113,8 +113,31 @@ params = system_params("taobao.tbk.dg.item.coupon.get", api_key).merge(action_params) my_sign = get_sign(params, secret).upcase Net::HTTP.get(URI(TBURI + '?' + URI.encode(build_query(params.merge({sign: my_sign}))))) end + def taobao_wireless_share_tpwd_create(url, text, api_key, secret, logo = nil, user_id = nil) + data = { + text: text, + url: url + } + data[:logo] = logo if logo + data[:user_id] = user_id if user_id + action_params = { + tpwd_param: data.to_json + } + params = system_params("taobao.wireless.share.tpwd.create", api_key).merge(action_params) + my_sign = get_sign(params, secret).upcase + Net::HTTP.get(URI(TBURI + '?' + URI.encode(build_query(params.merge({sign: my_sign}))))) + end + + def taobao_wireless_share_tpwd_query(password_content, api_key, secret) + action_params = { + password_content: password_content + } + params = system_params("taobao.wireless.share.tpwd.query", api_key).merge(action_params) + my_sign = get_sign(params, secret).upcase + Net::HTTP.get(URI(TBURI + '?' + URI.encode(build_query(params.merge({sign: my_sign}))))) + end end end