dji 0.1.0 → 0.1.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 +10 -1
- data/lib/dji/commands/track/track_command.rb +13 -1
- 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: 99c613192536d1beb1acc577ae701ec56b25dfaf
|
4
|
+
data.tar.gz: df2972a66397e7d063fb3b69b77a0d8a387029c2
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 0d14ba56c39806c116901a2015b9b1ec3ee36629609dae3ef0cd443b46309f9790bdea2b8fad4cc9c52ef931755263e8cd46079b98a56b59068b3aa7dc42646d
|
7
|
+
data.tar.gz: fbe12e7d0bc3c125b81541173e0ed680c9bbbcc02262db078c17d04b43dfaa383c8006615d3cdd4b0d91b9be23e327b2beceb7d9e1279bb70c248492c28be6b6
|
data/README.md
CHANGED
@@ -18,7 +18,16 @@ Open a command line (Terminal on macOS):
|
|
18
18
|
|
19
19
|
Use your order number in place of ORDER_NUMBER and the last 4 digits of your phone number for PHONE_TAIL. A full example might look like this:
|
20
20
|
|
21
|
-
$ dji track -o
|
21
|
+
$ dji track -o 123456789012 -p 1234
|
22
|
+
|
23
|
+
ORDER TRACKING AS OF 2016-10-27 01:12:27 -0700
|
24
|
+
------------------------------------------------------
|
25
|
+
Order Number : 123456789012
|
26
|
+
Total : USD $1,398.00
|
27
|
+
Payment Status : Pay Confirmed
|
28
|
+
Shipping Status : Pending
|
29
|
+
Shipping Company : Tba
|
30
|
+
Tracking Number :
|
22
31
|
|
23
32
|
## Development
|
24
33
|
|
@@ -4,9 +4,21 @@ module DJI
|
|
4
4
|
desc 'track ORDER_NUMBER PHONE_TAIL', 'track an order'
|
5
5
|
option :order_number, required: true, aliases: :o
|
6
6
|
option :phone_tail, required: true, aliases: :p
|
7
|
+
option :repeat, aliases: :r
|
7
8
|
|
8
9
|
def track
|
9
|
-
|
10
|
+
if options[:repeat].present?
|
11
|
+
interval = options[:repeat].to_i.presence || 300
|
12
|
+
puts
|
13
|
+
puts "Requesting order tracking details every #{interval} seconds. Press CONTROL-C to stop..."
|
14
|
+
|
15
|
+
while true
|
16
|
+
DJI::OrderTracking.tracking_details(options[:order_number], options[:phone_tail])
|
17
|
+
sleep(interval)
|
18
|
+
end
|
19
|
+
else
|
20
|
+
DJI::OrderTracking.tracking_details(options[:order_number], options[:phone_tail])
|
21
|
+
end
|
10
22
|
end
|
11
23
|
end
|
12
24
|
end
|
data/lib/dji/version.rb
CHANGED