1. Go to this page and download the library: Download mickadoo/duolingo-events 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/ */
mickadoo / duolingo-events example snippets
use Mickadoo\DuolingoEvents\ApiFactory;
use Mickadoo\DuolingoEvents\Request\EventsRequest;
$api = ApiFactory::getEventsApi();
// Defaults to any language, events up to 3 days in future
$events = $api->getEvents(new EventsRequest());
use Mickadoo\DuolingoEvents\ApiFactory;
use Mickadoo\DuolingoEvents\Request\EventsRequest;
$api = ApiFactory::getEventsApi();
// Defaults to any language, events up to 3 days in future
$request = new EventsRequest();
$request->setLanguageCodes(['fr']);
$request->setEndRange(new DateTime('+2 weeks'));
$events = $api->getEvents($request);