amattu2/state-inspection-lookup
Composer 安装命令:
composer require amattu2/state-inspection-lookup
包简介
This is a PHP wrapper for finding U.S. state inspection reports by a VIN number using various proprietary DMV endpoints
README 文档
README
This is a basic library/wrapper for digital vehicle state safety/emissions inspection record lookups. If you need to check the last date(s) a vehicle was state inspected, and you know the state, this library is for you. A few states also support returning information on the last emissions/smog test. Originally designed for integration within a automotive service management SaaS application.
States Supported
| State | Supported Operations | Notes |
|---|---|---|
| Maryland | Emissions/Smog, Safety | Pending further tests, but it appears that MD only keeps the e-inspection record until it expires (6 months) |
Usage
Install
Using composer
composer require amattu2/state-inspection-lookup
Manually
git clone https://github.com/amattu2/state-inspection-lookup
Files
Composer: Import the autoload
require("vendor/autoload.php");
Manually: Import the core files
require("src/Inspections.php"); require("src/StateInspectionBase.php"); require("src/StateInspectionInterface.php"); require("src/Utils.php");
Functions
Inspections::all
Retrieve all inspection types (smog/safety inspections)
$all = amattu2\Inspections::all("VIN", "STATE_ABBR");
VIN is the 17 digit VIN number of the vehicle of interest. STATE_ABBR is the 2 digit ISO-3166-2 state abbreviation.
Returns an array containing Emissions, Safety multi-dimensional arrays.
Inspections::safety
Retrieve all state safety (mechanical) inspection reports.
PHPDoc
/** * A endpoint wrapper to return a structured state safety inspection search result * All return attributes are nullable, given that each state returns different information. * * @param string VIN number * @return array Array<Array<?bool result, ?string date, ?string url>, ...> * @return array Structured return result * @throws TypeError * @throws UnsupportedStateOperationException * @author Alec M. <https://amattu.com> * @date 2021-04-07T11:05:27-040 */
Usage
amattu2\Inspections::safety("VIN", "STATE_ABBR");
VIN is the 17 digit VIN number of the vehicle of interest. STATE_ABBR is the 2 digit ISO-3166-2 state abbreviation.
Returns the following array:
Array ( [0] => Array ( [date] => ?string (Format: YYYY-MM-DD) [result] => ?bool [url] => ?string ) )
Inspections::emissions
Pull all emissions records for a vehicle.
PHPDoc
/** * A endpoint wrapper to return a structured state emissions test result * All return attributes are nullable, given that each state returns different information. * * @param string VIN number * @return array Array<Array<?string type, ?string date, ?bool result, ?string url>, ...> * @throws TypeError * @throws UnsupportedStateOperationException * @author Alec M. <https://amattu.com> * @date 2021-04-07T14:51:13-040 */
Usage
amattu2\Inspections::emissions("VIN", "STATE_ABBR")
VIN is the 17 digit VIN number of the vehicle of interest. STATE_ABBR is the 2 digit ISO-3166-2 state abbreviation.
Returns the following array:
Array ( [0] => Array ( [date] => ?string (Format: YYYY-MM-DD) [result] => ?bool [type] => ?string [url] => ?string ) )
To-Do Integrations
A list of potential integrations with state systems. These require advanced parsing or endpoint manipulation to grab the information.
Safety Inspections
| State | Portal |
|---|---|
| Delaware | Link |
| California | Link |
| Virginia | Link |
| Georgia | Link |
| Texas | Link |
Emissions Inspections
| State | Portal |
|---|
Notes
https://haynes.com/en-us/tips-tutorials/what-know-about-vehicle-inspections-all-50-states
Requirements & Dependencies
PHP 7+
amattu2/state-inspection-lookup 适用场景与选型建议
amattu2/state-inspection-lookup 是一款 基于 PHP 开发的 Composer 扩展包,目前已累计 14 次下载、GitHub Stars 达 1, 最近一次更新时间为 2023 年 03 月 12 日, 在 PHP 生态内属于活跃度较高的组件。
我们在过去多个企业项目中使用过 amattu2/state-inspection-lookup 或与其功能相近的方案,如果你在选型或落地过程中遇到问题,例如 版本兼容、二次改造、私有化封装、与内部系统对接、生产 BUG 排查,欢迎联系我们协助评估。
基于 amattu2/state-inspection-lookup 在你已有业务上做功能扩展、字段裁剪、UI 适配、与内部账号 / 权限 / 日志系统的深度对接。
线上偶发问题、内存泄漏、慢查询、并发异常等排查修复;针对高流量场景做缓存、队列、索引层面的调优。
承接完整的项目从需求 → 设计 → 开发 → 上线 → 长期运维;也可按月提供技术保姆服务。
统计信息
- 总下载量: 14
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 1
- 点击次数: 15
- 依赖项目数: 0
- 推荐数: 0
其他信息
- 授权协议: AGPL-3.0
- 更新时间: 2023-03-12