smartcar / android-sdk

Smartcar Android Auth SDK
https://smartcar.github.io/android-sdk
MIT License
19 stars 2 forks source link

feat: added errors and ability to pass in vehicle in URL #17

Closed rishabluthra closed 5 years ago

rishabluthra commented 5 years ago

Refactored Android SDK to actually get errors from the redirect URI, vehicles can also be passed in URI and returned in the SDK.

Refactors: VehicleInfo: a new class that replaces AuthVehicleInfo that was previously nested in SmartcarAuth to be a general vehicleInfo class for both auth and response, follows the builder pattern

SmartcarAuth: the receive response function has been refactored to either build a new response with a code, error or error and vehicleinfo instead of just code.

SmartcarResponse: Is now a builder as there were going to be telescoping constructors.

SmartcarAuthTests: added tests for my new functionality to get coverage SmartcarResponseTests: added tests for my new functionality.

=== Reviewer checklist ===

codecov[bot] commented 5 years ago

Codecov Report

Merging #17 into master will increase coverage by 15.95%. The diff coverage is 100%.

Impacted file tree graph

@@             Coverage Diff             @@
##           master      #17       +/-   ##
===========================================
+ Coverage   47.79%   63.75%   +15.95%     
===========================================
  Files           8        9        +1     
  Lines         159      229       +70     
  Branches       10       15        +5     
===========================================
+ Hits           76      146       +70     
  Misses         81       81               
  Partials        2        2
Impacted Files Coverage Δ
...ain/java/com/smartcar/sdk/SmartcarAuthRequest.java 100% <ø> (ø) :arrow_up:
...ar-auth/src/main/java/com/smartcar/sdk/Helper.java 60% <100%> (+17.14%) :arrow_up:
...h/src/main/java/com/smartcar/sdk/SmartcarAuth.java 62.06% <100%> (+12.06%) :arrow_up:
...th/src/main/java/com/smartcar/sdk/VehicleInfo.java 100% <100%> (ø)
...c/main/java/com/smartcar/sdk/SmartcarResponse.java 100% <100%> (ø) :arrow_up:

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 17265aa...963112a. Read the comment docs.