-
Notifications
You must be signed in to change notification settings - Fork 1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[PicukiBridge] Displays Instagram Posts #2183
Conversation
An alternative Instagram Bridge
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hello, @marcus-at-localhost !
Looks like it works.
Please fix linting (must work on php 5.6) and other review comments.
bridges/PicukiBridge.php
Outdated
public function collectData() | ||
{ | ||
$html = getSimpleHTMLDOM($this->getURI()) | ||
or returnServerError('Could not request Picuki.'); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You don't need this. getSimpleHTMLDom will throw exception.
bridges/PicukiBridge.php
Outdated
public function getURI() | ||
{ | ||
if (!is_null($this->getInput('u'))) { | ||
return trim(self::URI, '/') . '/profile/' . $this->getInput('u'); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We have urljoin
bridges/PicukiBridge.php
Outdated
} | ||
|
||
if (!is_null($this->getInput('h'))) { | ||
return trim(self::URI, '/') . '/tag/' . $this->getInput('h'); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Same about urljoin
bridges/PicukiBridge.php
Outdated
} | ||
|
||
if (!is_null($this->getInput('h'))) { | ||
return trim(self::URI, '/') . '/tag/' . $this->getInput('h'); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
That would be nice, if example_hash_tag
is accepted the same like #example_hash_tag
bridges/PicukiBridge.php
Outdated
if (!is_null($this->getInput('u'))) { | ||
return $this->getInput('u') . ' - Picuki Bridge'; | ||
} | ||
|
||
return parent::getName(); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nothing for hashtag?)
php 5.6 compat add `urljoin` better hashtag handling
gj! |
@marcus-at-localhost any plans to add stories as @dhuschde suggested? If not, I suggest to @dhuschde to make an feature request as an issue. |
Thanks @em92! |
An alternative Instagram Bridge