Skip to content
Permalink
Browse files

Adding twitch provider

  • Loading branch information...
msurguy committed Apr 18, 2019
1 parent 31c2146 commit b6bc91abfcc53817a2f5f2a7a363ddb563911a98
Showing with 29 additions and 0 deletions.
  1. +9 −0 src/Providers/OEmbed/Twitch.php
  2. +20 −0 tests/TwitchTest.php
@@ -0,0 +1,9 @@
<?php
namespace Embed\Providers\OEmbed;
class Twitch extends EndPoint implements EndPointInterface
{
protected static $pattern = '*.twitch.tv/*';
protected static $endPoint = 'https://api.twitch.tv/v5/oembed';
}
@@ -0,0 +1,20 @@
<?php
namespace Embed\Tests;
class TwitchTest extends AbstractTestCase
{
public function testOne()
{
$this->assertEmbed(
'https://www.twitch.tv/videos/72749628',
[
'title' => 'EU LCS Summer - Week 3 Day 1: FNC vs. S04 | H2K vs. G2 (EULCS2)',
'type' => 'video',
'code' => '<iframe src="https://player.twitch.tv/?%21branding=&amp;autoplay=false&amp;video=v72749628" width="500" height="281" frameborder="0" scrolling="no" allowfullscreen></iframe>',
'providerName' => 'Twitch',
'providerUrl' => 'https://www.twitch.tv/',
]
);
}
}

0 comments on commit b6bc91a

Please sign in to comment.
You can’t perform that action at this time.