- PHP >=7.0
composer require churakovmike/accuweather-clientor with composer.phar
php composer.phar require churakovmike/accuweather-clientInitialize api client in your code.
use ChurakovMike\Accuweather\Client\Client;
$client = new Client([
'apiKey' => 'your-api-key',
]);You can set your api key later:
use ChurakovMike\Accuweather\Client\Client;
$client = new Client();
$client->setApikey('your-api-key');- Current Conditions
$client->currentCondition()->get($countryCode, $language, $details);- Current Conditions for Top Cities
$client->getTopCitiesCondition()->get($group, $language);- Historical Current Conditions (past 24 hours)
$client->getHistorical()->get($countryCode, $language, $details);- GETHistorical Current Conditions (past 6 hours)
$client->getHistoricalPast()->get($countryCode, $language, $details);- 1 Day of Weather Alarms
$client->weatherAlarm()->get1day($countryCode, $language);- 10 Days of Weather Alarms
$client->weatherAlarm()->get10day($countryCode, $language);- GET15 Days of Weather Alarms
$client->weatherAlarm()->get15day($countryCode, $language);- GET5 Days of Weather Alarms
$client->weatherAlarm()->get5day($countryCode, $language);- Alerts by LocationKey
$client->alert()->get($countryCode, $language, $details);- GETRadar and Satellite Imagery
$client->imagery()->get($resolution, $countryCode, $language);- Active government-issued storms by basin ID and government ID
$client->tropical()->getActiveStormSpecify($basinID, $governmentId);- Active government-issued storms
$client->tropical()->getActiveStorm();- Search government-issued storms by year and basin ID
$client->tropical()->search($year, $basinId);- Search government-issued storms by year, basin ID, and government ID
$client->tropical()->extendedSearch($year, $basinId, $governmentId);- Active government-issued storms by basin ID
$client->tropical()->getStormByBasinId($basinId);- Positions for an individual government-issued storm
$client->tropical()->getStormPosition($year, $basinId, $governmentId, $details, $geometry, $includeLandmarks);- Current position for an individual government-issued storm
$client->tropical()->getStormCurrentPosition($year, $basinId, $governmentId, $details, $geometry, $includeLandmarks);- Government-issued forecasts
$client->tropical()->getGovernmentForecast($year, $basinId, $governmentId, $details, $geometry, $windowGeometry);- Tropical cyclone forecasts (deprecated)
$client->tropical()->getCycloneForecast($year, $basinId, $depressionId);- List all Languages - Returns metadata for all languages.
$client->translation()->getLanguages();- List of Available Translation Groups - Lists groups of phrases that are available for translation.
$client->translation()->getTranslationGroups();- List of Translations for a Specific Group - Returns all translated phrases for a specific group, in the desired language.
$client->translation()->getTranslationByGroup();