public function searchGames($query)
    {
        if (!is_string($query)) {
            throw new InvalidTypeException('Query', 'string', gettype($query));
        }

        if (empty($query)) {
            throw new TwitchApiException('A \'query\' parameter is required.');
        }

        return $this->get('search/games', ['query' => $query]);
    }
public function searchGames($query)
    {
        if (!is_string($query)) {
            throw new InvalidTypeException('Query', 'string', gettype($query));
        }

        if (empty($query)) {
            throw new TwitchApiException('A \'query\' parameter is required.');
        }

        return $this->get('search/games', ['query' => $query]);
    }
public function searchGames ( $ query ) { if ( ! is_string ( $ query ) ) { throw new InvalidTypeException ( 'Query' , 'string' , gettype ( $ query ) ) ; } if ( empty ( $ query ) ) { throw new TwitchApiException ( 'A \'query\' parameter is required.' ) ; } return $ this -> get ( 'search/games' , [ 'query' => $ query ] ) ; }
Search for games by name

@param string $query
@throws InvalidTypeException
@throws TwitchApiException
@return array|json
Search for games by name