ocolin/wisdm
Composer 安装命令:
composer require ocolin/wisdm
包简介
REST Client for WISDM Wireless API
README 文档
README
What is it?
This is a PHP REST client for the WISDM API interface. WISDM is a service for wireless ISPs that provide the ability to determine which areas are serviceable from a wireless access point.
Table of Contents
Requirements
- ^PHP 8.2
- guzzlehttp/guzzle ^7.10
- ocolin/global-type ^2.0
Installation
composer require ocolin/wisdm
Configuration
Wisdm requires two pieces of information. The server hostname, and your authentication token/key. These can be configured via environment or though constructor arguments using a Config data object.
| Environment name | Constructor argument | Type | Description |
|---|---|---|---|
| WISDM_API_HOST | $host | string | Server hostname |
| WISDM_API_KEY | $token | string | Authentication key/token |
Instantiation with environment variables
// Manual variables for demonstration $_ENV['WISDM_API_HOST'] = 'https://wisdm.wirelesscoverage.com/api'; $_ENV['WISDM_API_KEY'] = 'abcdefg'; $wisdm = new Ocolin\Wisdm\Wisdm();
Instantiation with constructor arguments
$wisdm = new Ocolin\Wisdm\Wisdm( config: new Ocolin\Wisdm\Config( host: 'https://wisdm.wirelesscoverage.com/api', token: 'abcdefg' ); );
Optional arguments
You can also pass along Guzzle HTTP configuration options such as HTTP timeouts, verification of SSL, etc different from the defaults.
// Manual variables for demonstration $_ENV['WISDM_API_HOST'] = 'https://wisdm.wirelesscoverage.com/api'; $_ENV['WISDM_API_KEY'] = 'abcdefg'; $wisdm = new Ocolin\Wisdm\Wisdm( config: new Ocolin\Wisdm\Config( options: [ 'timeout' => 60 ] ) );
Response
The client responds with an object containing the following properties:
| Name | Type | Description |
|---|---|---|
| status | integer | HTTP status code |
| statusMessage | string | HTTP status message |
| headers | array | HTTP response headers |
| contentType | string | HTTP body content type |
| body | object|array | API payload body |
Path Parameter Interpolation
Any elements or properties of a $query argument that match variable tokens in the URI endpoint path will be replaced with the values for those elements in the $query array or object. Please see some of the method functions for examples.
Methods
GET
Get a resource from the API.
$output = $wisdm->get( endpoint: '/availability/{id}/check', query: [ 'id' => 1234 ] );
POST
Create a resource on the API.
$output = $wisdm->post( endpoint: '/networks', body: [ 'name' => 'MySiteName', 'color' => '#808080' ] );
PATCH
Update a resource on the API.
$output = $widnm->patch( endpoint: '/networks/{id}', query: [ 'id' => 1234 ], body: [ 'name' => 'MyNewSiteName' ] );
DELETE
Delete a resource on the API.
$output = $wisdm->delete( endpoint: '/networks/{id}', query: [ 'id' => 1234 ] );
REQUEST
In case changes are made to the API, a generic request function is available.
$output = $wisdm->request( endpoint: '/availability/{id}/check', method: 'GET', query: [ 'id' => 1234 ] );
UPLOAD
Several API calls use a multi-part request body for uploading files and data. The uploads() function can be used for those.
$output = $wisdm->upload( endpoint: '/networks/import-networks', filePath: __DIR__ . '/sites_template.csv', body: [ 'colour' => '#808080', 'site_name_field' => 'Site_Name' ] );
ocolin/wisdm 适用场景与选型建议
ocolin/wisdm 是一款 基于 PHP 开发的 Composer 扩展包,目前已累计 8 次下载、GitHub Stars 达 1, 最近一次更新时间为 2025 年 04 月 30 日, 在 PHP 生态内属于活跃度较高的组件。
它主要适用于以下技术方向: 「rest」 「api」 「wireless」 「wisp」 「wisdm」 等业务场景。在实际项目中,围绕这些方向常见需要落地的问题包括:接口对接、性能调优、并发安全、与既有框架(Laravel / ThinkPHP / Yii / Webman 等)的兼容适配,以及生产环境的日志埋点与稳定性保障。
我们在过去多个企业项目中使用过 ocolin/wisdm 或与其功能相近的方案,如果你在选型或落地过程中遇到问题,例如 版本兼容、二次改造、私有化封装、与内部系统对接、生产 BUG 排查,欢迎联系我们协助评估。
基于 ocolin/wisdm 在你已有业务上做功能扩展、字段裁剪、UI 适配、与内部账号 / 权限 / 日志系统的深度对接。
线上偶发问题、内存泄漏、慢查询、并发异常等排查修复;针对高流量场景做缓存、队列、索引层面的调优。
承接完整的项目从需求 → 设计 → 开发 → 上线 → 长期运维;也可按月提供技术保姆服务。
与 ocolin/wisdm 相关的其它包
同方向 / 同关键字的高下载量 PHP Composer 包推荐,方便对比选型:
A PSR-7 compatible library for making CRUD API endpoints
Api bundle
PHP client for SSL Wireless SMS API
A Flickr wrapper to allow you to call the Flickr api with Guzzle as the backend.Goal is to have 100% Flickr api coverage rather than just upload/display photos (currently at 23%).
PHP client for SSL Wireless Payment API
Library for NetBill360 Api Triggers. Use this to manage your ISP clients and network devices.
统计信息
- 总下载量: 8
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 1
- 点击次数: 15
- 依赖项目数: 0
- 推荐数: 0
其他信息
- 授权协议: MIT
- 更新时间: 2025-04-30