smartcar / java-sdk

Java client SDK for the Smartcar API.
https://smartcar.github.io/java-sdk
MIT License
20 stars 20 forks source link

feat: add SmartcarVehicleRequest class and Vehicle request method #103

Closed naomiperez closed 2 years ago

naomiperez commented 2 years ago

Add a new general purpose/BSE related object/method SmartcarVehicleRequest to allow making requests like so: SmartcarVehicleRequest req = new SmarcarVehicleRequest.Builder .method("GET") .path("tesla/thermometer/outside") .build(); Adds request() method to Vehicle class. Adds E2E tests for this class and method.

** The changes in this branch stem from a previous branch/PR. See here. The primary difference is that this branch doesn't include linting changes.

Test Plan: create an app with my Smartcar Developer account and make requests with this method once it's in staging/prod.

Asana: https://app.asana.com/0/1201332815308984/1201631034519423/f

codecov[bot] commented 2 years ago

Codecov Report

Merging #103 (5e66635) into master (8863aba) will increase coverage by 1.22%. The diff coverage is 91.54%.

Impacted file tree graph

@@             Coverage Diff              @@
##             master     #103      +/-   ##
============================================
+ Coverage     77.93%   79.16%   +1.22%     
- Complexity      185      200      +15     
============================================
  Files            34       37       +3     
  Lines           716      787      +71     
  Branches         44       49       +5     
============================================
+ Hits            558      623      +65     
- Misses          132      136       +4     
- Partials         26       28       +2     
Flag Coverage Δ
integration 66.70% <76.05%> (+0.92%) :arrow_up:
test 51.08% <88.73%> (+3.73%) :arrow_up:

Flags with carried forward coverage won't be shown. Click here to find out more.

Impacted Files Coverage Δ
src/main/java/com/smartcar/sdk/Smartcar.java 66.07% <ø> (ø)
.../java/com/smartcar/sdk/SmartcarVehicleRequest.java 86.04% <86.04%> (ø)
src/main/java/com/smartcar/sdk/Vehicle.java 99.10% <100.00%> (+0.19%) :arrow_up:
...in/java/com/smartcar/sdk/data/VehicleResponse.java 100.00% <100.00%> (ø)
...smartcar/sdk/data/VehicleResponseDeserializer.java 100.00% <100.00%> (ø)

Continue to review full report at Codecov.

Legend - Click here to learn more Δ = absolute <relative> (impact), ø = not affected, ? = missing data Powered by Codecov. Last update 8863aba...5e66635. Read the comment docs.