Appearance
HasAnalyticsMethods
php
trait Zairakai\LaravelTwitch\Services\Concerns\HasAnalyticsMethodsTwitch Analytics API methods.
Source: src/Services/Concerns/HasAnalyticsMethods.php
Methods
getExtensionAnalytics()
php
public function getExtensionAnalytics(string $extensionId = null, string $type = 'overview_v2', string $startedAt = null, string $endedAt = null, int $first = 20, string $after = null): PaginatedResultGet analytics data for one or more extensions.
| Parameter | Description |
|---|---|
$type | overview_v2 (default) |
$startedAt | RFC3339 start date (optional, must pair with endedAt) |
$endedAt | RFC3339 end date (optional, must pair with startedAt) |
Returns PaginatedResult<ExtensionAnalytics>
getGameAnalytics()
php
public function getGameAnalytics(string $gameId = null, string $type = 'overview_v2', string $startedAt = null, string $endedAt = null, int $first = 20, string $after = null): PaginatedResultGet analytics data for one or more games.
| Parameter | Description |
|---|---|
$type | overview_v2 (default) |
$startedAt | RFC3339 start date (optional, must pair with endedAt) |
$endedAt | RFC3339 end date (optional, must pair with startedAt) |
Returns PaginatedResult<GameAnalytics>