Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/evilfreelancer/steam-api-client
The SteamAPI PHP Client is a PHP library for interacting with the Steam API. It provides an easy way to fetch data from the Steam platform, such as user profiles, games, and reviews.
https://github.com/evilfreelancer/steam-api-client
http-client psr-4 steam
Last synced: about 1 month ago
JSON representation
The SteamAPI PHP Client is a PHP library for interacting with the Steam API. It provides an easy way to fetch data from the Steam platform, such as user profiles, games, and reviews.
- Host: GitHub
- URL: https://github.com/evilfreelancer/steam-api-client
- Owner: EvilFreelancer
- License: mit
- Created: 2023-04-30T17:34:20.000Z (over 1 year ago)
- Default Branch: main
- Last Pushed: 2023-04-30T17:37:59.000Z (over 1 year ago)
- Last Synced: 2024-10-29T20:07:55.945Z (3 months ago)
- Topics: http-client, psr-4, steam
- Language: PHP
- Homepage:
- Size: 5.86 KB
- Stars: 1
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# SteamAPI PHP client
> Note: This library is still under development and not yet production-ready.
The SteamAPI PHP Client is a PHP library for interacting with the Steam API.
It provides an easy way to fetch data from the Steam platform, such as user
profiles, games, and reviews.## Installation
To install the SteamAPI PHP Client, simply use Composer:
```shell
composer require evilfreelancer/steam-api-client
```## Usage
### Configuration
First, you need to create a Config object with your desired configuration:
```php
use SteamApi\Config;$config = new Config();
$config->storeUri = 'https://store.steampowered.com';
$config->retries = 5;
$config->retryTimeoutMs = 1000;
```Next, create an instance of the HttpClient class and pass your Config object:
```php
use SteamApi\HttpClient;$httpClient = new HttpClient($config);
```### Getting Curator Reviews
To get reviews for a specific curator, you can use the Curator class:
```php
// Replace with a valid curator ID
$curatorId = 31790204; // Games-4-Programmers
$curator = $httpClient->store->curator($curatorId);// Get the total number of reviews for the curator
$totalCount = $curator->getTotalCount();// Get a limited number of reviews (default: last 10 reviews)
$reviews = $curator->getReviews();// Get all available reviews
$allReviews = $curator->allReviews();
```## License
This library is released under the MIT License. See the [LICENSE](./LICENSE) file for details.