lib/tbkapi/api_taobaoke.rb in tbkapi-1.0.3 vs lib/tbkapi/api_taobaoke.rb in tbkapi-1.0.4

- old
+ new

@@ -45,9 +45,20 @@ params = system_params("taobao.tbk.item.get",api_key).merge(action_params) my_sign = get_sign(params, secret).upcase Net::HTTP.get(URI(URI.encode((TBURI + '?' + build_query(params.merge({sign: my_sign})))))) end + def taobao_tbk_item_recommend_get(num_iid, api_key, secret, page_size = 20) + action_params = { + fields: "num_iid,title,pict_url,small_images,reserve_price,zk_final_price,user_type,provcity,item_url", + num_iid: num_iid, + count: page_size + } + params = system_params("taobao.tbk.item.recommend.get",api_key).merge(action_params) + my_sign = get_sign(params, secret).upcase + Net::HTTP.get(URI(URI.encode((TBURI + '?' + build_query(params.merge({sign: my_sign})))))) + end + def taobao_tbk_items_detail_get(ids, api_key, secret) action_params = { fields: "num_iid,seller_id,nick,title,volume,pic_url,item_url,shop_url,click_url,price,discount_price", num_iids: ids.join(",") }