kuaidi100_rails 0.1.4 → 0.1.5

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 0721c8450a8aff6ba1353ed0659ddaa6584d08b6
4
- data.tar.gz: 5dac334a516973e0221efeb7569c8519faa1cc8e
3
+ metadata.gz: 562c2189cb0711de85c7dfdd4f9aa2c49aa61355
4
+ data.tar.gz: e79530618abdda0aebf0eed8a9f87e48ab98a28c
5
5
  SHA512:
6
- metadata.gz: 9ab3da56a6ee76bd86d754fa19509337e411994f24af3bfdbaa475a5065d27d60cca6b75d1309cde6b6521baf2540a39f5dfdafd0d8a050401a6b900c53f4b8a
7
- data.tar.gz: 3f4d609f272214d873e73dff0577b5f2aeb0d7cdb4307fcdff9cd512cb37018ff2c3730c05762e412577ce64e548087b48109c775380d5b6458ea88e17d9f388
6
+ metadata.gz: 54ec7e85325acd6fc79c702487ca46dbf56239ca52e1eeff02760287a2141d362f3746f9cac66eed334837dadd1e4e2a777435ca339391fcdb52a0ec230952ea
7
+ data.tar.gz: 6803e3802c2de95adf6887253198764127d4af55e5a857ba2a6c5d4a7054f43d88758241b5ed04eed96ec5a20fbf691baf69d3e71439da29f606af72e596f1bc
data/README.md CHANGED
@@ -1,8 +1,6 @@
1
1
  # Kuaidi100Rails
2
2
 
3
- Welcome to your new gem! In this directory, you'll find the files you need to be able to package up your Ruby library into a gem. Put your Ruby code in the file `lib/kuaidi100_rails`. To experiment with that code, run `bin/console` for an interactive prompt.
4
-
5
- TODO: Delete this and the text above, and describe your gem
3
+ 快递100抓取物流信息推送接口
6
4
 
7
5
  ## Installation
8
6
 
@@ -22,8 +20,12 @@ Or install it yourself as:
22
20
 
23
21
  ## Usage
24
22
 
25
- TODO: Write usage instructions here
26
-
23
+ ###抓取物流信息
24
+ ```ruby
25
+ Kuaidi100Rails.POLL_CALLBACK_URL='http://yourserverurl/kuaidis/callback'
26
+ Kuaidi100Rails.POLL_KEY = 'yourpollkey'
27
+ Kuaidi100Rails.subscribe('yuantong', '7001360xxxx', '北京市', '江苏省镇江市丹阳市',nil,'152xxxxyyyy','company name','product name')
28
+ ```
27
29
  ## Development
28
30
 
29
31
  After checking out the repo, run `bin/setup` to install dependencies. Then, run `bin/console` for an interactive prompt that will allow you to experiment.
@@ -68,7 +68,10 @@ module Kuaidi100Rails
68
68
  #+from+ start from address
69
69
  #+to+ destination address
70
70
  #+salt+ random signature string
71
- def subscribe(com, nu, from, to, salt=nil)
71
+ #+mobiletelephone+ user phone
72
+ #+seller+ seller's name
73
+ #+commodity+ product's name
74
+ def subscribe(com, nu, from, to, salt=nil, mobiletelephone=nil, seller=nil, commodity=nil)
72
75
  begin
73
76
  body = {
74
77
  company: com,
@@ -79,7 +82,10 @@ module Kuaidi100Rails
79
82
  parameters: {
80
83
  callbackurl: Kuaidi100Rails.POLL_CALLBACK_URL,
81
84
  salt: salt,
82
- resultv2: '1'
85
+ resultv2: '1',
86
+ mobiletelephone: mobiletelephone,
87
+ seller: seller,
88
+ commodity: commodity
83
89
  }
84
90
  }
85
91
  p body
@@ -1,3 +1,3 @@
1
1
  module Kuaidi100Rails
2
- VERSION = "0.1.4"
2
+ VERSION = "0.1.5"
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: kuaidi100_rails
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.4
4
+ version: 0.1.5
5
5
  platform: ruby
6
6
  authors:
7
7
  - saxer
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2015-10-22 00:00:00.000000000 Z
11
+ date: 2016-03-30 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler
@@ -91,7 +91,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
91
91
  version: '0'
92
92
  requirements: []
93
93
  rubyforge_project:
94
- rubygems_version: 2.4.6
94
+ rubygems_version: 2.4.3
95
95
  signing_key:
96
96
  specification_version: 4
97
97
  summary: kuaidi100