Module: Express
- Includes:
- Company, HTTParty
- Defined in:
- lib/china-express.rb,
lib/express/result.rb,
lib/express/company.rb
Overview
快递查询
Defined Under Namespace
Modules: Company Classes: Result
Constant Summary
Constants included from Company
Class Attribute Summary collapse
-
.key ⇒ Object
Returns the value of attribute key.
Class Method Summary collapse
Methods included from Company
Class Attribute Details
.key ⇒ Object
Returns the value of attribute key.
15 16 17 |
# File 'lib/china-express.rb', line 15 def key @key end |
Class Method Details
.search(number, company, key = nil) ⇒ Object
20 21 22 23 24 |
# File 'lib/china-express.rb', line 20 def self.search(number, company, key = nil) = { com: company_code(company), nu: number, id: (key || self.key )} body = get("/", query: ).body Result.new JSON(body) end |