destyk / escore-api-php
This package is abandoned and no longer maintained.
No replacement package was suggested.
Unofficial API for ESCore.gg
1.0.0
2022-07-15 18:18 UTC
Requires
- php: >=7.0.1
- php-curl-class/php-curl-class: ^8.10
README
Unofficial API for escore.gg written on PHP
🔑 Library installation
You can install this library using composer:
composer require destyk/escore-api-php
📝 Using this library
require('vendor/autoload.php'); use DestyK\EScore\Signature; use DestyK\EScore\API; use DestyK\EScore\RequestException; try { $signature = new Signature(); $api = new API($signature); // There will be an array with data about ALL UPCOMING matches $response = $api->getUpcoming(); ... // There will be an array with data about CSGO UPCOMING matches $response = $api->getUpcoming([ 'gameType' => 3 ]); } catch(RequestException $e) { echo $e->getMessage(); }
📂 Available Methods
📌 Method $api->getUpcoming(array $body, array $query)
Returns a list of upcoming matches:
... // There will be an array with data about ALL UPCOMING matches $response = $api->getUpcoming(); // There will be an array with data about CSGO UPCOMING matches $response = $api->getUpcoming([ 'gameType' => 3 ]);
Returns an object of class \DestyK\EScore\RequestException
on error.
📌 Method $api->getLive(array $body, array $query)
Returns a list of matches that have already started:
... // There will be an array with data about ALL LIVE matches $response = $api->getLive(); // There will be an array with data about DOTA 2 LIVE matches $response = $api->getLive([ 'gameType' => 4 ]);
Returns an object of class \DestyK\EScore\RequestException
on error.
📌 Method $api->getFinished(array $body, array $query)
Returns a list of matches that have already started:
... // There will be an array with data about ALL FINISHED matches $response = $api->getFinished(); // There will be an array with data about LOL FINISHED matches $response = $api->getFinished([ 'gameType' => 1 ]);
Returns an object of class \DestyK\EScore\RequestException
on error.
📂 Games id's
ALL - 0
CS:GO - 3
Dota 2 - 4
LOL - 1