PHP code example of jeppevinkel / steam-search

1. Go to this page and download the library: Download jeppevinkel/steam-search library. Choose the download type require.

2. Extract the ZIP file and open the index.php.

3. Add this code to the index.php.
    
        
<?php
require_once('vendor/autoload.php');

/* Start to develop here. Best regards https://php-download.com/ */

    

jeppevinkel / steam-search example snippets


use SteamSearch\SteamSearch;

$steamSearch = new SteamSearch();
$queryBuilder = QueryBuilder::create()
    ->search('counter-strike')
    ->sortByReleaseDate();
$result = $steamSearch->search($queryBuilder);

// Results can also be filtered by max price.
$queryBuilder = QueryBuilder::create()
    ->search('counter-strike')
    ->sortByReleaseDate()
    ->maxPrice(50);
// Valid values for maxPrice are:
// 0, 5, 10, 15, 20, 25, 30, 35, 40, 45, 50, 55, 60
// To get all results, use maxPrice(-1), this is also the default value.

public string $title;
public int $appId;
public string $url;
public ?Carbon $releaseDate;
public string $reviewSummary;