Skip to content

Commit cdd5a09

Browse files
committed
added oembed for shoudio
1 parent e7b3688 commit cdd5a09

File tree

2 files changed

+33
-0
lines changed

2 files changed

+33
-0
lines changed

src/Providers/OEmbed/Shoudio.php

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
<?php
2+
namespace Embed\Providers\OEmbed;
3+
4+
class Shoudio extends OEmbedImplementation
5+
{
6+
/**
7+
* {@inheritdoc}
8+
*/
9+
public static function getEndPoint()
10+
{
11+
return 'http://shoudio.com/api/oembed';
12+
}
13+
14+
/**
15+
* {@inheritdoc}
16+
*/
17+
public static function getPatterns()
18+
{
19+
return ['https?://shoudio.com/*'];
20+
}
21+
}

tests/ShoudioTest.php

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
<?php
2+
class ShoudioTest extends PHPUnit_Framework_TestCase
3+
{
4+
public function testOne()
5+
{
6+
$info = Embed\Embed::create('https://shoudio.com/collection/1235/wendelbosroute.html');
7+
8+
$this->assertEquals($info->title, "Wendelbosroute");
9+
$this->assertEquals($info->type, 'link');
10+
$this->assertEquals($info->providerName, 'Shoudio, the location based audio platform');
11+
}
12+
}

0 commit comments

Comments
 (0)