samrum / OnStarJS

NodeJS Library for making OnStar API requests
MIT License
85 stars 17 forks source link

Body json format for post requests #244

Open jayprojects opened 4 months ago

jayprojects commented 4 months ago

Hi thank you for this awesome project.

Im able to execute commands that doesn't require any options parameters. and im getting response data as expected. However when try commands with parameter its not returning data

Works: data= await onStar.getChargingProfile();

doesn't work

data=  await onStar.diagnostics({
            "diagnosticItem": ["ODOMETER","TIRE PRESSURE"]
          });

or 

data=  await onStar.diagnostics({
            diagnosticItem: ["ODOMETER","TIRE PRESSURE"]
          });

response status is success but data is undefined.

Any idea what im doing wrong? Thanks

jayprojects commented 4 months ago

looks like i figured out. on the first request it return a url instead of data, data is returned after executing the url return by the first request.

Q, anyone know any way to set/update max charge limit number?