PHP code example of christohill / cfl-api-php

1. Go to this page and download the library: Download christohill/cfl-api-php 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/ */

    

christohill / cfl-api-php example snippets


use CFLPHP\Teams\Teams;
$teams = new Teams();
$teams->setKey('edf59be9216e66eb17093574376d4c5f');
$data = $teams->getTeams();

$teams = new Teams();
$teams->setKey('edf59be9216e66eb17093574376d4c5f');

$config = array(
    ',
    'filter' => array(),
    'pagination' => array()
);

$teams = new Games();
$data = $teams->getGames(2015, $config);

$config = array(
    '       'rosters'
    )
);

$config = array(
    'sort' => array(
        'height',
        '-weight'
    )
);

$config = array(
    'filter' => array(
        "team_2 == TOR",
        "team_1 == HAM"
    )
);

'==' => 'eq'
'!=' => 'ne'
'>' => 'gt'
'<' => 'lt'
'>=' => 'ge'
'<=' => 'le'
'in' => 'in'

$config = array(
    'pagination' => array(
        'number' => 2,
        'size' => 15
    )
);