支持顺丰、EMS、申通、圆通、中通、宅急送、韵达、天天快递、联邦快递、汇通等,无须验证码
gem install china-express --no-ri --no-rdoc
请前往 爱查快递API申请,申请成功,爱查会给你发 key
到你的邮箱
require 'china-express'
Express.key = 'your_key_here'
Express.search (单号', '快递公司')
result = Express.search('123456', '顺丰')
result.success? # true
result.data # [{'time' => "2012-10-08 09:20", 'context' => "签收人是:马"}]
result.data.each do |item|
puts "#{item['time']} #{item['context']}"
end