Skip to content

Commit

Permalink
Merge pull request #365 from albertboada/feat/v3.x/mixcloud-oembed
Browse files Browse the repository at this point in the history
(v3) Mixcloud OEmbed Provider
  • Loading branch information
oscarotero authored Jun 8, 2020
2 parents 2c73fb7 + 4b196b7 commit fdf2039
Show file tree
Hide file tree
Showing 2 changed files with 30 additions and 0 deletions.
9 changes: 9 additions & 0 deletions src/Providers/OEmbed/Mixcloud.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
<?php

namespace Embed\Providers\OEmbed;

class Mixcloud extends EndPoint implements EndPointInterface
{
protected static $pattern = 'www.mixcloud.com/*/';
protected static $endPoint = 'https://www.mixcloud.com/oembed/';
}
21 changes: 21 additions & 0 deletions tests/MixcloudTest.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
<?php

namespace Embed\Tests;

class MixcloudTest extends AbstractTestCase
{
public function testOne()
{
$this->assertEmbed(
'https://www.mixcloud.com/malka11/malka-pres-lockdown-sessions-anjuna-history-2010-2020-/',
[
'title' => 'Malka Pres. #Lockdown Sessions - Anjuna History 2000-2010',
'image' => 'https://thumbnailer.mixcloud.com/unsafe/600x600/extaudio/1/4/9/b/ea7f-32ca-4f49-9559-60eada3867e5',
'authorName' => 'Malka',
'authorUrl' => 'https://www.mixcloud.com/malka11/',
'type' => 'rich',
'providerName' => 'Mixcloud',
]
);
}
}

0 comments on commit fdf2039

Please sign in to comment.