PHP code example of hristonev / sportmonks-client-bundle
1. Go to this page and download the library: Download hristonev/sportmonks-client-bundle library. Choose the download type require.
2. Extract the ZIP file and open the index.php.
3. Add this code to the index.php.
<?php
require_once('vendor/autoload.php');
/* Start to develop here. Best regards https://php-download.com/ */
hristonev / sportmonks-client-bundle example snippets
php
// Bootstrap
API\HTTPClient as SportMonksAPI;
use SportMonks\API\Utilities\Auth;
// Default values. Can be initialized without arguments.
$scheme = 'https';
$hostname = 'sportmonks.com';
$subDomain = 'soccer';
$port = 443;
// Auth.
$token = 'open sesame';
$client = new SportMonksAPI();
// or
//$client = new SportMonksAPI($scheme, $hostname, $subDomain, $port);
// Set auth.
$client->setAuth(Auth::BASIC, [
'token' => $token
]);