Appearance
HasGameMethods
php
trait Zairakai\LaravelTwitch\Services\Concerns\HasGameMethodsTwitch Games & Categories API methods.
Source: src/Services/Concerns/HasGameMethods.php
Methods
getGames()
php
public function getGames(string|array|null $ids = null, string|array|null $names = null): DataCollectionGet games or categories by ID or name.
| Parameter | Description |
|---|---|
$ids | Game ID(s) |
$names | Game name(s) |
Returns DataCollection<int, Game>
getTopGames()
php
public function getTopGames(int $first = 20, string $after = null): PaginatedResultGet the top viewed games on Twitch.
Returns PaginatedResult<Game>
searchCategories()
php
public function searchCategories(string $query, int $first = 20, string $after = null): PaginatedResultSearch for categories (games).
Returns PaginatedResult<Game>