定制 xgerhard/wom-php 二次开发

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

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

xgerhard/wom-php

最新稳定版本:v1.0.8

Composer 安装命令:

composer require xgerhard/wom-php

包简介

PHP wrapper for the Wise Old Man API

README 文档

README

wom-php is a PHP wrapper for the Wise Old Man API.
Wise Old Man is an open source Old School RuneScape player progress tracker: wiseoldman.net.

Work in Progress

⚠️ This package is still in development, but is stable and ready to use.

Found a bug or want to request a feature? Open an issue.

Usage

composer require xgerhard/wom-php
use WOM\Client;

$client = new Client();
$player = $client->players->get('zezima');

echo $player->displayName; // Zezima

All model properties are directly accessible via object-style access:

$level = $player->latestSnapshot->data->skills->overall->level;

Models also include helpful formatting methods for display:

echo $boss->formatMetric(); // Chambers Of Xeric
echo $boss->formatRank(); // 13.37k
echo $skill->formatExperience(); // 13.03m

More helper methods will be added in future releases — including support for custom formatting.

Documentation & Examples

See docs/examples.md for usage examples.

Supported Endpoints

Endpoint Status
Players ✅ Implemented
Groups ✅ Implemented
Competitions ✅ Implemented
Records ✅ Implemented
Deltas ✅ Implemented
Name Changes ✅ Implemented
Efficiency ✅ Implemented

Contributing

Feel free to explore, contribute, or play around with this wrapper.

To set up a local development environment for the package, follow these steps:

  1. Clone the repository:
git clone https://github.com/xgerhard/wom-php.git
  1. Create a new folder for your test project, and add a composer.json file pointing to your local clone:
{
  "repositories": [
    {
      "type": "path",
      "url": "../path/to/local/wom-php",
      "options": {
        "symlink": true
      }
    }
  ],
  "require": {
    "xgerhard/wom-php": "dev-main"
  }
}
  1. Install the local package:
composer require xgerhard/wom-php:dev-main
  1. Your project will now use your local wom-php version and any changes you make will be reflected immediately.

Running Tests

To run the test suite:

  1. From your cloned wom-php folder, install dependencies:
composer install
  1. Then run the tests:
php vendor/bin/phpunit

Or run a specific test: php vendor/bin/phpunit --filter testCanFetchPlayerDetails

Feel free to add tests when contributing new features or fixes!

License

wom-php is licensed under the MIT License.

统计信息

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

GitHub 信息

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

其他信息

  • 授权协议: MIT
  • 更新时间: 2025-04-16

承接程序开发

PHP开发

VUE

Vue开发

前端开发

小程序开发

公众号开发

系统定制

数据库设计

云部署

网站建设

安全加固