Skip to content

Commit 4f5a6d9

Browse files
committed
Add in updated Raid EventSub updates
1 parent 0d6ddb0 commit 4f5a6d9

3 files changed

Lines changed: 23 additions & 4 deletions

File tree

README.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,7 @@
1+
# Forked by radiojoe
2+
3+
This is a forked version of https://github.com/nicklaw5/twitch-api-php
4+
15
# Twitch API PHP Library
26

37
![Packagist Version](https://img.shields.io/packagist/v/nicklaw5/twitch-api-php)

composer.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
{
2-
"name": "nicklaw5/twitch-api-php",
2+
"name": "radiojoe/twitch-api-php",
33
"type": "library",
44
"description": "A Twitch API client for PHP.",
55
"keywords": [
@@ -9,7 +9,7 @@
99
"twitch-api",
1010
"api"
1111
],
12-
"homepage": "http://github.com/nicklaw5/twitch-api-php",
12+
"homepage": "http://github.com/radiojoe/twitch-api-php",
1313
"license": "MIT",
1414
"authors": [
1515
{

src/Resources/EventSubApi.php

Lines changed: 17 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -186,15 +186,30 @@ public function subscribeToChannelCheer(string $bearer, string $secret, string $
186186
/**
187187
* @link https://dev.twitch.tv/docs/eventsub/eventsub-subscription-types#channelraid
188188
*/
189-
public function subscribeToChannelRaid(string $bearer, string $secret, string $callback, string $twitchId): ResponseInterface
189+
public function subscribeToChannelRaidIn(string $bearer, string $secret, string $callback, string $twitchId): ResponseInterface
190190
{
191191
return $this->createEventSubSubscription(
192192
$bearer,
193193
$secret,
194194
$callback,
195195
'channel.raid',
196196
'1',
197-
['broadcaster_user_id' => $twitchId],
197+
['to_broadcaster_user_id' => $twitchId],
198+
);
199+
}
200+
201+
/**
202+
* @link https://dev.twitch.tv/docs/eventsub/eventsub-subscription-types#channelraid
203+
*/
204+
public function subscribeToChannelRaidsOut(string $bearer, string $secret, string $callback, string $twitchId): ResponseInterface
205+
{
206+
return $this->createEventSubSubscription(
207+
$bearer,
208+
$secret,
209+
$callback,
210+
'channel.raid',
211+
'1',
212+
['from_broadcaster_user_id' => $twitchId],
198213
);
199214
}
200215

0 commit comments

Comments
 (0)