定制 almostengr/cakephp-nwsapi 二次开发

按需修改功能、优化性能、对接业务系统,提供一站式技术支持

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

almostengr/cakephp-nwsapi

最新稳定版本:2024.07.26

Composer 安装命令:

composer require almostengr/cakephp-nwsapi

包简介

National Weather Service API plugin for CakePHP

README 文档

README

Interact with the National Weather Service API using CakePHP Plugin

Methods that are available are based on the routes listed on the National Weather Service website at https://www.weather.gov/documentation/services-web-api#/.

Contents

Installation

You can install this plugin into your CakePHP application using composer.

The recommended way to install composer packages is:

composer require almostengr/national-weather-service-api

Usage

This plugin is to be used like any other component within CakePHP.

In your Controller class, add the code below. If you do not already have an initialize() method in your controller class, you may copy and paste the code below as it is written.

public function initialize(): void
{
    parent::initialize();

    $this->loadComponenent("NwsApi");
}

Inside of your controller method, you will call one of the endpoints like the below.

$this->NwsApi->getAlertTypes();

Overriding Default Configuration

This plugin has default values for the API URL and the timeout. To override the defaults, add an entry to your app_local.php file.

[
    "NwsApi":
    {
        "url": "api.weather.gov",
        "timeout": 30,
    }
]

Report Issues or Feature Requests

Issues and feature requests should be submitted to the project issue tracker at https://github.com/almostengr/cakephp-nws-api.

Upcoming features and functionality are also listed on the project issue tracker.

Version Numbering

The version number for this plugin is in the following format. Using the example of

5.2024.07.26

"5" represents the major CakePHP version number that the plugin is designed for

"2024.07.26" represents the date, in YYYY-MM-DD format, that the release was created

统计信息

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

GitHub 信息

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

其他信息

  • 授权协议: MIT
  • 更新时间: 2024-10-18