-
Notifications
You must be signed in to change notification settings - Fork 4
Open
Description
Trying to create a basic request to get extended attributes using the ruby SDK.
def vehicle
@token = params[:token]
ap @token
vehicle_ids = Smartcar.get_vehicles(token: @token).vehicles
ap vehicle_ids
vehicle = Smartcar::Vehicle.new(token: @token, id: vehicle_ids.first, options: {unit_system: 'imperial'})
ap vehicle
# vehicle_attributes = vehicle.attributes
path = "#{vehicle.attributes.make}/attributes"
vehicle_attributes = vehicle.request("GET", path)
ap vehicle_attributes
vehicle_attributes.to_h.slice(*%I[id make model year]).to_json
# API calls to get vehicle info
ap vehicle.odometer
endthe vehicle.request is erroring out with a 404:
SmartcarError (RESOURCE_NOT_FOUND:PATH - The requested resource does not exist. Please check the URL and try again.):
the path is being written as 'FORD/attributes' - just like it shows in the API documentation.
I get the test vehicles, I get the basic attributes but cannot get the extended attributes, if someone could point me to what I'm doing wrong I would really appreciate it.
Thanks in advance.
Metadata
Metadata
Assignees
Labels
No labels