Skip to content

Commit fdf2039

Browse files
authored
Merge pull request #365 from albertboada/feat/v3.x/mixcloud-oembed
(v3) Mixcloud OEmbed Provider
2 parents 2c73fb7 + 4b196b7 commit fdf2039

File tree

2 files changed

+30
-0
lines changed

2 files changed

+30
-0
lines changed

src/Providers/OEmbed/Mixcloud.php

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
<?php
2+
3+
namespace Embed\Providers\OEmbed;
4+
5+
class Mixcloud extends EndPoint implements EndPointInterface
6+
{
7+
protected static $pattern = 'www.mixcloud.com/*/';
8+
protected static $endPoint = 'https://www.mixcloud.com/oembed/';
9+
}

tests/MixcloudTest.php

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
<?php
2+
3+
namespace Embed\Tests;
4+
5+
class MixcloudTest extends AbstractTestCase
6+
{
7+
public function testOne()
8+
{
9+
$this->assertEmbed(
10+
'https://www.mixcloud.com/malka11/malka-pres-lockdown-sessions-anjuna-history-2010-2020-/',
11+
[
12+
'title' => 'Malka Pres. #Lockdown Sessions - Anjuna History 2000-2010',
13+
'image' => 'https://thumbnailer.mixcloud.com/unsafe/600x600/extaudio/1/4/9/b/ea7f-32ca-4f49-9559-60eada3867e5',
14+
'authorName' => 'Malka',
15+
'authorUrl' => 'https://www.mixcloud.com/malka11/',
16+
'type' => 'rich',
17+
'providerName' => 'Mixcloud',
18+
]
19+
);
20+
}
21+
}

0 commit comments

Comments
 (0)