Class: Lyft::Client::Api::User
Constant Summary collapse
- ENDPOINTS =
{ history: "/#{API_VERSION}/rides", profile: "/#{API_VERSION}/profile" }
Constants inherited from Base
Base::API_VERSION, Base::DEFAULT_VALIDATES
Instance Method Summary collapse
-
#profile(args = {}) ⇒ Object
Get user’s profile.
-
#ride_history(args = {}) ⇒ Object
Get ride history.
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
#profile(args = {}) ⇒ Object
Get user’s profile
37 38 39 40 41 42 43 44 |
# File 'lib/lyft/client/api/user.rb', line 37 def profile(args = {}) make_request( http_method: :get, endpoint: path_for(:profile), access_token: args.delete(:access_token), options: { query: args } ) end |
#ride_history(args = {}) ⇒ Object
Get ride history
19 20 21 22 23 24 25 26 27 28 29 |
# File 'lib/lyft/client/api/user.rb', line 19 def ride_history(args = {}) args.delete(:end_time) if args[:end_time].blank? args.delete(:limit) if args[:limit].blank? make_request( http_method: :get, endpoint: path_for(:history), access_token: args.delete(:access_token), options: { query: args } ) end |