Class: Lyft::Client::Api::Availability
- Defined in:
- lib/lyft/client/api/availability.rb
Constant Summary collapse
- ENDPOINTS =
{ cost: "/#{API_VERSION}/cost", eta: "/#{API_VERSION}/eta", nearby_drivers: "/#{API_VERSION}/drivers", ride_types: "/#{API_VERSION}/ridetypes" }
Constants inherited from Base
Base::API_VERSION, Base::DEFAULT_VALIDATES
Instance Method Summary collapse
-
#cost(args = {}) ⇒ Object
Get the estimated cost of ride.
-
#eta(args = {}) ⇒ Object
Get eta for lyft driver to reach location.
-
#nearby_drivers(args = {}) ⇒ Object
Get positions of nearby drivers.
-
#ride_types(args = {}) ⇒ Object
Get available lyft ride types.
Methods inherited from Base
#initialize, #path_for, path_for, #set_debug_output
Constructor Details
This class inherits a constructor from Lyft::Client::Api::Base
Instance Method Details
#cost(args = {}) ⇒ Object
Get the estimated cost of ride.
31 32 33 34 35 36 37 38 |
# File 'lib/lyft/client/api/availability.rb', line 31 def cost(args = {}) make_request( http_method: :get, endpoint: path_for(:cost), access_token: args.delete(:access_token), options: { query: args } ) end |
#eta(args = {}) ⇒ Object
Get eta for lyft driver to reach location
53 54 55 56 57 58 59 60 |
# File 'lib/lyft/client/api/availability.rb', line 53 def eta(args = {}) make_request( http_method: :get, endpoint: path_for(:eta), access_token: args.delete(:access_token), options: { query: args } ) end |
#nearby_drivers(args = {}) ⇒ Object
Get positions of nearby drivers
75 76 77 78 79 80 81 82 |
# File 'lib/lyft/client/api/availability.rb', line 75 def nearby_drivers(args = {}) make_request( http_method: :get, endpoint: path_for(:nearby_drivers), access_token: args.delete(:access_token), options: { query: args } ) end |
#ride_types(args = {}) ⇒ Object
Get available lyft ride types
96 97 98 99 100 101 102 103 |
# File 'lib/lyft/client/api/availability.rb', line 96 def ride_types(args = {}) make_request( http_method: :get, endpoint: path_for(:nearby_drivers), access_token: args.delete(:access_token), options: { query: args } ) end |