lib/tbkapi/api_taobaoke.rb in tbkapi-1.0.1 vs lib/tbkapi/api_taobaoke.rb in tbkapi-1.0.2

- old
+ new

@@ -114,18 +114,15 @@ my_sign = get_sign(params, secret).upcase Net::HTTP.get(URI(TBURI + '?' + URI.encode(build_query(params.merge({sign: my_sign}))))) end def taobao_tbk_tpwd_create(url, text, api_key, secret, logo = nil, user_id = nil) - data = { + action_params = { text: text, url: url } - data[:logo] = logo if logo - data[:user_id] = user_id if user_id - action_params = { - tpwd_param: data.to_json - } + action_params[:logo] = logo if logo + action_params[:user_id] = user_id if user_id params = system_params("taobao.tbk.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