Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Feature: incomplete charges #109

Draft
wants to merge 12 commits into
base: main
Choose a base branch
from
Draft

Commits on Jul 20, 2021

  1. Provide Access to Incomplete Charges

    While these are usually charges that failed, they also include charges that are in progress. The client should be able to see these Charges and decide how to proceed. These charges were, at one point, real charges with relevant data.
    
    Reasons for failure:
    - Charging started, TeslaMate server or Tesla API went offline
    - Charging in progress (not actually failure, just incomplete charge data)
    
    This will also allow the user to know about the charge's existence and query (by ID) the Charge Details. Since the database stored the many charge detail objects, the user may be able to process some additional information about the charge. Especially if the charge is in progress.
    
    Example:
    1. Charge is in progress.
    2. Receive basic charge data, like start date and charge ID. 
    3. Query Charge Details to info like: start date, power over time, etc.
    
    However, even with access to this additional data that does exist, the user still will not be able to see data from when the charge went offline. Or in the case the charge is still occurring, the user can't see charge details that haven't happened yet.
    
    Therefore,
    Charge Details require an additional parameter `isCompleted:BOOL` so the user knows if an object is finalized.
    
    **The user will have to determine whether the charge is still in progress or corrupted, by seeing if there are any recent charges. If it's in progress, the user should consider refreshing that charge object in the future.**
    
    I chose to add this as a separate object on `Data` so that it will not affect existing API users. This will ensure incomplete charges are not treated as completed charges.
    alecdoconnor authored Jul 20, 2021
    Configuration menu
    Copy the full SHA
    542fc40 View commit details
    Browse the repository at this point in the history

Commits on Jul 21, 2021

  1. Update v1_TeslaMateAPICarsCharges.go

    Finally got builds working on my local machine. Next few commits may to fix bugs from new code
    alecdoconnor authored Jul 21, 2021
    Configuration menu
    Copy the full SHA
    df10ffc View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    a819f30 View commit details
    Browse the repository at this point in the history
  3. Configuration menu
    Copy the full SHA
    80e6e72 View commit details
    Browse the repository at this point in the history
  4. Configuration menu
    Copy the full SHA
    6a8554e View commit details
    Browse the repository at this point in the history
  5. Fix Charges

    This reverts commit 6a8554e.
    Alec O’Connor committed Jul 21, 2021
    Configuration menu
    Copy the full SHA
    8740b29 View commit details
    Browse the repository at this point in the history
  6. Whitespace

    Alec O’Connor committed Jul 21, 2021
    Configuration menu
    Copy the full SHA
    c305182 View commit details
    Browse the repository at this point in the history
  7. Charge details

    Alec O’Connor committed Jul 21, 2021
    Configuration menu
    Copy the full SHA
    d6359eb View commit details
    Browse the repository at this point in the history
  8. Clean up whitespace

    Alec O’Connor committed Jul 21, 2021
    Configuration menu
    Copy the full SHA
    8477384 View commit details
    Browse the repository at this point in the history

Commits on Aug 4, 2021

  1. Replace null with empty array

    Existing issue, chargesdata is null when empty. To check, set ?page=10 and see the response. An empty array is more useful and clear
    Alec O’Connor committed Aug 4, 2021
    Configuration menu
    Copy the full SHA
    fa8f611 View commit details
    Browse the repository at this point in the history

Commits on Oct 11, 2021

  1. Update .gitignore

    tobiasehlert authored Oct 11, 2021
    Configuration menu
    Copy the full SHA
    9da3cf2 View commit details
    Browse the repository at this point in the history
  2. Merge pull request #93 from alecdoconnor/patch-3

    Display incomplete charge data
    tobiasehlert authored Oct 11, 2021
    Configuration menu
    Copy the full SHA
    0dc4007 View commit details
    Browse the repository at this point in the history