DEPRECATION WARNING

This documentation is not using the current rendering mechanism and is probably outdated. The extension maintainer should switch to the new system. Details on how to use the rendering mechanism can be found here.

Developer Manual

Usage

Get an instance of the service and the actual API class:

/** @var \RauchF\OpenweathermapPhpApiService\Service\OpenweathermapPhpApiService $owmService */
$owmService = \TYPO3\CMS\Core\Utility\GeneralUtility::makeInstanceService('openweathermap_php_api');
$owmApi = $owmService->getOpenweathermapPhpApi();

Now you can use any API method:

$weatherData = $owmApi->getRawWeatherData(
    $query,
    'metric',
    'en',
    $owmService->getApiKey(),
    'json'
);