filipsedivy / kontrola-tachometru
🚘 MDČR - kontrola tachometru
Fund package maintenance!
Patreon
filipsedivy.cz/donation?to=TachometerCheck
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-12-14 14:42:31 UTC
README
Install it using Composer:
composer require filipsedivy/tachometer-check
Usage
<?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');