ubox 0.1.6 → 0.1.7

Sign up to get free protection for your applications and to get access to all the features.
Files changed (5) hide show
  1. checksums.yaml +4 -4
  2. data/README.md +200 -0
  3. data/lib/ubox.rb +5 -0
  4. data/lib/ubox/version.rb +1 -1
  5. metadata +2 -2
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 2d3034656cda531b6f4612e4410d723b5f4b17b3
4
- data.tar.gz: 3aceab59f46421d89ffbdd03c4f3c8e55eaa55da
3
+ metadata.gz: 265d5e73054dc427f3f533c54db9b5f20d78390b
4
+ data.tar.gz: 963584cf9f495d7270a435d50674e12661284264
5
5
  SHA512:
6
- metadata.gz: 9d1027269e8dda1a74f2b2cd0a7db8dffeb4df8faa561af6dde1549cfbf5f9faab6516352bb235e1419c707a3f2270475292d305b877a3edbd202bf4b8279caf
7
- data.tar.gz: 6e23126ef5316bb974e18dde79eb638c291c8be57d8c4e1948b202609253f35b413a1cde7fff65e5506be28f94f964872e59df2da61902edbc216cdd9685da01
6
+ metadata.gz: 92414dc6e23aa7ae05a6608622f9218db7c017aa09f9b31590d01f4f83b58e62ca5a4910606439b62ff630e4d8778fa2d357ba384ee1b43d5f14e407c5c2a7cb
7
+ data.tar.gz: 5750dcfcfe45aa898ae1ce036921980a3c5dfd86d5a35d350410782209d211fda58a290a1a4d703ddb921ade9152b3f905b503b9b53b239235c254a395491835
data/README.md CHANGED
@@ -130,7 +130,207 @@ list = Ubox.search_vm_list(keyword:'北京香颂')
130
130
  ```
131
131
 
132
132
  ```json
