kilmer/weather-client 问题修复 & 功能扩展

解决BUG、新增功能、兼容多环境部署,快速响应你的开发需求

邮箱:yvsm@zunyunkeji.com | QQ:316430983 | 微信:yvsm316

kilmer/weather-client

Composer 安装命令:

composer require kilmer/weather-client

包简介

A reusable PHP package for retrieving weather data from OpenWeather API

README 文档

README

WeatherClient is a reusable PHP Composer package for retrieving weather data from the OpenWeather API.

Features

  • Fetch current weather data for Ndola City
  • Basic output of weather information
  • Built on top of Guzzle HTTP client

Requirements

  • PHP 7.4 or higher
  • Composer
  • CodeIgniter 4

Installation

Install via Composer(recommended):

  • composer require kilmer/weather-client

Usage

<?php
use Kalam\WeatherClient\WeatherClient;

$apiKey = 'YOUR_OPENWEATHER_API_KEY';
$client = new WeatherClient($apiKey);

$weather = $client->getCurrentWeather('London');
print_r($weather);

Get your API key from here

https://openweathermap.org/api

Results

  • once everything is set, run your CI4 project and navigate to localhost:8080/weather

Example usage in CI4

clone this repo https://github.com/BwalyaMK/WhatsTheWeather.git

统计信息

  • 总下载量: 0
  • 月度下载量: 0
  • 日度下载量: 0
  • 收藏数: 0
  • 点击次数: 0
  • 依赖项目数: 0
  • 推荐数: 0

GitHub 信息

  • Stars: 0
  • Watchers: 0
  • Forks: 0
  • 开发语言: PHP

其他信息

  • 授权协议: MIT
  • 更新时间: 2025-08-18