Class: Lyft::Client::Api::User
Instance Attribute Summary
Attributes inherited from Base
Instance Method Summary collapse
-
#profile(access_token:, params: {}) ⇒ Object
Get user’s profile.
-
#ride_history(access_token:, params: {}) ⇒ Object
Get ride history.
Methods inherited from Base
Constructor Details
This class inherits a constructor from Lyft::Client::Api::Base
Instance Method Details
#profile(access_token:, params: {}) ⇒ Object
Get user’s profile
31 32 33 34 35 36 37 |
# File 'lib/lyft/client/api/user.rb', line 31 def profile(access_token:, params: {}) resp = connection(access_token).get do |req| req.url "/#{Api::VERSION}/profile" req.params = params end handle_response(resp) end |
#ride_history(access_token:, params: {}) ⇒ Object
Get ride history
14 15 16 17 18 19 20 21 22 23 |
# File 'lib/lyft/client/api/user.rb', line 14 def ride_history(access_token:, params: {}) params.delete(:end_time) if params[:end_time].blank? params.delete(:limit) if params[:limit].blank? resp = connection(access_token).get do |req| req.url "/#{Api::VERSION}/rides" req.params = params end handle_response(resp) end |