PHP code example of astronati / sports-open-data-response-parser

1. Go to this page and download the library: Download astronati/sports-open-data-response-parser 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/ */

    

astronati / sports-open-data-response-parser example snippets


use SODRP\Response\ResponseParser;
...
// Obtain a Response
$apiResponse = ... // Save this the response from the Sports Open Data API
$response = ResponseParser::create($apiResponse, ResponseParser::GET_SEASONS_AVAILABLE);
...
// Get 2017-2018 season
$season = $response->findOneBySlug('17-18');
echo $season->getStartDate(); // 2017-07-01...