承接 ge-tracker/osrs-api 相关项目开发

从需求分析到上线部署,全程专人跟进,保证项目质量与交付效率

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

ge-tracker/osrs-api

最新稳定版本:v2.0.2

Composer 安装命令:

composer require ge-tracker/osrs-api

包简介

Interacts with the official OSRS API

README 文档

README

This package is a Laravel/PHP wrapper for the OSRS API, to easily interact with the Grand Exchange and Hiscore APIs.

Installation

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"

Usage

We recommend using this package via dependency injection in your methods, as this is a cleaner interface than a facade.

Accessing the Grand Exchange API

public function execute(OsrsApi $osrsApi)
{
    $item = $osrsApi->ge()->itemDetail(13576);
    echo $item->id . ': ' . $item->name;
}

Fetching hiscores

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;
}

Testing

composer test

Changelog

Please see CHANGELOG for more information what has changed recently.

Contributing

Please see CONTRIBUTING for details.

Security

If you discover any security related issues, please email james@ge-tracker.com instead of using the issue tracker.

Credits

License

The MIT License (MIT). Please see License File for more information.

Laravel Package Boilerplate

This package was generated using the Laravel Package Boilerplate.

统计信息

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

GitHub 信息

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

其他信息

  • 授权协议: MIT
  • 更新时间: 2020-05-01