tbkapi 0.0.6 → 0.0.7

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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: a03c0b29bc88b881b0af260dbf0b810278680716
4
- data.tar.gz: b25373472c24ac1883793aac875088fdbd51218a
3
+ metadata.gz: 243000df415690adb5cdb55d7389a326d628b289
4
+ data.tar.gz: 70e8a1bb8adc02550a6a5baf00309660265649f2
5
5
  SHA512:
6
- metadata.gz: fa12c86cdeef5a844e9220f36d17d76d8bac02125413e94cced7d3cfabf82687794913a01588dfd5ded0e57255b13003881b7bc9709b61f8fe6907715060214a
7
- data.tar.gz: 1c8568c2185f0125739737ec6cae57580a3d9727e60773d4f80c1cc5974f0b93e095e2326120668123155856df8eeddd471822c5b05c5911125ef3eb5a235493
6
+ metadata.gz: d5471ab5bf0d0331032c7350472bf4a731e1ab74c5e75fb968a1c8047e9afdeeb83d115225b19464272d4b052d65e06da5ce24d42a63ab622c1282ac786493ca
7
+ data.tar.gz: 409a0564d8b31360fbe5d09815f5fd40978a591b74b315b53d8acefcd7c114731cdb8aa3f912ad55e2eef369701e5c61ebd69676cd3f24fcf0839619a8064df1
@@ -37,7 +37,7 @@ module Tbkapi
37
37
 
38
38
  def taobao_tbk_item_get(keyword, api_key, secret, page_no = 1, page_size = 20)
39
39
  action_params = {
40
- fields: "num_iid,title,pict_url,small_images,reserve_price,zk_final_price,user_type,provcity,item_url,seller_id,volume,nick,status,category,coupon_click_url,coupon_end_time,coupon_info,coupon_start_time,coupon_total_count,coupon_remain_count",
40
+ fields: "num_iid,title,pict_url,small_images,reserve_price,zk_final_price,user_type,provcity,item_url,seller_id,volume,nick",
41
41
  q: keyword,
42
42
  page_no: page_no,
43
43
  page_size: page_size
@@ -72,5 +72,27 @@ module Tbkapi
72
72
  Net::HTTP.get(url)
73
73
  end
74
74
 
75
+ def taobao_tbk_shop_get(q, api_key, secret)
76
+ action_params ={
77
+ fields: "user_id,shop_title,shop_type,seller_nick,pict_url,shop_url",
78
+ q: q
79
+ }
80
+ params = system_params("taobao.tbk.shop.get",api_key).merge(action_params)
81
+ my_sign = get_sign(params, secret).upcase
82
+ Net::HTTP.get(URI(TBURI + '?' + URI.encode(build_query(params.merge({sign: my_sign})))))
83
+ end
84
+
85
+ def taobao_ju_items_search(q, pid, api_key, secret)
86
+ action_params ={
87
+ param_top_item_query: {
88
+ pid: pid,
89
+ word: q
90
+ }.to_json
91
+ }
92
+ params = system_params("taobao.ju.items.search", api_key).merge(action_params)
93
+ my_sign = get_sign(params, secret).upcase
94
+ Net::HTTP.get(URI(TBURI + '?' + URI.encode(build_query(params.merge({sign: my_sign})))))
95
+ end
96
+
75
97
  end
76
98
  end
@@ -1,3 +1,3 @@
1
1
  module Tbkapi
2
- VERSION = "0.0.6"
2
+ VERSION = "0.0.7"
3
3
  end
data/lib/tbkapi.rb CHANGED
@@ -1,5 +1,6 @@
1
1
  require 'net/http'
2
2
  require "digest/md5"
3
+ require "json"
3
4
  require "tbkapi/api_taobaoke"
4
5
  require "tbkapi/version"
5
6
 
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: 0.0.6
4
+ version: 0.0.7
5
5
  platform: ruby
6
6
  authors:
7
7
  - 刘梦晨
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2017-11-07 00:00:00.000000000 Z
11
+ date: 2017-12-15 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler
@@ -74,7 +74,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
74
74
  version: '0'
75
75
  requirements: []
76
76
  rubyforge_project:
77
- rubygems_version: 2.6.6
77
+ rubygems_version: 2.6.14
78
78
  signing_key:
79
79
  specification_version: 4
80
80
  summary: 淘宝客api ruby 调用