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.
Found a bug or want to request a feature? Open an issue.
composer require xgerhard/wom-php
use WOM\Client;
$client = new Client();
$player = $client->players->get('zezima');
echo $player->displayName; // ZezimaAll 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.03mMore helper methods will be added in future releases — including support for custom formatting.
See docs/examples.md for usage examples.
| Endpoint | Status |
|---|---|
| Players | ✅ Implemented |
| Groups | ✅ Implemented |
| Competitions | ✅ Implemented |
| Records | ✅ Implemented |
| Deltas | ✅ Implemented |
| Name Changes | ✅ Implemented |
| Efficiency | ✅ Implemented |
Feel free to explore, contribute, or play around with this wrapper.
To set up a local development environment for the package, follow these steps:
- Clone the repository:
git clone https://github.com/xgerhard/wom-php.git
- Create a new folder for your test project, and add a
composer.jsonfile pointing to your local clone:
{
"repositories": [
{
"type": "path",
"url": "../path/to/local/wom-php",
"options": {
"symlink": true
}
}
],
"require": {
"xgerhard/wom-php": "dev-main"
}
}
- Install the local package:
composer require xgerhard/wom-php:dev-main
- Your project will now use your local
wom-phpversion and any changes you make will be reflected immediately.
To run the test suite:
- From your cloned
wom-phpfolder, install dependencies:
composer install
- 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!
wom-php is licensed under the MIT License.