Skip to content
Permalink
Browse files

Merge pull request #314 from msurguy/add-twitch

Adding twitch provider
  • Loading branch information...
oscarotero committed Apr 18, 2019
2 parents 31c2146 + b6bc91a commit bc80c5da565ae1576aa4bd909949ca15e92badfb
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 bc80c5d

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