承接 destcable/weather-php 相关项目开发

从需求分析到上线部署,全程专人跟进,保证项目质量与交付效率

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

destcable/weather-php

最新稳定版本:v1.1.6

Composer 安装命令:

composer require destcable/weather-php

包简介

WeatherPHP: Powerful library for integrating weather data. Get up-to-date weather information with ease, query a variety of weather sources, and integrate forecasts and weather data into your web applications with minimal effort.

README 文档

README

Usage

To work with the library, you need to register on the https://openweathermap.org platform, after which you will receive an authorization key (it is free), and insert this key during initialization as shown in the example.

use WeatherPHP\Weather;

$weather = new Weather( apiKey: 'you_api_key');

$weather->language = 'ru';

$weather->find(
    city: 'San Francisco'
);

$weather->getTemperature();

Getting the weather in time difference, the maximum amount in days that can be obtained +5 from the current date.

use WeatherPHP\Weather;

$weather = new Weather( apiKey: 'you_api_key');

$weather->getDaysTemperature(
    city: 'Москва', 
    days: 5
);

Planning an event and up to 5 days, if the event is large for 5 days (an error will occur, because at the moment working with the scheduler for more than 5 days is not provided).

use WeatherPHP\Weather;

$event = new Event( 
    name: 'Playing football with friends', 
    city: 'Moscow', 
    date: '2023-08-30 12:00', 
    expectedWeather: 'Sunny'
);

统计信息

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

GitHub 信息

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

其他信息

  • 授权协议: MIT
  • 更新时间: 2023-08-24

承接程序开发

PHP开发

VUE

Vue开发

前端开发

小程序开发

公众号开发

系统定制

数据库设计

云部署

网站建设

安全加固