filipsedivy / kontrola-tachometru
🚘 MDČR - 检查转速表
0.1.0
2019-08-14 02:29 UTC
Requires
- php: ^7.1
- doctrine/collections: ^1.5
- fabpot/goutte: ^3.2
- google/cloud: ^0.107.1
- guzzlehttp/guzzle: ^6.3
This package is auto-updated.
Last update: 2024-09-14 13:58:38 UTC
README
使用Composer安装它
composer require filipsedivy/tachometer-check
用法
<?php $guzzle = new \GuzzleHttp\Client(); $goutte = new \Goutte\Client(); // OCR service // 2Captcha.com $ocr = new \MDCR\TachometerCheck\Adapter\OCR\TwoCaptcha('API KEY', $guzzle); // ---- OR // Google Vision putenv('GOOGLE_APPLICATION_CREDENTIALS=' . __DIR__ . '/google_credentials.json'); $imageAnnotatorClient = new \Google\Cloud\Vision\V1\ImageAnnotatorClient(); $ocr = new \MDCR\TachometerCheck\Adapter\OCR\GoogleVision($imageAnnotatorClient); // Add OCR to crawler $crawler = new \MDCR\TachometerCheck\Adapter\Crawler\Crawler($ocr, $goutte); // Load tachometer check $tachometerCheck = new \MDCR\TachometerCheck\TachometerCheck($crawler); $histories = $check->getHistory('VIN CODE');