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 +4 -4
- data/README.md +7 -5
- data/lib/kuaidi100_rails.rb +8 -2
- data/lib/kuaidi100_rails/version.rb +1 -1
- metadata +3 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 562c2189cb0711de85c7dfdd4f9aa2c49aa61355
|
4
|
+
data.tar.gz: e79530618abdda0aebf0eed8a9f87e48ab98a28c
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 54ec7e85325acd6fc79c702487ca46dbf56239ca52e1eeff02760287a2141d362f3746f9cac66eed334837dadd1e4e2a777435ca339391fcdb52a0ec230952ea
|
7
|
+
data.tar.gz: 6803e3802c2de95adf6887253198764127d4af55e5a857ba2a6c5d4a7054f43d88758241b5ed04eed96ec5a20fbf691baf69d3e71439da29f606af72e596f1bc
|
data/README.md
CHANGED
@@ -1,8 +1,6 @@
|
|
1
1
|
# Kuaidi100Rails
|
2
2
|
|
3
|
-
|
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
|
-
|
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.
|
data/lib/kuaidi100_rails.rb
CHANGED
@@ -68,7 +68,10 @@ module Kuaidi100Rails
|
|
68
68
|
#+from+ start from address
|
69
69
|
#+to+ destination address
|
70
70
|
#+salt+ random signature string
|
71
|
-
|
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
|
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
|
+
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:
|
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.
|
94
|
+
rubygems_version: 2.4.3
|
95
95
|
signing_key:
|
96
96
|
specification_version: 4
|
97
97
|
summary: kuaidi100
|