tbkapi 1.1.0 → 1.1.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/lib/tbkapi/api_taobaoke.rb +27 -0
- data/lib/tbkapi/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 2ba691438d8b11ec945224210fceb37e8b4004a5
|
4
|
+
data.tar.gz: d6427c57401ee45062206cd62796745edf3cef8e
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: b9ad64ab973fbfeca0bff414d2e38d6f46ef11a19cee62c2e27ed66d02ce94554c30c1b5b10e0fc872bfd1929148fc24d0baca601ddb9a348e84cbaf76b18839
|
7
|
+
data.tar.gz: f35848766d55d91416b2fdb64ce14ed5e38a1b09c6b10cc8abf8b9ae0f936a97afdf438b9f0256a2250ae29af28b907e0acbf5a5140da215cf7f6bb173a260f5
|
data/lib/tbkapi/api_taobaoke.rb
CHANGED
@@ -33,6 +33,7 @@ module Tbkapi
|
|
33
33
|
Net::HTTP.get(URI(TBURI + '?' + build_query(params.merge({sign: my_sign}))))
|
34
34
|
end
|
35
35
|
|
36
|
+
# 只有 start_price 与 end_price 同时不为nil的时候价格筛选才生效
|
36
37
|
def taobao_tbk_item_get_new(keyword, cat, sort, is_tmall, start_price, end_price, api_key, secret, page_no = 1, page_size = 20)
|
37
38
|
action_params = {
|
38
39
|
fields: "num_iid,title,pict_url,small_images,reserve_price,zk_final_price,user_type,provcity,item_url,seller_id,volume,nick",
|
@@ -194,6 +195,32 @@ module Tbkapi
|
|
194
195
|
Net::HTTP.get(URI(TBURI + '?' + URI.encode(build_query(params.merge({sign: my_sign})))))
|
195
196
|
end
|
196
197
|
|
198
|
+
# 只有 start_price 与 end_price 有一个不为nil的时候价格筛选就生效
|
199
|
+
# npx_level include_pay_rate_30 include_good_rate include_rfd_rate 测试没什么效果
|
200
|
+
# start_dsr 0 - 50000
|
201
|
+
def taobao_tbk_dg_material_optional(keyword, cat, sort, is_tmall, is_overseas, has_coupon, start_dsr, start_tk_rate, end_tk_rate, start_price, end_price, material_id, api_key, secret, adzone_id, page_no = 1, page_size = 20)
|
202
|
+
action_params = {
|
203
|
+
adzone_id: adzone_id,
|
204
|
+
material_id: material_id,
|
205
|
+
page_no: page_no,
|
206
|
+
page_size: page_size
|
207
|
+
}
|
208
|
+
action_params[:q] = keyword unless keyword.nil?
|
209
|
+
action_params[:cat] = cat unless cat.nil?
|
210
|
+
action_params[:sort] = sort unless sort.nil?
|
211
|
+
action_params[:is_tmall] = is_tmall unless is_tmall.nil?
|
212
|
+
action_params[:is_overseas] = is_overseas unless is_overseas.nil?
|
213
|
+
action_params[:has_coupon] = has_coupon unless has_coupon.nil?
|
214
|
+
action_params[:start_dsr] = start_dsr unless start_dsr.nil?
|
215
|
+
action_params[:start_tk_rate] = start_tk_rate unless start_tk_rate.nil?
|
216
|
+
action_params[:end_tk_rate] = end_tk_rate unless end_tk_rate.nil?
|
217
|
+
action_params[:start_price] = start_price unless start_price.nil?
|
218
|
+
action_params[:end_price] = end_price unless end_price.nil?
|
219
|
+
params = system_params("taobao.tbk.dg.material.optional",api_key).merge(action_params)
|
220
|
+
my_sign = get_sign(params, secret).upcase
|
221
|
+
Net::HTTP.get(URI(URI.encode((TBURI + '?' + build_query(params.merge({sign: my_sign}))))))
|
222
|
+
end
|
223
|
+
|
197
224
|
def taobao_tbk_dg_optimus_material(adzone_id, api_key, secret, material_id = 4071, page_no = 1, page_size = 20)
|
198
225
|
action_params = {
|
199
226
|
adzone_id: adzone_id,
|
data/lib/tbkapi/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: tbkapi
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.1.
|
4
|
+
version: 1.1.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- 刘梦晨
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2019-06-
|
11
|
+
date: 2019-06-20 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|