wicky_kuaidi100 0.0.1 → 0.0.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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: cab8f81a4d194f70f6979cd1874c008b370faa63
4
- data.tar.gz: 9f5b464a6f98f6093ee38dd6edc4107a26d55b06
3
+ metadata.gz: eec944644d712b89d79ddd39393a3c65e50d5c82
4
+ data.tar.gz: 1e69aa1345d753c9286c12c1ae57534762e03e11
5
5
  SHA512:
6
- metadata.gz: 5196393d0634d25f9539e416ecd6d0c49aa76ce98d3f7bc9492076f48c026218e4addc2fb399a6c1755d1d4bcaaa770dad6f1ce2e32bf4b593bef3762fa5f4cd
7
- data.tar.gz: e832c0f4c192757ca5dbf436a63fd020e04e1dd7a05c00776d295ff181c4e03c7864cfbdba81a272ceacdac5d6ac92a49d09a30092ee7db957558162d7bb9ded
6
+ metadata.gz: 55ec97cbed9c86d03fa6d11439d69df4805796da9c26740277833b37cdfc279692805808399c4fd899aa78cfe087f035c51a96789bea1963c751032042784c10
7
+ data.tar.gz: c29904c933a1e2f82da755faed07a614f2f92f1814c94443a29f12de195a0f91f96865a00497605d2b4424ea5acd370b0d899d9774cc0679ad1804fce1fae056
@@ -2,8 +2,7 @@ require "wicky_kuaidi100/version"
2
2
 
3
3
  module WickyKuaidi100
4
4
  # Your code goes here...
5
- def self.connection(nu,com)
6
- id = "c37076b4a12923d7"
5
+ def self.connection(id, nu, com)
7
6
 
8
7
  url = URI.parse('http://api.kuaidi100.com/api')
9
8
 
@@ -11,8 +10,8 @@ module WickyKuaidi100
11
10
  req = Net::HTTP::Post.new(url.path)
12
11
  req.set_form_data({
13
12
  id:"#{id}",
14
- com:"#{nu}",
15
- nu:"#{com}",
13
+ com:"#{com}",
14
+ nu:"#{nu}",
16
15
  valicode:"",
17
16
  show:"2",
18
17
  muti:"1",
@@ -22,6 +21,7 @@ module WickyKuaidi100
22
21
  puts http.request(req).body
23
22
 
24
23
  @content = http.request(req).body.force_encoding("UTF-8")
24
+ puts @content
25
25
  end
26
26
  end
27
27
 
@@ -1,3 +1,3 @@
1
1
  module WickyKuaidi100
2
- VERSION = "0.0.1"
2
+ VERSION = "0.0.2"
3
3
  end
data/t.rb ADDED
@@ -0,0 +1,2 @@
1
+ require 'wicky_kuaidi100'
2
+ wicky_kuaidi100.connection.connection("c37076b4a12923d7", "#{params[:com]}", "#{params[:nu]}")
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: wicky_kuaidi100
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.1
4
+ version: 0.0.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - superricky
@@ -52,6 +52,7 @@ files:
52
52
  - Rakefile
53
53
  - lib/wicky_kuaidi100.rb
54
54
  - lib/wicky_kuaidi100/version.rb
55
+ - t.rb
55
56
  - wicky_kuaidi100.gemspec
56
57
  homepage: ''
57
58
  licenses: