Skip to content

Commit 01c284d

Browse files
authored
Merge pull request #414 from lozeone/v3.x
Add an Instagram Adapter to v3.x
2 parents 3978fb9 + 6d85de5 commit 01c284d

File tree

2 files changed

+21
-1
lines changed

2 files changed

+21
-1
lines changed

src/Adapters/Instagram.php

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
<?php
2+
3+
namespace Embed\Adapters;
4+
5+
use Embed\Http\Response;
6+
7+
/**
8+
* Adapter to provide information from Instagram.
9+
* Required when Instagram returns a 429 status code.
10+
*/
11+
class Instagram extends Webpage
12+
{
13+
/**
14+
* {@inheritdoc}
15+
*/
16+
public static function check(Response $response)
17+
{
18+
return $response->isValid([200, 429]);
19+
}
20+
}

src/Http/Redirects.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ abstract class Redirects
1414
'spotify' => 'play.spotify.com/*',
1515
'tumblr' => 't.umblr.com/redirect',
1616
];
17-
17+
1818
/**
1919
* Resolve the url redirection.
2020
*

0 commit comments

Comments
 (0)