Skip to content

Match vpic-api behavior #2

Description

@sshane

Or have it match this library's behavior, so it is more of a drop-in replacement. I thought a formal issue would be a good idea to track this and for discussion.

  • For example, invalid or foreign (format, check digit, and/or model year character bad) VINs throw an immediate exception instead of returning an object where you can check an error code/text field. I think it is best if you can parse as much of the VIN that VPIC lets you (even if just make), with some error field

  • Standardize return values: does None for electrification_level mean unknown or no electrification?

    In [11]: TypedClient().decode_vin('5FNRL6H4X').electrification_level
    Out[11]: ''
  • Partial decoding would be nice, but not required

    In [16]: TypedClient().decode_vin('4T1C31AK').electrification_level
    Out[16]: 'HEV (Hybrid Electric Vehicle) - Level Unknown'
    
    In [17]: VIN('4T1C31AK').electrification_level
    ValueError: VIN must be exactly 17 characters long
  • Model year is an int in this library, and a string in vpic-api

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

enhancementNew feature or request

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions