Download the PHP package zhaiyuxin/weather without Composer

On this page you can find all versions of the php package zhaiyuxin/weather. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.

FAQ

After the download, you have to make one include require_once('vendor/autoload.php');. After that you have to import the classes with use statements.

Example:
If you use only one package a project is not needed. But if you use more then one package, without a project it is not possible to import the classes with use statements.

In general, it is recommended to use always a project to download your libraries. In an application normally there is more than one library needed.
Some PHP packages are not free to download and because of that hosted in private repositories. In this case some credentials are needed to access such packages. Please use the auth.json textarea to insert credentials, if a package is coming from a private repository. You can look here for more information.

  • Some hosting areas are not accessible by a terminal or SSH. Then it is not possible to use Composer.
  • To use Composer is sometimes complicated. Especially for beginners.
  • Composer needs much resources. Sometimes they are not available on a simple webspace.
  • If you are using private repositories you don't need to share your credentials. You can set up everything on our site and then you provide a simple download link to your team member.
  • Simplify your Composer build process. Use our own command line tool to download the vendor folder as binary. This makes your build process faster and you don't need to expose your credentials for private repositories.
Please rate this library. Is it a good library?

Informations about the package weather

Weather - 高德天气 API 组件

Latest Version on Packagist Total Downloads on Packagist Build Status Code Coverage

一个基于高德开放平台 API 的 PHP 天气信息组件,支持 Laravel 框架,提供简单易用的天气查询功能。


✨ 特性

📋 系统要求

🚀 安装

通过 Composer 安装

⚙️ 配置

1. 获取高德开放平台 API Key

首先,你需要在 高德开放平台 注册账号并创建应用,获取 API Key。

2. 环境变量配置

在 .env 文件中添加:

3. 配置文件

配置文件位于 config/services.php:

📖 使用方法

基本用法

1. 直接实例化

2. Laravel 中使用

3. 使用 Facade (Laravel)

API 参数说明

getWeather($city, $type, $format)

参数 类型 必填 默认值 说明
$city string 是 - 城市名称或编码
$type string 否 live 天气类型:live(实况天气) 或 forecast(预报天气)
$format string 否 json 响应格式:json 或 xml

响应格式

JSON 格式 (默认)

XML 格式

高级配置

自定义 Guzzle 选项

🧪 测试

运行测试套件:

📝 异常处理

组件提供了完善的异常处理机制:

异常类型

🔧 开发

克隆项目

运行测试

代码风格检查

🤝 贡献

我们欢迎所有形式的贡献!请查看我们的 贡献指南。

贡献方式

  1. 🐛 报告 Bug
  2. 💡 提出新功能建议
  3. 📝 改进文档
  4. 🔧 提交代码修复
  5. ⭐ 给项目点星

开发流程

  1. Fork 项目
  2. 创建功能分支 (git checkout -b feature/xxx)
  3. 提交更改 (git commit -m 'Add some feature')
  4. 推送到分支 (git push origin feature/xxx)
  5. 创建 Pull Request

📄 许可证

本项目基于 MIT 许可证 开源。

🙏 致谢

📞 支持

如果你在使用过程中遇到问题,可以通过以下方式获取帮助:

⭐ 支持项目

如果这个项目对你有帮助,请给我们一个 ⭐️!


Made with ❤️ by YuXin Zhai


All versions of weather with dependencies

PHP Build Version
Package Version
Requires guzzlehttp/guzzle Version ^7.9
Composer command for our command line client (download client) This client runs in each environment. You don't need a specific PHP version etc. The first 20 API calls are free. Standard composer command

The package zhaiyuxin/weather contains the following files

Loading the files please wait ...