| 123456789101112131415161718192021222324 |
- <?php
- namespace Heanup\Library\WeatherAdapt;
- class weatherdtAdapter implements Weather
- {
- public function __construct()
- {
- }
- public function getWeatherData($city_id)
- {
- $data = file_get_contents(sprintf("https://apip.weatherdt.com/plugin/data?key=j3fsWopid0&location=%s", $city_id));
- return json_decode($data, true);
- }
- public function parseData($data1,$data2)
- {
- // TODO: 需要实现 parseData() 方法.
- }
- }
|