mirror of
https://github.com/RSS-Bridge/rss-bridge.git
synced 2025-01-16 21:58:21 +01:00
[DevToBridge] Allow subsribe to username (#3218)
This commit is contained in:
parent
69290c8e55
commit
51952c1db2
@ -3,6 +3,7 @@
|
|||||||
class DevToBridge extends BridgeAbstract
|
class DevToBridge extends BridgeAbstract
|
||||||
{
|
{
|
||||||
const CONTEXT_BY_TAG = 'By tag';
|
const CONTEXT_BY_TAG = 'By tag';
|
||||||
|
const CONTEXT_BY_USER = 'By user';
|
||||||
|
|
||||||
const NAME = 'dev.to Bridge';
|
const NAME = 'dev.to Bridge';
|
||||||
const URI = 'https://dev.to';
|
const URI = 'https://dev.to';
|
||||||
@ -25,6 +26,21 @@ class DevToBridge extends BridgeAbstract
|
|||||||
'required' => false,
|
'required' => false,
|
||||||
'title' => 'Enable to receive the full article for each item'
|
'title' => 'Enable to receive the full article for each item'
|
||||||
]
|
]
|
||||||
|
],
|
||||||
|
self::CONTEXT_BY_USER => [
|
||||||
|
'user' => [
|
||||||
|
'name' => 'User',
|
||||||
|
'type' => 'text',
|
||||||
|
'required' => true,
|
||||||
|
'title' => 'Insert your username',
|
||||||
|
'exampleValue' => 'n3wt0n'
|
||||||
|
],
|
||||||
|
'full' => [
|
||||||
|
'name' => 'Full article',
|
||||||
|
'type' => 'checkbox',
|
||||||
|
'required' => false,
|
||||||
|
'title' => 'Enable to receive the full article for each item'
|
||||||
|
]
|
||||||
]
|
]
|
||||||
];
|
];
|
||||||
|
|
||||||
@ -36,6 +52,11 @@ class DevToBridge extends BridgeAbstract
|
|||||||
return static::URI . '/t/' . urlencode($tag);
|
return static::URI . '/t/' . urlencode($tag);
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
|
case self::CONTEXT_BY_USER:
|
||||||
|
if ($user = $this->getInput('user')) {
|
||||||
|
return static::URI . '/' . urlencode($user);
|
||||||
|
}
|
||||||
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
return parent::getURI();
|
return parent::getURI();
|
||||||
|
Loading…
x
Reference in New Issue
Block a user