Skip to content

HasAdsMethods ​

php
trait Zairakai\LaravelTwitch\Services\Concerns\HasAdsMethods

Twitch Ads API methods.

Source: src/Services/Concerns/HasAdsMethods.php

Methods ​

getAdSchedule() ​

php
public function getAdSchedule(string $broadcasterId): AdSchedule

Get ad schedule information for a broadcaster's channel.

snoozeNextAd() ​

php
public function snoozeNextAd(string $broadcasterId): AdSnooze

Snooze the next scheduled ad for 5 minutes.

startCommercial() ​

php
public function startCommercial(string $broadcasterId, int $length): CommercialResult

Start a commercial on a specified channel.

ParameterDescription
$lengthDuration of the commercial in seconds (30, 60, 90, 120, 150, or 180)

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