133
+ {
134
+ "head": {
135
+ "return_code": 200,
136
+ "return_msg": "正常响应"
137
+ },
138
+ "body": {
139
+ "node_list": [
140
+ {
141
+ "id": "1611",
142
+ "name": "北京香颂",
143
+ "address": "望京北京香颂224号楼306室",
144
+ "distance": "",
145
+ "is_shop": true,
146
+ "has_box": true,
147
+ "has_meal": false,
148
+ "lat": "39.998533",
149
+ "lng": "116.45923",
150
+ "vm_connected": true
151
+ }
152
+ ],
153
+ "has_more": false
154
+ }
155
+ }
156
+ ```
157
+
158
+ ### productList 根据售货机获取商品列表
159
+
160
+ ```ruby
161
+ products = Ubox.product_list(vmid: '0061029')
162
+ ```
133
163
 
164
+ ```json
165
+ {
166
+ "head": {
167
+ "return_code": 200,
168
+ "return_msg": "正常响应"
169
+ },
170
+ "body": {
171
+ "shelfs": [
172
+ {
173
+ "id": 1,
174
+ "name": "热销",
175
+ "url": "",
176
+ "products": [
177
+ 19401,
178
+ 24605,
179
+ 19492,
180
+ 24602,
181
+ 19458,
182
+ 19450,
183
+ 19497,
184
+ 19461,
185
+ 19463,
186
+ 24601,
187
+ 19474
188
+ ]
189
+ },
190
+ {
191
+ "id": 113,
192
+ "name": "百货",
193
+ "url": "",
194
+ "products": [
195
+ 19401,
196
+ 19450,
197
+ 19458,
198
+ 19461,
199
+ 19463,
200
+ 19474,
201
+ 19492,
202
+ 19497,
203
+ 24601,
204
+ 24602,
205
+ 24605
206
+ ]
207
+ }
208
+ ],
209
+ "products": [
210
+ {
211
+ "id": 19401,
212
+ "name": "魅蓝伸缩飞机杯",
213
+ "sName": "魅蓝伸缩飞机杯",
214
+ "price": 39900,
215
+ "oldPrice": 39900,
216
+ "desc": "",
217
+ "expire_time": 1464934974,
218
+ "pic": "http://img.ubox.cn/box-tmp/m/19401/19401.jpg?t=20151117135023",
219
+ "num": 1
220
+ },
221
+ {
222
+ "id": 19450,
223
+ "name": "品色国际帝王之器转珠棒",
224
+ "sName": "品色国际帝王之器转珠棒",
225
+ "price": 16800,
226
+ "oldPrice": 16800,
227
+ "desc": "",
228
+ "expire_time": 1464934974,
229
+ "pic": "http://img.ubox.cn/box-tmp/m/19450/19450.jpg?t=20151118130540",
230
+ "num": 1
231
+ },
232
+ {
233
+ "id": 19497,
234
+ "name": "冈本skin纯淡香味3只装",
235
+ "sName": "冈本skin纯淡香味",
236
+ "price": 1200,
237
+ "oldPrice": 1200,
238
+ "desc": "",
239
+ "expire_time": 1464934974,
240
+ "pic": "http://img.ubox.cn/box-tmp/m/19497/19497.jpg?t=20151118140955",
241
+ "num": 1
242
+ },
243
+ {
244
+ "id": 19461,
245
+ "name": "玩爆潮品震动水晶套飞毛腿",
246
+ "sName": "玩爆潮品震动水晶套飞毛腿",
247
+ "price": 4900,
248
+ "oldPrice": 4900,
249
+ "desc": "",
250
+ "expire_time": 1464934974,
251
+ "pic": "http://img.ubox.cn/box-tmp/m/19461/19461.jpg?t=20151118131354",
252
+ "num": 1
253
+ },
254
+ {
255
+ "id": 19492,
256
+ "name": "MOVO女用提升欲望润滑液100ml",
257
+ "sName": "MOVO女用提升欲望润滑",
258
+ "price": 13800,
259
+ "oldPrice": 13800,
260
+ "desc": "",
261
+ "expire_time": 1464934974,
262
+ "pic": "http://img.ubox.cn/box-tmp/m/19492/19492.jpg?t=20151118140611",
263
+ "num": 1
264
+ },
265
+ {
266
+ "id": 24605,
267
+ "name": "瑟诗芭比缕空露乳连体袜",
268
+ "sName": "缕空露乳连体袜",
269
+ "price": 9900,
270
+ "oldPrice": 9900,
271
+ "desc": "",
272
+ "expire_time": 1464934974,
273
+ "pic": "http://img.ubox.cn/box-tmp/m/24605/24605.jpg?t=20160519174238",
274
+ "num": 1
275
+ },
276
+ {
277
+ "id": 19463,
278
+ "name": "玩爆潮品震动水晶套流星锤",
279
+ "sName": "玩爆潮品震动水晶套流星锤",
280
+ "price": 4900,
281
+ "oldPrice": 4900,
282
+ "desc": "",
283
+ "expire_time": 1464934974,
284
+ "pic": "http://img.ubox.cn/box-tmp/m/19463/19463.jpg?t=20151118131515",
285
+ "num": 1
286
+ },
287
+ {
288
+ "id": 24602,
289
+ "name": "久兴20频狂舔魔舌震动器颗粒型",
290
+ "sName": "狂舔魔舌震动器颗粒型",
291
+ "price": 12800,
292
+ "oldPrice": 12800,
293
+ "desc": "",
294
+ "expire_time": 1464934974,
295
+ "pic": "http://img.ubox.cn/box-tmp/m/24602/24602.jpg?t=20160519173901",
296
+ "num": 1
297
+ },
298
+ {
299
+ "id": 19458,
300
+ "name": "VNA藏帝男用延时喷剂15ml",
301
+ "sName": "VNA藏帝男用延时喷剂",
302
+ "price": 19900,
303
+ "oldPrice": 19900,
304
+ "desc": "",
305
+ "expire_time": 1464934974,
306
+ "pic": "http://img.ubox.cn/box-tmp/m/19458/19458.jpg?t=20151118131152",
307
+ "num": 1
308
+ },
309
+ {
310
+ "id": 24601,
311
+ "name": "蒂贝女用振动棒潮吹蛇王",
312
+ "sName": "潮吹蛇王",
313
+ "price": 16800,
314
+ "oldPrice": 16800,
315
+ "desc": "",
316
+ "expire_time": 1464934974,
317
+ "pic": "http://img.ubox.cn/box-tmp/m/24601/24601.jpg?t=20160519173745",
318
+ "num": 1
319
+ },
320
+ {
321
+ "id": 19474,
322
+ "name": "倍耐力男用延时喷剂",
323
+ "sName": "倍耐力男用延时喷剂",
324
+ "price": 3900,
325
+ "oldPrice": 3900,
326
+ "desc": "",
327
+ "expire_time": 1464934974,
328
+ "pic": "http://img.ubox.cn/box-tmp/m/19474/19474.jpg?t=20151118135030",
329
+ "num": 1
330
+ }
331
+ ]
332
+ }
333
+ }
134
334
  ```
135
335
 
136
336
  ## Development
data/lib/ubox.rb CHANGED
@@ -75,4 +75,9 @@ module Ubox
75
75
  def search_vm_list(attributes)
76
76
  post_request('/searchVmList', attributes)
77
77
  end
78
+
79
+ #根据售货机查询商品列表接口
80
+ def product_list(attributes)
81
+ post_request('/productList', attributes)
82
+ end
78
83
  end
data/lib/ubox/version.rb CHANGED
@@ -1,3 +1,3 @@
1
1
  module Ubox
2
- VERSION = "0.1.6"
2
+ VERSION = "0.1.7"
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: ubox
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.6
4
+ version: 0.1.7
5
5
  platform: ruby
6
6
  authors:
7
7
  - Saxer
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2016-06-01 00:00:00.000000000 Z
11
+ date: 2016-06-02 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler