Skip to content

Commit f6e29a4

Browse files
committed
API Change, provide support to urls in getendpoint
1 parent 3f9b807 commit f6e29a4

22 files changed

+57
-19
lines changed

src/Providers/OEmbed.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -240,15 +240,15 @@ protected static function getEndPointFromRequest(Request $request, array $config
240240

241241
if (class_exists($class) && $request->match($class::getPatterns())) {
242242
return [
243-
'endPoint' => $class::getEndpoint(),
243+
'endPoint' => $class::getEndpoint($request),
244244
'params' => $class::getParams($request),
245245
];
246246
}
247247

248248
//Search using embedly
249249
if (!empty($config['embedlyKey']) && $request->match(OEmbed\Embedly::getPatterns())) {
250250
return [
251-
'endPoint' => OEmbed\Embedly::getEndpoint(),
251+
'endPoint' => OEmbed\Embedly::getEndpoint($request),
252252
'params' => OEmbed\Embedly::getParams($request) + ['key' => $config['embedlyKey']],
253253
];
254254
}

src/Providers/OEmbed/Bambuser.php

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,12 +2,14 @@
22

33
namespace Embed\Providers\OEmbed;
44

5+
use Embed\Url;
6+
57
class Bambuser extends OEmbedImplementation
68
{
79
/**
810
* {@inheritdoc}
911
*/
10-
public static function getEndPoint()
12+
public static function getEndPoint(Url $url)
1113
{
1214
return 'https://api.bambuser.com/oembed.json';
1315
}

src/Providers/OEmbed/Deviantart.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ class Deviantart extends OEmbedImplementation
99
/**
1010
* {@inheritdoc}
1111
*/
12-
public static function getEndPoint()
12+
public static function getEndPoint(Url $url)
1313
{
1414
return 'http://backend.deviantart.com/oembed';
1515
}

src/Providers/OEmbed/Dotsub.php

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,12 +2,14 @@
22

33
namespace Embed\Providers\OEmbed;
44

5+
use Embed\Url;
6+
57
class Dotsub extends OEmbedImplementation
68
{
79
/**
810
* {@inheritdoc}
911
*/
10-
public static function getEndPoint()
12+
public static function getEndPoint(Url $url)
1113
{
1214
return 'http://dotsub.com/services/oembed';
1315
}

src/Providers/OEmbed/Embedly.php

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,12 +2,14 @@
22

33
namespace Embed\Providers\OEmbed;
44

5+
use Embed\Url;
6+
57
class Embedly extends OEmbedImplementation
68
{
79
/**
810
* {@inheritdoc}
911
*/
10-
public static function getEndPoint()
12+
public static function getEndPoint(Url $url)
1113
{
1214
return 'http://api.embed.ly/1/oembed';
1315
}

src/Providers/OEmbed/Flickr.php

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,8 @@
22

33
namespace Embed\Providers\OEmbed;
44

5+
use Embed\Url;
6+
57
class Flickr extends OEmbedImplementation
68
{
79
/**

src/Providers/OEmbed/Imgur.php

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,8 @@
22

33
namespace Embed\Providers\OEmbed;
44

5+
use Embed\Url;
6+
57
class Imgur extends OEmbedImplementation
68
{
79
/**

src/Providers/OEmbed/Kickstarter.php

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,8 @@
22

33
namespace Embed\Providers\OEmbed;
44

5+
use Embed\Url;
6+
57
class Kickstarter extends OEmbedImplementation
68
{
79
/**

src/Providers/OEmbed/Meetup.php

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,8 @@
22

33
namespace Embed\Providers\OEmbed;
44

5+
use Embed\Url;
6+
57
class Meetup extends OEmbedImplementation
68
{
79
/**

src/Providers/OEmbed/OEmbedImplementation.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ abstract class OEmbedImplementation
1616
*
1717
* @return string
1818
*/
19-
public static function getEndPoint()
19+
public static function getEndPoint(Url $url)
2020
{
2121
return '';
2222
}

0 commit comments

Comments
 (0)