lib/tbkapi/api_taobaoke.rb in tbkapi-1.1.2 vs lib/tbkapi/api_taobaoke.rb in tbkapi-1.1.4
- old
+ new
@@ -214,11 +214,11 @@
action_params[:start_dsr] = start_dsr unless start_dsr.nil?
action_params[:start_tk_rate] = start_tk_rate unless start_tk_rate.nil?
action_params[:end_tk_rate] = end_tk_rate unless end_tk_rate.nil?
action_params[:start_price] = start_price unless start_price.nil?
action_params[:end_price] = end_price unless end_price.nil?
- params = system_params("taobao.tbk.dg.material.optional",api_key).merge(action_params)
+ params = system_params("taobao.tbk.dg.material.optional.upgrade",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_dg_optimus_material(adzone_id, api_key, secret, material_id = 4071, page_no = 1, page_size = 20)
@@ -275,9 +275,29 @@
parent_cid: parent_cid,
fields: "cid,parent_cid,name,is_parent",
cids: cids
}
params = system_params("taobao.itemcats.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_tbk_item_word_get(item_id, count, adzone_id, api_key, secret)
+ action_params = {
+ item_id: item_id,
+ adzone_id: adzone_id,
+ count: count
+ }
+ params = system_params("taobao.tbk.item.word.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_tbk_spread_get(url, api_key, secret)
+ action_params = {
+ requests: [{url: url}].to_json
+ }
+ params = system_params("taobao.tbk.spread.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
end