dji 0.2.0 → 0.2.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.md +82 -0
- data/lib/dji/commands/fedex/fedex_command.rb +3 -3
- data/lib/dji/version.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: ac4d3c2e2f51ce0c4fb263671436ce1a2eb8855b
|
4
|
+
data.tar.gz: 3d19374aa18e5d02466fc90880203f9bb4eb24ea
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 2fced0e4e657e724cdeb72f51256e7123b851045acd8f4aaca0b67038437a2004325362f5effcb554add203b2c29191feef8a96b340a78d01a9548be77f8ad92
|
7
|
+
data.tar.gz: 578cac5d9c6cc37809a61fa0ec64f148328b929df771a544fb61a20b8ea6050a942480c144d016ae1915b91fabcb31fc6eebad5c85b857b98f0df49748a7b088
|
data/README.md
CHANGED
@@ -54,6 +54,88 @@ If you want this to repeat automatically at an interval, specify the option for
|
|
54
54
|
Shipping Company : Tba
|
55
55
|
Tracking Number :
|
56
56
|
|
57
|
+
### Search FedEx and track by reference
|
58
|
+
|
59
|
+
If you think your shipper is FedEx but you don't have a tracking code yet, you might be able to find your shipment by
|
60
|
+
searching Fedex by reference. This allows you to search and track by reference.
|
61
|
+
|
62
|
+
$ dji track -c COUNTRY_CODE -p POSTAL_CODE
|
63
|
+
|
64
|
+
An example of searching in the USA (country code is us) with a postal code:
|
65
|
+
|
66
|
+
$ dji fedex -c us -p 94123
|
67
|
+
|
68
|
+
FedEx Packages for Country us, Postal Code 94123 as of 2016-10-27 03:44:37 -0700
|
69
|
+
-------------------------------------------------------------------------------------------------------
|
70
|
+
|
71
|
+
PACKAGE 1
|
72
|
+
|
73
|
+
Origin : SHENZHEN, CN
|
74
|
+
Destination : San Francisco, CA, US
|
75
|
+
Tendered :
|
76
|
+
Picked Up :
|
77
|
+
Shipped : 2016-10-27 00:00:00 -0600
|
78
|
+
Est. Deliver : 2016-10-31 10:30:00 -0700
|
79
|
+
Dimensions : 22x34x16 cms
|
80
|
+
Total Weight : 9.7 lbs (4.4 kgs)
|
81
|
+
Status : Label created
|
82
|
+
|
83
|
+
If you want to search by a different reference, you can optionally pass it in:
|
84
|
+
|
85
|
+
$ dji fedex -c us -p 94123 --reference DJIGOODS
|
86
|
+
|
87
|
+
FedEx Packages for Country us, Postal Code 94123 as of 2016-10-27 03:50:57 -0700
|
88
|
+
-------------------------------------------------------------------------------------------------------
|
89
|
+
|
90
|
+
PACKAGE 1
|
91
|
+
|
92
|
+
Origin : SHENZHEN, CN
|
93
|
+
Destination : San Francisco, CA, US
|
94
|
+
Tendered :
|
95
|
+
Picked Up :
|
96
|
+
Shipped : 2016-10-27 00:00:00 -0600
|
97
|
+
Est. Deliver : 2016-10-31 10:30:00 -0700
|
98
|
+
Dimensions : 22x34x16 cms
|
99
|
+
Total Weight : 9.7 lbs (4.4 kgs)
|
100
|
+
Status : Label created
|
101
|
+
|
102
|
+
You may also have it repeat the search on a regular interval (in seconds):
|
103
|
+
|
104
|
+
$ dji fedex -c us -p 94123 -r 120
|
105
|
+
|
106
|
+
Requesting FedEx tracking by reference DJIGOODS every 120 seconds. Press CONTROL-C to stop...
|
107
|
+
|
108
|
+
FedEx Packages for Country us, Postal Code 94123 as of 2016-10-27 03:53:41 -0700
|
109
|
+
-------------------------------------------------------------------------------------------------------
|
110
|
+
|
111
|
+
PACKAGE 1
|
112
|
+
|
113
|
+
Origin : SHENZHEN, CN
|
114
|
+
Destination : San Francisco, CA, US
|
115
|
+
Tendered :
|
116
|
+
Picked Up :
|
117
|
+
Shipped : 2016-10-27 00:00:00 -0600
|
118
|
+
Est. Deliver : 2016-10-31 10:30:00 -0700
|
119
|
+
Dimensions : 22x34x16 cms
|
120
|
+
Total Weight : 9.7 lbs (4.4 kgs)
|
121
|
+
Status : Label created
|
122
|
+
|
123
|
+
|
124
|
+
FedEx Packages for Country us, Postal Code 94123 as of 2016-10-27 03:55:42 -0700
|
125
|
+
-------------------------------------------------------------------------------------------------------
|
126
|
+
|
127
|
+
PACKAGE 1
|
128
|
+
|
129
|
+
Origin : SHENZHEN, CN
|
130
|
+
Destination : San Francisco, CA, US
|
131
|
+
Tendered :
|
132
|
+
Picked Up :
|
133
|
+
Shipped : 2016-10-27 00:00:00 -0600
|
134
|
+
Est. Deliver : 2016-10-31 10:30:00 -0700
|
135
|
+
Dimensions : 22x34x16 cms
|
136
|
+
Total Weight : 9.7 lbs (4.4 kgs)
|
137
|
+
Status : Label created
|
138
|
+
|
57
139
|
## Development
|
58
140
|
|
59
141
|
After checking out the repo, run `bin/setup` to install dependencies. Then, run `rake spec` to run the tests. You can also run `bin/console` for an interactive prompt that will allow you to experiment.
|
@@ -4,14 +4,14 @@ module DJI
|
|
4
4
|
desc 'fedex COUNTRY_CODE POSTAL_CODE', 'track FedEx by reference'
|
5
5
|
option :country_code, required: true, aliases: :c
|
6
6
|
option :postal_code, required: true, aliases: :p
|
7
|
-
option :reference, aliases: :ref, default: 'DJIGOODS'
|
8
|
-
option :repeat, aliases: :r
|
7
|
+
option :reference, required: false, aliases: :ref, default: 'DJIGOODS'
|
8
|
+
option :repeat, required: false, aliases: :r
|
9
9
|
|
10
10
|
def fedex
|
11
11
|
if options[:repeat].present?
|
12
12
|
interval = options[:repeat].to_i.presence || 300
|
13
13
|
puts
|
14
|
-
puts "Requesting FedEx tracking by reference #{reference} every #{interval} seconds. Press CONTROL-C to stop..."
|
14
|
+
puts "Requesting FedEx tracking by reference #{options[:reference]} every #{interval} seconds. Press CONTROL-C to stop..."
|
15
15
|
|
16
16
|
while true
|
17
17
|
DJI::Fedex.track_by_reference(options[:country_code], options[:postal_code], options[:reference])
|
data/lib/dji/version.rb
CHANGED