smartcar / node-sdk

Smartcar Node.js SDK
MIT License
50 stars 14 forks source link

Implement 'Send Destination' Feature in Smartcar Node SDK #167

Closed aytekin-smartcar closed 11 months ago

aytekin-smartcar commented 11 months ago

Overview:

This Pull Request introduces a significant update to the Smartcar Node SDK, adding the ability to send a destination to a vehicle's navigation system. The changes include the necessary modifications in the Vehicle class, updates to the documentation, and adjustments to end-to-end tests.

Changes:

  1. lib/vehicle.js:

    • Added the sendDestination method to the Vehicle class. This method allows users to send a latitude and longitude to the vehicle's navigation system. Input validation is performed to ensure latitude is between -90 and 90, and longitude is between -180 and 180.
  2. doc/readme.md:

    • Updated documentation to include the sendDestination method in the Vehicle class section. It provides detailed information on the method's usage, parameters, expected responses, and error handling.
  3. test/end-to-end/vehicle.js:

    • Included a new test case for the sendDestination method to ensure it functions correctly and handles errors as expected.
  4. .prettierignore:

    • Added a new .prettierignore file to ensure consistent styling across the project, ignoring all files from formatting.
  5. Miscellaneous:

    • Various minor corrections and updates in documentation and test files for improved clarity and accuracy.

Purpose:

The addition of the sendDestination method greatly enhances the SDK's capabilities, providing developers with more control over vehicle functionalities and expanding the range of applications that can be developed using the Smartcar Node SDK.

Testing:

End-to-end tests have been updated to cover the new sendDestination functionality. All tests are passing, ensuring the feature works as intended and existing functionalities remain unaffected.

Notes:

Developers using the SDK should update their applications to incorporate these changes and take advantage of the new feature. The update is backward compatible and should not affect existing implementations.

sektek commented 11 months ago

It looks like you need to run npm run docs and then commit the changes that makes to docs/readme.md to get it to pass CI.

codecov[bot] commented 11 months ago

Codecov Report

All modified and coverable lines are covered by tests :white_check_mark:

Comparison is base (6846319) 99.64% compared to head (3cb41aa) 99.65%.

Additional details and impacted files ```diff @@ Coverage Diff @@ ## master #167 +/- ## ======================================= Coverage 99.64% 99.65% ======================================= Files 6 6 Lines 280 288 +8 ======================================= + Hits 279 287 +8 Misses 1 1 ```

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.

aytekin-smartcar commented 11 months ago

Should probably put in tests to cover the two error cases in the sendDestination function for coverage.

Great catch :+1: Added!

smartcar-ci commented 10 months ago

:tada: This PR is included in version 9.8.0 :tada:

The release is available on:

Your semantic-release bot :package::rocket: