lib/tbkapi/api_taobaoke.rb in tbkapi-0.0.4 vs lib/tbkapi/api_taobaoke.rb in tbkapi-0.0.5
- old
+ new
@@ -33,18 +33,19 @@
Net::HTTP.get(URI(TBURI + '?' + build_query(params.merge({sign: my_sign}))))
end
- def taobao_tbk_item_get(keyword, api_key, secret, page_size = 20)
+ def taobao_tbk_item_get(keyword, api_key, secret, page_no = 1, page_size = 20)
action_params = {
fields: "num_iid,title,pict_url,small_images,reserve_price,zk_final_price,user_type,provcity,item_url,seller_id,volume,nick",
q: keyword,
+ page_no: page_no,
page_size: page_size
}
params = system_params("taobao.tbk.item.get",api_key).merge(action_params)
my_sign = get_sign(params, secret).upcase
- Net::HTTP.get(URI(TBURI + '?' + build_query(params.merge({sign: my_sign}))))
+ 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",