<?php
/* EXAMPLE */
$weather = new Feedee('weather');
$weather->setPartnerId('9999999999');
$weather->setLicenseKey('x999999x99xxxx9x');
$weather->setLocationId('BRXX0201');
$weather->setForecast(2);
$response = $weather->getService()->request();
$response->location_name;
$response->temperature; //current temperature
foreach ($response->forecasts as $forecast)
{
$forecast->hi;
$forecast->low;
}
/* CONFIGS */
setPartnerId(); // required
setLicenseKey(); // required
setLocationId(); // required
setForecast(); // optional
/* ATTRIBUTES */
$response = $weather->getService()->request(); // Get the response from the server
$response->location_name; // Location name
$response->temperature; // Current temperature
$response->forecasts; // Forecast Days, only if setForecast() is set.
$forecast->hi;
$forecast->low;
$forecast->dayIcon;
$forecast->nightIcon;
|