bridges: Fix bridges to pass unit test (#984)
* [DealabsBridge] fixed parameters * [DemonoidBridge] added parameter context names * [DevToBridge] fixed parameters * [ExtremeDownloadBridge] fixed parameters * [GithubIssueBridge] fixed parameters * [InstagramBridge] added parameter context names * [MydealsBridge] fixed parameters * [OnVaSortirBridge] fixed parameters * [ThingyverseBridge] fixed parameters * [HotUKDealsBridge] fixed parameters * [FeedExpanderExample] added proper URI * [GQMagazineBridge] fixed parameters and getDomain() * [MozillaSecurityBridge] fixed filename References #980
This commit is contained in:
parent
f3f33cabed
commit
288d4de218
13 changed files with 102 additions and 104 deletions
|
@ -15,27 +15,25 @@ class DealabsBridge extends PepperBridgeAbstract {
|
||||||
'hide_expired' => array(
|
'hide_expired' => array(
|
||||||
'name' => 'Masquer les éléments expirés',
|
'name' => 'Masquer les éléments expirés',
|
||||||
'type' => 'checkbox',
|
'type' => 'checkbox',
|
||||||
'required' => 'true'
|
'required' => true
|
||||||
),
|
),
|
||||||
'hide_local' => array(
|
'hide_local' => array(
|
||||||
'name' => 'Masquer les deals locaux',
|
'name' => 'Masquer les deals locaux',
|
||||||
'type' => 'checkbox',
|
'type' => 'checkbox',
|
||||||
'title' => 'Masquer les deals en magasins physiques',
|
'title' => 'Masquer les deals en magasins physiques',
|
||||||
'required' => 'true'
|
'required' => true
|
||||||
),
|
),
|
||||||
'priceFrom' => array(
|
'priceFrom' => array(
|
||||||
'name' => 'Prix minimum',
|
'name' => 'Prix minimum',
|
||||||
'type' => 'text',
|
'type' => 'text',
|
||||||
'title' => 'Prix mnimum en euros',
|
'title' => 'Prix mnimum en euros',
|
||||||
'required' => 'false',
|
'required' => false
|
||||||
'defaultValue' => ''
|
|
||||||
),
|
),
|
||||||
'priceTo' => array(
|
'priceTo' => array(
|
||||||
'name' => 'Prix maximum',
|
'name' => 'Prix maximum',
|
||||||
'type' => 'text',
|
'type' => 'text',
|
||||||
'title' => 'Prix maximum en euros',
|
'title' => 'Prix maximum en euros',
|
||||||
'required' => 'false',
|
'required' => false
|
||||||
'defaultValue' => ''
|
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
|
|
||||||
|
@ -43,7 +41,7 @@ class DealabsBridge extends PepperBridgeAbstract {
|
||||||
'group' => array(
|
'group' => array(
|
||||||
'name' => 'Groupe',
|
'name' => 'Groupe',
|
||||||
'type' => 'list',
|
'type' => 'list',
|
||||||
'required' => 'true',
|
'required' => true,
|
||||||
'title' => 'Groupe dont il faut afficher les deals',
|
'title' => 'Groupe dont il faut afficher les deals',
|
||||||
'values' => array(
|
'values' => array(
|
||||||
'Abonnements internet' => 'abonnements-internet',
|
'Abonnements internet' => 'abonnements-internet',
|
||||||
|
@ -959,7 +957,7 @@ class DealabsBridge extends PepperBridgeAbstract {
|
||||||
'order' => array(
|
'order' => array(
|
||||||
'name' => 'Trier par',
|
'name' => 'Trier par',
|
||||||
'type' => 'list',
|
'type' => 'list',
|
||||||
'required' => 'true',
|
'required' => true,
|
||||||
'title' => 'Ordre de tri des deals',
|
'title' => 'Ordre de tri des deals',
|
||||||
'values' => array(
|
'values' => array(
|
||||||
'Du deal le plus Hot au moins Hot' => '',
|
'Du deal le plus Hot au moins Hot' => '',
|
||||||
|
|
|
@ -6,72 +6,75 @@ class DemonoidBridge extends BridgeAbstract {
|
||||||
const URI = 'https://www.demonoid.pw/';
|
const URI = 'https://www.demonoid.pw/';
|
||||||
const DESCRIPTION = 'Returns results from search';
|
const DESCRIPTION = 'Returns results from search';
|
||||||
|
|
||||||
const PARAMETERS = array(array(
|
const PARAMETERS = array(
|
||||||
'q' => array(
|
'Keywords' => array(
|
||||||
'name' => 'keywords',
|
'q' => array(
|
||||||
'exampleValue' => 'keyword1 keyword2…',
|
'name' => 'keywords',
|
||||||
'required' => true,
|
'exampleValue' => 'keyword1 keyword2…',
|
||||||
|
'required' => true,
|
||||||
|
),
|
||||||
|
'category' => array(
|
||||||
|
'name' => 'Category',
|
||||||
|
'type' => 'list',
|
||||||
|
'values' => array(
|
||||||
|
'All' => 0,
|
||||||
|
'Movies' => 1,
|
||||||
|
'Music' => 2,
|
||||||
|
'TV' => 3,
|
||||||
|
'Games' => 4,
|
||||||
|
'Applications' => 5,
|
||||||
|
'Pictures' => 8,
|
||||||
|
'Anime' => 9,
|
||||||
|
'Comics' => 10,
|
||||||
|
'Books' => 11,
|
||||||
|
'Audiobooks' => 17
|
||||||
|
)
|
||||||
|
)
|
||||||
),
|
),
|
||||||
'category' => array(
|
'Category Only' => array(
|
||||||
'name' => 'Category',
|
'catOnly' => array(
|
||||||
'type' => 'list',
|
'name' => 'Category',
|
||||||
'values' => array(
|
'type' => 'list',
|
||||||
'All' => 0,
|
'values' => array(
|
||||||
'Movies' => 1,
|
'All' => 0,
|
||||||
'Music' => 2,
|
'Movies' => 1,
|
||||||
'TV' => 3,
|
'Music' => 2,
|
||||||
'Games' => 4,
|
'TV' => 3,
|
||||||
'Applications' => 5,
|
'Games' => 4,
|
||||||
'Pictures' => 8,
|
'Applications' => 5,
|
||||||
'Anime' => 9,
|
'Pictures' => 8,
|
||||||
'Comics' => 10,
|
'Anime' => 9,
|
||||||
'Books' => 11,
|
'Comics' => 10,
|
||||||
'Audiobooks' => 17
|
'Books' => 11,
|
||||||
|
'Audiobooks' => 17
|
||||||
|
)
|
||||||
)
|
)
|
||||||
)
|
|
||||||
), array(
|
|
||||||
'catOnly' => array(
|
|
||||||
'name' => 'Category',
|
|
||||||
'type' => 'list',
|
|
||||||
'values' => array(
|
|
||||||
'All' => 0,
|
|
||||||
'Movies' => 1,
|
|
||||||
'Music' => 2,
|
|
||||||
'TV' => 3,
|
|
||||||
'Games' => 4,
|
|
||||||
'Applications' => 5,
|
|
||||||
'Pictures' => 8,
|
|
||||||
'Anime' => 9,
|
|
||||||
'Comics' => 10,
|
|
||||||
'Books' => 11,
|
|
||||||
'Audiobooks' => 17
|
|
||||||
)
|
|
||||||
)
|
|
||||||
), array(
|
|
||||||
'userid' => array(
|
|
||||||
'name' => 'user id',
|
|
||||||
'exampleValue' => '00000',
|
|
||||||
'required' => true,
|
|
||||||
'type' => 'number'
|
|
||||||
),
|
),
|
||||||
'category' => array(
|
'User ID' => array(
|
||||||
'name' => 'Category',
|
'userid' => array(
|
||||||
'type' => 'list',
|
'name' => 'user id',
|
||||||
'values' => array(
|
'exampleValue' => '00000',
|
||||||
'All' => 0,
|
'required' => true,
|
||||||
'Movies' => 1,
|
'type' => 'number'
|
||||||
'Music' => 2,
|
),
|
||||||
'TV' => 3,
|
'category' => array(
|
||||||
'Games' => 4,
|
'name' => 'Category',
|
||||||
'Applications' => 5,
|
'type' => 'list',
|
||||||
'Pictures' => 8,
|
'values' => array(
|
||||||
'Anime' => 9,
|
'All' => 0,
|
||||||
'Comics' => 10,
|
'Movies' => 1,
|
||||||
'Books' => 11,
|
'Music' => 2,
|
||||||
'Audiobooks' => 17
|
'TV' => 3,
|
||||||
|
'Games' => 4,
|
||||||
|
'Applications' => 5,
|
||||||
|
'Pictures' => 8,
|
||||||
|
'Anime' => 9,
|
||||||
|
'Comics' => 10,
|
||||||
|
'Books' => 11,
|
||||||
|
'Audiobooks' => 17
|
||||||
|
)
|
||||||
)
|
)
|
||||||
)
|
)
|
||||||
)
|
|
||||||
);
|
);
|
||||||
|
|
||||||
public function collectData() {
|
public function collectData() {
|
||||||
|
|
|
@ -22,8 +22,7 @@ class DevToBridge extends BridgeAbstract {
|
||||||
'name' => 'Full article',
|
'name' => 'Full article',
|
||||||
'type' => 'checkbox',
|
'type' => 'checkbox',
|
||||||
'required' => false,
|
'required' => false,
|
||||||
'title' => 'Enable to receive the full article for each item',
|
'title' => 'Enable to receive the full article for each item'
|
||||||
'defaultValue' => false
|
|
||||||
)
|
)
|
||||||
)
|
)
|
||||||
);
|
);
|
||||||
|
|
|
@ -15,7 +15,7 @@ class ExtremeDownloadBridge extends BridgeAbstract {
|
||||||
'filter' => array(
|
'filter' => array(
|
||||||
'name' => 'Type de contenu',
|
'name' => 'Type de contenu',
|
||||||
'type' => 'list',
|
'type' => 'list',
|
||||||
'required' => 'true',
|
'required' => true,
|
||||||
'title' => 'Type de contenu à suivre : Téléchargement, Streaming ou les deux',
|
'title' => 'Type de contenu à suivre : Téléchargement, Streaming ou les deux',
|
||||||
'values' => array(
|
'values' => array(
|
||||||
'Streaming et Téléchargement' => 'both',
|
'Streaming et Téléchargement' => 'both',
|
||||||
|
|
|
@ -3,7 +3,7 @@ class FeedExpanderExampleBridge extends FeedExpander {
|
||||||
|
|
||||||
const MAINTAINER = 'logmanoriginal';
|
const MAINTAINER = 'logmanoriginal';
|
||||||
const NAME = 'FeedExpander Example';
|
const NAME = 'FeedExpander Example';
|
||||||
const URI = '#';
|
const URI = 'http://github.com/RSS-Bridge/rss-bridge/';
|
||||||
const DESCRIPTION = 'Example bridge to test FeedExpander';
|
const DESCRIPTION = 'Example bridge to test FeedExpander';
|
||||||
|
|
||||||
const PARAMETERS = array(
|
const PARAMETERS = array(
|
||||||
|
|
|
@ -9,7 +9,6 @@
|
||||||
*/
|
*/
|
||||||
class GQMagazineBridge extends BridgeAbstract
|
class GQMagazineBridge extends BridgeAbstract
|
||||||
{
|
{
|
||||||
|
|
||||||
const MAINTAINER = 'Riduidel';
|
const MAINTAINER = 'Riduidel';
|
||||||
|
|
||||||
const NAME = 'GQMagazine';
|
const NAME = 'GQMagazine';
|
||||||
|
@ -20,18 +19,18 @@ class GQMagazineBridge extends BridgeAbstract
|
||||||
const CACHE_TIMEOUT = 7200; // 2h
|
const CACHE_TIMEOUT = 7200; // 2h
|
||||||
const DESCRIPTION = 'GQMagazine section extractor bridge. This bridge allows you get only a specific section.';
|
const DESCRIPTION = 'GQMagazine section extractor bridge. This bridge allows you get only a specific section.';
|
||||||
|
|
||||||
|
const DEFAULT_DOMAIN = 'www.gqmagazine.fr';
|
||||||
|
|
||||||
const PARAMETERS = array( array(
|
const PARAMETERS = array( array(
|
||||||
'domain' => array(
|
'domain' => array(
|
||||||
'name' => 'Domain to use',
|
'name' => 'Domain to use',
|
||||||
'required' => true,
|
'required' => true,
|
||||||
'values' => array(
|
'defaultValue' => self::DEFAULT_DOMAIN
|
||||||
'www.gqmagazine.fr' => 'www.gqmagazine.fr'
|
|
||||||
),
|
|
||||||
'defaultValue' => 'www.gqmagazine.fr'
|
|
||||||
),
|
),
|
||||||
'page' => array(
|
'page' => array(
|
||||||
'name' => 'Initial page to load',
|
'name' => 'Initial page to load',
|
||||||
'required' => true
|
'required' => true,
|
||||||
|
'exampleValue' => 'sexe/news'
|
||||||
),
|
),
|
||||||
));
|
));
|
||||||
|
|
||||||
|
@ -42,7 +41,12 @@ class GQMagazineBridge extends BridgeAbstract
|
||||||
);
|
);
|
||||||
|
|
||||||
private function getDomain() {
|
private function getDomain() {
|
||||||
return $this->getInput('domain');
|
$domain = $this->getInput('domain');
|
||||||
|
if (empty($domain))
|
||||||
|
$domain = self::DEFAULT_DOMAIN;
|
||||||
|
if (strpos($domain, '://') === false)
|
||||||
|
$domain = 'https://' . $domain;
|
||||||
|
return $domain;
|
||||||
}
|
}
|
||||||
|
|
||||||
public function getURI()
|
public function getURI()
|
||||||
|
|
|
@ -28,7 +28,7 @@ class GithubIssueBridge extends BridgeAbstract {
|
||||||
'i' => array(
|
'i' => array(
|
||||||
'name' => 'Issue number',
|
'name' => 'Issue number',
|
||||||
'type' => 'number',
|
'type' => 'number',
|
||||||
'required' => 'true'
|
'required' => true
|
||||||
)
|
)
|
||||||
)
|
)
|
||||||
);
|
);
|
||||||
|
|
|
@ -17,27 +17,25 @@ class HotUKDealsBridge extends PepperBridgeAbstract {
|
||||||
'hide_expired' => array(
|
'hide_expired' => array(
|
||||||
'name' => 'Hide expired deals',
|
'name' => 'Hide expired deals',
|
||||||
'type' => 'checkbox',
|
'type' => 'checkbox',
|
||||||
'required' => 'true'
|
'required' => true
|
||||||
),
|
),
|
||||||
'hide_local' => array(
|
'hide_local' => array(
|
||||||
'name' => 'Hide local deals',
|
'name' => 'Hide local deals',
|
||||||
'type' => 'checkbox',
|
'type' => 'checkbox',
|
||||||
'title' => 'Hide deals in physical store',
|
'title' => 'Hide deals in physical store',
|
||||||
'required' => 'true'
|
'required' => true
|
||||||
),
|
),
|
||||||
'priceFrom' => array(
|
'priceFrom' => array(
|
||||||
'name' => 'Minimal Price',
|
'name' => 'Minimal Price',
|
||||||
'type' => 'text',
|
'type' => 'text',
|
||||||
'title' => 'Minmal Price in Pounds',
|
'title' => 'Minmal Price in Pounds',
|
||||||
'required' => 'false',
|
'required' => false
|
||||||
'defaultValue' => ''
|
|
||||||
),
|
),
|
||||||
'priceTo' => array(
|
'priceTo' => array(
|
||||||
'name' => 'Maximum Price',
|
'name' => 'Maximum Price',
|
||||||
'type' => 'text',
|
'type' => 'text',
|
||||||
'title' => 'Maximum Price in Pounds',
|
'title' => 'Maximum Price in Pounds',
|
||||||
'required' => 'false',
|
'required' => false
|
||||||
'defaultValue' => ''
|
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
|
|
||||||
|
@ -45,7 +43,7 @@ class HotUKDealsBridge extends PepperBridgeAbstract {
|
||||||
'group' => array(
|
'group' => array(
|
||||||
'name' => 'Group',
|
'name' => 'Group',
|
||||||
'type' => 'list',
|
'type' => 'list',
|
||||||
'required' => 'true',
|
'required' => true,
|
||||||
'title' => 'Group whose deals must be displayed',
|
'title' => 'Group whose deals must be displayed',
|
||||||
'values' => array(
|
'values' => array(
|
||||||
'2DS' => '2ds',
|
'2DS' => '2ds',
|
||||||
|
@ -1319,7 +1317,7 @@ class HotUKDealsBridge extends PepperBridgeAbstract {
|
||||||
'order' => array(
|
'order' => array(
|
||||||
'name' => 'Order by',
|
'name' => 'Order by',
|
||||||
'type' => 'list',
|
'type' => 'list',
|
||||||
'required' => 'true',
|
'required' => true,
|
||||||
'title' => 'Sort order of deals',
|
'title' => 'Sort order of deals',
|
||||||
'values' => array(
|
'values' => array(
|
||||||
'From the most to the least hot deal' => '-hot',
|
'From the most to the least hot deal' => '-hot',
|
||||||
|
|
|
@ -7,19 +7,19 @@ class InstagramBridge extends BridgeAbstract {
|
||||||
const DESCRIPTION = 'Returns the newest images';
|
const DESCRIPTION = 'Returns the newest images';
|
||||||
|
|
||||||
const PARAMETERS = array(
|
const PARAMETERS = array(
|
||||||
array(
|
'Username' => array(
|
||||||
'u' => array(
|
'u' => array(
|
||||||
'name' => 'username',
|
'name' => 'username',
|
||||||
'required' => true
|
'required' => true
|
||||||
)
|
)
|
||||||
),
|
),
|
||||||
array(
|
'Hashtag' => array(
|
||||||
'h' => array(
|
'h' => array(
|
||||||
'name' => 'hashtag',
|
'name' => 'hashtag',
|
||||||
'required' => true
|
'required' => true
|
||||||
)
|
)
|
||||||
),
|
),
|
||||||
array(
|
'Location' => array(
|
||||||
'l' => array(
|
'l' => array(
|
||||||
'name' => 'location',
|
'name' => 'location',
|
||||||
'required' => true
|
'required' => true
|
||||||
|
|
|
@ -17,27 +17,25 @@ class MydealsBridge extends PepperBridgeAbstract {
|
||||||
'hide_expired' => array(
|
'hide_expired' => array(
|
||||||
'name' => 'Abgelaufenes ausblenden',
|
'name' => 'Abgelaufenes ausblenden',
|
||||||
'type' => 'checkbox',
|
'type' => 'checkbox',
|
||||||
'required' => 'true'
|
'required' => true
|
||||||
),
|
),
|
||||||
'hide_local' => array(
|
'hide_local' => array(
|
||||||
'name' => 'Lokales ausblenden',
|
'name' => 'Lokales ausblenden',
|
||||||
'type' => 'checkbox',
|
'type' => 'checkbox',
|
||||||
'title' => 'Deals im physischen Geschäft ausblenden',
|
'title' => 'Deals im physischen Geschäft ausblenden',
|
||||||
'required' => 'true'
|
'required' => true
|
||||||
),
|
),
|
||||||
'priceFrom' => array(
|
'priceFrom' => array(
|
||||||
'name' => 'Minimaler Preis',
|
'name' => 'Minimaler Preis',
|
||||||
'type' => 'text',
|
'type' => 'text',
|
||||||
'title' => 'Minmaler Preis in Euros',
|
'title' => 'Minmaler Preis in Euros',
|
||||||
'required' => 'false',
|
'required' => false
|
||||||
'defaultValue' => ''
|
|
||||||
),
|
),
|
||||||
'priceTo' => array(
|
'priceTo' => array(
|
||||||
'name' => 'Maximaler Preis',
|
'name' => 'Maximaler Preis',
|
||||||
'type' => 'text',
|
'type' => 'text',
|
||||||
'title' => 'maximaler Preis in Euro',
|
'title' => 'maximaler Preis in Euro',
|
||||||
'required' => 'false',
|
'required' => false
|
||||||
'defaultValue' => ''
|
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
|
|
||||||
|
@ -45,7 +43,7 @@ class MydealsBridge extends PepperBridgeAbstract {
|
||||||
'group' => array(
|
'group' => array(
|
||||||
'name' => 'Gruppen',
|
'name' => 'Gruppen',
|
||||||
'type' => 'list',
|
'type' => 'list',
|
||||||
'required' => 'true',
|
'required' => true,
|
||||||
'title' => 'Gruppe, deren Deals angezeigt werden müssen',
|
'title' => 'Gruppe, deren Deals angezeigt werden müssen',
|
||||||
'values' => array(
|
'values' => array(
|
||||||
'Elektronik' => 'elektronik',
|
'Elektronik' => 'elektronik',
|
||||||
|
@ -68,7 +66,7 @@ class MydealsBridge extends PepperBridgeAbstract {
|
||||||
'order' => array(
|
'order' => array(
|
||||||
'name' => 'sortieren nach',
|
'name' => 'sortieren nach',
|
||||||
'type' => 'list',
|
'type' => 'list',
|
||||||
'required' => 'true',
|
'required' => true,
|
||||||
'title' => 'Sortierung der deals',
|
'title' => 'Sortierung der deals',
|
||||||
'values' => array(
|
'values' => array(
|
||||||
'Vom heißesten zum kältesten Deal' => '',
|
'Vom heißesten zum kältesten Deal' => '',
|
||||||
|
|
|
@ -111,8 +111,7 @@ class OnVaSortirBridge extends FeedExpander {
|
||||||
'Valence' => 'valence',
|
'Valence' => 'valence',
|
||||||
'Vannes' => 'vannes',
|
'Vannes' => 'vannes',
|
||||||
'Zurich' => 'zurich',
|
'Zurich' => 'zurich',
|
||||||
),
|
)
|
||||||
'defaultValue' => ''
|
|
||||||
)
|
)
|
||||||
)
|
)
|
||||||
);
|
);
|
||||||
|
|
|
@ -112,8 +112,7 @@ class ThingiverseBridge extends BridgeAbstract {
|
||||||
'3D Printer Parts' => '128',
|
'3D Printer Parts' => '128',
|
||||||
'3D Printers' => '126',
|
'3D Printers' => '126',
|
||||||
'3D Printing Tests' => '129',
|
'3D Printing Tests' => '129',
|
||||||
),
|
)
|
||||||
'defaultValue' => ''
|
|
||||||
),
|
),
|
||||||
'showimage' => array(
|
'showimage' => array(
|
||||||
'name' => 'Show image in content',
|
'name' => 'Show image in content',
|
||||||
|
|
Loading…
Reference in a new issue