Skip to content

HasGameMethods ​

php
trait Zairakai\LaravelTwitch\Services\Concerns\HasGameMethods

Twitch 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): DataCollection

Get games or categories by ID or name.

ParameterDescription
$idsGame ID(s)
$namesGame name(s)

Returns DataCollection<int, Game>

getTopGames() ​

php
public function getTopGames(int $first = 20, string $after = null): PaginatedResult

Get the top viewed games on Twitch.

Returns PaginatedResult<Game>

searchCategories() ​

php
public function searchCategories(string $query, int $first = 20, string $after = null): PaginatedResult

Search for categories (games).

Returns PaginatedResult<Game>

Documentation of 4.1.4 , built from a03e949 on 4.1.4 by pipeline #2949087255 on 2026-10-11.