london_cab 0.1.1 → 0.1.2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.md +1 -1
- data/lib/london_cab/api/endpoints/request.rb +17 -0
- data/lib/london_cab/api/endpoints/ride.rb +18 -2
- data/lib/london_cab/api/endpoints.rb +2 -0
- data/lib/london_cab/version.rb +1 -1
- metadata +3 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: a779440daaa2b8711d4859471278b5e9a351d3ef
|
4
|
+
data.tar.gz: 3cee35b5efec8c6cf320c80377bee421fe34cd09
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 50f4c988d13dfb2175c75579c2c91b6af2765c9e77f399aaf6f924e13a3402870142f30a40c96eef921d3ffa7f82f49a720de39722912c41f623b51e4e76f9fe
|
7
|
+
data.tar.gz: 8585fb7853c6b6017f938431a87fd71b2adee57d563094ed80e381d2c8f010cdd740625efb7b3ee5066e9f05f47248cb93d56289f043fdd894f446dd9cc6d55d
|
data/README.md
CHANGED
@@ -86,7 +86,7 @@ client.ride_request(PickupLong: '31.276942',
|
|
86
86
|
|
87
87
|
## History
|
88
88
|
|
89
|
-
The structure of this gem is based on [slack-ruby-
|
89
|
+
The structure of this gem is based on [slack-ruby-client](https://github.com/slack-ruby/slack-ruby-client).
|
90
90
|
|
91
91
|
## Development
|
92
92
|
|
@@ -0,0 +1,17 @@
|
|
1
|
+
module LondonCab
|
2
|
+
module Api
|
3
|
+
module Endpoints
|
4
|
+
module Request
|
5
|
+
def request_now(pickup_latitude:,
|
6
|
+
pickup_longitude:,
|
7
|
+
dropoff_latitude:,
|
8
|
+
dropoff_longitude:)
|
9
|
+
post('RequestRideNow', 'PickupLat' => pickup_latitude,
|
10
|
+
'PickupLong' => pickup_longitude,
|
11
|
+
'DropoffLat' => dropoff_latitude,
|
12
|
+
'DropoffLong' => dropoff_longitude)['Result']
|
13
|
+
end
|
14
|
+
end
|
15
|
+
end
|
16
|
+
end
|
17
|
+
end
|
@@ -2,8 +2,24 @@ module LondonCab
|
|
2
2
|
module Api
|
3
3
|
module Endpoints
|
4
4
|
module Ride
|
5
|
-
def
|
6
|
-
|
5
|
+
def ride_now(pickup_latitude:,
|
6
|
+
pickup_longitude:,
|
7
|
+
dropoff_latitude:,
|
8
|
+
dropoff_longitude:,
|
9
|
+
customer_name:,
|
10
|
+
customer_phone:,
|
11
|
+
customer_email:)
|
12
|
+
post('ConfirmBookNowRide', 'PickupLat' => pickup_latitude,
|
13
|
+
'PickupLong' => pickup_longitude,
|
14
|
+
'DropoffLat' => dropoff_latitude,
|
15
|
+
'DropoffLong' => dropoff_longitude,
|
16
|
+
'CustomerName' => customer_name,
|
17
|
+
'CustomerPhone' => customer_phone,
|
18
|
+
'CustomerEmail' => customer_email)['Result']
|
19
|
+
end
|
20
|
+
|
21
|
+
def ride_cancel(ride_id:)
|
22
|
+
post("CancelRide/#{ride_id}")['Result']['IsCanceled']
|
7
23
|
end
|
8
24
|
end
|
9
25
|
end
|
data/lib/london_cab/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: london_cab
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.
|
4
|
+
version: 0.1.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Ramy Aboul Naga
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2017-
|
11
|
+
date: 2017-04-26 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: faraday
|
@@ -140,6 +140,7 @@ files:
|
|
140
140
|
- bin/setup
|
141
141
|
- lib/london_cab.rb
|
142
142
|
- lib/london_cab/api/endpoints.rb
|
143
|
+
- lib/london_cab/api/endpoints/request.rb
|
143
144
|
- lib/london_cab/api/endpoints/ride.rb
|
144
145
|
- lib/london_cab/api/error.rb
|
145
146
|
- lib/london_cab/client.rb
|