Skip to content

Commit

Permalink
Merge pull request #347 from mellissageutskens-npo/v3.x
Browse files Browse the repository at this point in the history
Add OEmbed Provider for TikTok.
  • Loading branch information
oscarotero authored Apr 24, 2020
2 parents 0f3c985 + 5730b84 commit aadfc68
Showing 1 changed file with 26 additions and 0 deletions.
26 changes: 26 additions & 0 deletions src/Providers/OEmbed/TIkTok.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
<?php

namespace Embed\Providers\OEmbed;

use Embed\Http\Url;

class TikTok extends EndPoint implements EndPointInterface
{
protected static $pattern = [
'*.tiktok.com/*'
];

protected static $endPoint = 'https://www.tiktok.com/oembed';

/**
* {@inheritdoc}
*/
public function getEndPoint()
{
return Url::create(static::$endPoint)
->withQueryParameters([
'url' => (string) $this->response->getStartingUrl(),
'format' => 'json',
]);
}
}

0 comments on commit aadfc68

Please sign in to comment.