Skip to content

Commit

Permalink
[PikabuBridge] Added filtering by user (RSS-Bridge#1266)
Browse files Browse the repository at this point in the history
  • Loading branch information
em92 authored and teromene committed Aug 28, 2019
1 parent 368e665 commit e1e09b3
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions bridges/PikabuBridge.php
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,13 @@ class PikabuBridge extends BridgeAbstract {
'required' => true
),
'filter' => self::PARAMETERS_FILTER
),
'По пользователю' => array(
'user' => array(
'name' => 'Пользователь',
'exampleValue' => 'admin',
'required' => true
)
)
);

Expand All @@ -40,6 +47,8 @@ class PikabuBridge extends BridgeAbstract {
public function getURI() {
if ($this->getInput('tag')) {
return self::URI . '/tag/' . rawurlencode($this->getInput('tag')) . '/' . rawurlencode($this->getInput('filter'));
} else if ($this->getInput('user')) {
return self::URI . '/@' . rawurlencode($this->getInput('user'));
} else if ($this->getInput('community')) {
$uri = self::URI . '/community/' . rawurlencode($this->getInput('community'));
if ($this->getInput('filter') != 'hot') {
Expand Down

0 comments on commit e1e09b3

Please sign in to comment.