This package is a Laravel/PHP wrapper for the OSRS API, to easily interact with the Grand Exchange and Hiscore APIs.
You can install the package via composer:
composer require ge-tracker/osrs-api
If you wish to publish the package's configuration, you can run the following command:
php artisan vendor:publish --provider="GeTracker\OsrsApi\OsrsApiServiceProvider"
We recommend using this package via dependency injection in your methods, as this is a cleaner interface than a facade.
public function execute(OsrsApi $osrsApi)
{
$item = $osrsApi->ge()->itemDetail(13576);
echo $item->id . ': ' . $item->name;
}
All requests to the hiscores are cached for 60 seconds by default.
public function execute(OsrsApi $osrsApi)
{
$hiscores = $osrsApi->hiscores()->fetch('Lynx Titan');
echo 'Attack: ' . $hiscores->stats->attack->level;
}
composer test
Please see CHANGELOG for more information what has changed recently.
Please see CONTRIBUTING for details.
If you discover any security related issues, please email [email protected] instead of using the issue tracker.
The MIT License (MIT). Please see License File for more information.
This package was generated using the Laravel Package Boilerplate.