定制 iceq1337/steam-inventory-api 二次开发

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

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

iceq1337/steam-inventory-api

Composer 安装命令:

composer require iceq1337/steam-inventory-api

包简介

PHP library to fetch items from the Steam inventory

README 文档

README

Latest Stable Version Total Downloads PHP Version Require License

This library provides an easy way to access the public Steam Inventory API (https://steamcommunity.com/inventory/) from your PHP code. It provides a simple interface to retrieve a Steam user's inventory from the API with information about the items in it.

Using this API does not require an API key, but as it is not part of the Steam Web API, the rate limit of 100,000 requests per day does not apply. Instead, the rate limit for this API is extremely low. So use this API or rather this library with caution.

While using this API is generally discouraged, it has been part of Steam since forever and despite or perhaps because its rework in 2016, it is probably here to stay.

The library is designed to be easily extendable by other developers. It should be well documented and includes a comprehensive test suite.

Requirements

  • PHP >= 8.1

This library supports all officially and actively supported PHP versions.

See the composer.json for other requirements.

Installation

composer require iceq1337/php-steam-inventory

Usage

use SteamInventory\Inventory;

$options = [
    'steamid' => '76561198129782984',
    'appid' => 753, // default: 753
    'contextid' => 6, // default: 6
    'language' => 'english', // default: 'english'
    'all_items' => false, // default: false
    'count' => 100, // default: 500, max: 5000
    'start_assetid' => null, // default: null, used for consecutive requests
];

$inventory = new Inventory($options);
$items = $inventory->getItems();
$total = $inventory->total_inventory_count;

foreach ($items as $item) {
    echo $item->getName() . "<br>";
}

Contributing

There are currently no contributing guidelines. In order to contribute to the project, please follow the GitHub Standard Fork & Pull Request Workflow.

  • Fork this repository on GitHub.
  • Clone the project to your own machine.
  • Commit changes to your own branch.
  • Push your work to your own fork.
  • Submit a Pull Request so I can review your changes

Please make sure you always run the tests and apply the code style before submitting your pull request. All tests and the code style workflow must pass in order for the pull request to be approved and merged.

composer run test
composer run lint

License

This library is licensed under the MIT license.

Credits

Parts of this library are based on PHP Steam Inventory published by matthewlilley in 2018.

统计信息

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

GitHub 信息

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

其他信息

  • 授权协议: MIT
  • 更新时间: 2022-06-22

承接程序开发

PHP开发

VUE

Vue开发

前端开发

小程序开发

公众号开发

系统定制

数据库设计

云部署

网站建设

安全加固