PHP code example of mrgla55 / tabapi

1. Go to this page and download the library: Download mrgla55/tabapi 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/ */

    

mrgla55 / tabapi example snippets


"mrgla55/tabapi": "0.*"

mrgla55\Tabapi\Providers\Laravel\TabapiServiceProvider::class
'Tabapi' => mrgla55\Tabapi\Providers\Laravel\Facades\Tabapi::class

class_alias('mrgla55\Tabapi\Providers\Laravel\Facades\Tabapi', 'Tabapi');
$app->register(mrgla55\Tabapi\Providers\Lumen\TabapiServiceProvider::class);
$app->configure('Tabapi');
$app->withFacades();

Route::get('/versions', function()
{
    return Tabapi::versions();
});

Tabapi::resources();

Array
(
    [account:authenticate] => https://webapi.tab.com.au/v1/account-service/tab/authenticate
    [account:balance] => https://webapi.tab.com.au/v1/account-service/tab/accounts/{accountNumber}/balance
	...
)

Tabapi::lookup_countries_allowed();

Tabapi::info_sports(['jurisdiction' => 'nsw']);

Tabapi::custom('/myEndpoint');

Tabapi::custom('https://api.beta.tab.com.au/v1/tab-info-service/racing/dates/2018-11-06/meetings/R/Racing%20-%20Futures/races/Melbourne%20Cup%20(All%20In)', [
		'parameters' => ['jurisdiction' => 'VIC', 'fixedOdds' => 'true']
	]);
bash
php artisan vendor:publish