[bridges] migrate all bridges to an array based definition of parameters

see github issue 356

Signed-off-by: Pierre Mazière <pierre.maziere@gmx.com>
This commit is contained in:
Pierre Mazière 2016-08-22 01:25:56 +02:00
parent 2f09ae56ad
commit f0e502ce37
79 changed files with 1381 additions and 2316 deletions

View file

@ -8,32 +8,20 @@ class AllocineFRBridge extends BridgeAbstract{
$this->uri = "http://www.allocine.fr"; $this->uri = "http://www.allocine.fr";
$this->description = "Bridge for allocine.fr"; $this->description = "Bridge for allocine.fr";
$this->parameters[] = $this->parameters[] = array(
'[ 'category'=>array(
{ 'name'=>'category',
"name" : "category", 'type'=>'list',
"identifier" : "category", 'required'=>true,
"type" : "list", 'exampleValue'=>'Faux Raccord',
"required" : true, 'title'=>'Select your category',
"exampleValue" : "Faux Raccord", 'values'=>array(
"title" : "Select your category", 'Faux Raccord'=>'faux-raccord',
"values" : 'Top 5'=>'top-5',
[ 'Tueurs En Serie'=>'tuers-en-serie'
{ )
"name" : "Faux Raccord", )
"value" : "faux-raccord" );
},
{
"name" : "Top 5",
"value" : "top-5"
},
{
"name" : "Tueurs En Serie",
"value" : "tuers-en-serie"
}
]
}
]';
} }
public function collectData(array $params){ public function collectData(array $params){

View file

@ -10,36 +10,18 @@ class AnimeUltimeBridge extends BridgeAbstract {
$this->uri = 'http://www.anime-ultime.net/'; $this->uri = 'http://www.anime-ultime.net/';
$this->description = 'Returns the 10 newest releases posted on Anime-Ultime'; $this->description = 'Returns the 10 newest releases posted on Anime-Ultime';
$this->parameters[] = $this->parameters[] = array(
'[ 'type'=>array(
{ 'name'=>'Type',
"name" : "Type", 'type'=>'list',
"type" : "list", 'values'=>array(
"identifier" : "type", 'Everything'=>'',
"values" : 'Anime'=>'A',
[ 'Drama'=>'D',
{ 'Tokusatsu'=>'T'
"name" : "Everything", )
"value" : "" )
);
},
{
"name" : "Anime",
"value" : "A"
},
{
"name" : "Drama",
"value" : "D"
},
{
"name" : "Tokusatsu",
"value" : "T"
}
]
}
]';
} }
public function collectData(array $param) { public function collectData(array $param) {

View file

@ -7,105 +7,42 @@ class Arte7Bridge extends BridgeAbstract{
$this->name = "Arte +7"; $this->name = "Arte +7";
$this->uri = "http://www.arte.tv/"; $this->uri = "http://www.arte.tv/";
$this->description = "Returns newest videos from ARTE +7"; $this->description = "Returns newest videos from ARTE +7";
$this->parameters["Catégorie (Français)"] = $this->parameters["Catégorie (Français)"] = array(
'[ 'catfr'=>array(
{ 'type'=>'list',
"type" : "list", 'name'=>'Catégorie',
"identifier" : "catfr", 'values'=>array(
"name" : "Catégorie", 'Toutes les vidéos (français)'=>'toutes-les-videos',
"values" : [ 'Actu & société'=>'actu-société',
{ 'Séries & fiction'=>'séries-fiction',
"name" : "Toutes les vidéos (français)", 'Cinéma'=>'cinéma',
"value" : "toutes-les-videos" 'Arts & spectacles classiques'=>'arts-spectacles-classiques',
}, 'Culture pop'=>'culture-pop',
{ 'Découverte'=>'découverte',
"name" : "Actu & société", 'Histoire'=>'histoire',
"value" : "actu-société" 'Junior'=>'junior'
},
{
"name" : "Séries & fiction",
"value" : "séries-fiction"
},
{
"name" : "Cinéma",
"value" : "cinéma"
},
{
"name" : "Arts & spectacles classiques",
"value" : "arts-spectacles-classiques"
},
{
"name" : "Culture pop",
"value" : "culture-pop"
},
{
"name" : "Découverte",
"value" : "découverte"
},
{
"name" : "Histoire",
"value" : "histoire"
},
{
"name" : "Junior",
"value" : "junior"
}
] )
)
);
$this->parameters["Catégorie (Allemand)"] = array(
} 'catde'=>array(
'type'=>'list',
]'; 'name'=>'Catégorie',
$this->parameters["Catégorie (Allemand)"] = 'values'=>array(
'[ 'Alle Videos (deutsch)'=>'alle-videos',
{ 'Aktuelles & Gesellschaft'=>'aktuelles-gesellschaft',
"type" : "list", 'Fernsehfilme & Serien'=>'fernsehfilme-serien',
"identifier" : "catde", 'Kino'=>'kino',
"name" : "Catégorie", 'Kunst & Kultur'=>'kunst-kultur',
"values" : [ 'Popkultur & Alternativ'=>'popkultur-alternativ',
{ 'Entdeckung'=>'entdeckung',
"name" : "Alle Videos (deutsch)", 'Geschichte'=>'geschichte',
"value" : "alle-videos" 'Junior'=>'junior'
}, )
{ )
"name" : "Aktuelles & Gesellschaft", );
"value" : "aktuelles-gesellschaft"
},
{
"name" : "Fernsehfilme & Serien",
"value" : "fernsehfilme-serien"
},
{
"name" : "Kino",
"value" : "kino"
},
{
"name" : "Kunst & Kultur",
"value" : "kunst-kultur"
},
{
"name" : "Popkultur & Alternativ",
"value" : "popkultur-alternativ"
},
{
"name" : "Entdeckung",
"value" : "entdeckung"
},
{
"name" : "Geschichte",
"value" : "geschichte"
},
{
"name" : "Junior",
"value" : "junior"
}
]
}
]';
} }

View file

@ -8,13 +8,11 @@ class AskfmBridge extends BridgeAbstract{
$this->uri = "http://ask.fm/"; $this->uri = "http://ask.fm/";
$this->description = "Returns answers from an Ask.fm user"; $this->description = "Returns answers from an Ask.fm user";
$this->parameters["Ask.fm username"] = $this->parameters["Ask.fm username"] = array(
'[ 'u'=>array(
{ 'name'=>'Username'
"name" : "Username", )
"identifier" : "u" );
}
]';
} }
public function collectData(array $param){ public function collectData(array $param){

View file

@ -10,15 +10,12 @@ class BandcampBridge extends BridgeAbstract{
$this->uri = "http://bandcamp.com/"; $this->uri = "http://bandcamp.com/";
$this->description = "New bandcamp release by tag"; $this->description = "New bandcamp release by tag";
$this->parameters[] = $this->parameters[] = array(
'[ 'tag'=>array(
{ 'name'=>'tag',
"name" : "tag", 'type'=>'text'
"type" : "text", )
"identifier" : "tag" );
}
]';
} }
public function collectData(array $param){ public function collectData(array $param){

View file

@ -8,24 +8,14 @@ class BooruprojectBridge extends BridgeAbstract{
$this->uri = "http://booru.org/"; $this->uri = "http://booru.org/";
$this->description = "Returns images from given page and booruproject instance (****.booru.org)"; $this->description = "Returns images from given page and booruproject instance (****.booru.org)";
$this->parameters[] = $this->parameters[] = array(
'[ 'i'=>array(
{ 'name'=>'instance (required)',
"name" : "instance (required)", 'required'=>true
"required" : true, ),
"identifier" : "i" 'p'=>array('name'=>'page'),
}, 't'=>array('name'=>'tags')
{ );
"name" : "page",
"identifier" : "p"
},
{
"name" : "tags",
"identifier" : "t"
}
]';
} }

View file

@ -10,13 +10,9 @@ class CNETBridge extends BridgeAbstract {
$this->uri = 'http://www.cnet.com/'; $this->uri = 'http://www.cnet.com/';
$this->description = 'Returns the newest articles. <br /> You may specify a topic found in some section URLs, else all topics are selected.'; $this->description = 'Returns the newest articles. <br /> You may specify a topic found in some section URLs, else all topics are selected.';
$this->parameters[] = $this->parameters[] = array(
'[ 'topic'=>array('name'=>'Topic name')
{ );
"name" : "Topic name",
"identifier" : "topic"
}
]';
} }
public function collectData(array $param) { public function collectData(array $param) {

View file

@ -6,29 +6,25 @@ class CastorusBridge extends BridgeAbstract {
$this->uri = 'http://www.castorus.com'; $this->uri = 'http://www.castorus.com';
$this->description = "Returns the latest changes"; $this->description = "Returns the latest changes";
$this->parameters["Get latest changes"] = '[]'; $this->parameters["Get latest changes"] = array();
$this->parameters["Get latest changes via ZIP code"] = $this->parameters["Get latest changes via ZIP code"] = array(
'[ 'zip'=>array(
{ 'name'=>'ZIP code',
"name": "ZIP code", 'type'=>'text',
"identifier" : "zip", 'required'=>true,
"type" : "text", 'exampleValue'=>'74910, 74',
"required" : true, 'title'=>'Insert ZIP code (complete or partial)'
"exampleValue" : "74910, 74", )
"title" : "Insert ZIP code (complete or partial)" );
} $this->parameters["Get latest changes via city name"] = array(
]'; 'city'=>array(
$this->parameters["Get latest changes via city name"] = 'name'=>'City name',
'[ 'type'=>'text',
{ 'required'=>true,
"name": "City name", 'exampleValue'=>'Seyssel, Seys',
"identifier" : "city", 'title'=>'Insert city name (complete or partial)'
"type" : "text", )
"required" : true, );
"exampleValue" : "Seyssel, Seys",
"title" : "Insert city name (complete or partial)"
}
]';
} }
// Extracts the tile from an actitiy // Extracts the tile from an actitiy

View file

@ -25,15 +25,13 @@ class CpasbienBridge extends HttpCachingBridgeAbstract{
$this->uri = "http://www.cpasbien.io"; $this->uri = "http://www.cpasbien.io";
$this->description = "Returns latest torrents from a request query"; $this->description = "Returns latest torrents from a request query";
$this->parameters[] = $this->parameters[] = array(
'[ 'q'=>array(
{ 'name'=>'Search',
"name" : "Search", 'required'=>true,
"identifier" : "q", 'title'=>'Type your search'
"required" : true, )
"title" : "Type your search" );
}
]';
} }

View file

@ -8,15 +8,13 @@ class CryptomeBridge extends BridgeAbstract{
$this->uri = "http://cryptome.org/"; $this->uri = "http://cryptome.org/";
$this->description = "Returns the N most recent documents."; $this->description = "Returns the N most recent documents.";
$this->parameters[] = $this->parameters[] = array(
'[ 'n'=>array(
{ 'name'=>'number of elements',
"name" : "number of elements", 'type'=>'number',
"identifier" : "n", 'exampleValue'=>10
"type" : "number", )
"exampleValue" : "10" );
}
]';
} }

View file

@ -10,35 +10,23 @@ class DailymotionBridge extends BridgeAbstract{
$this->uri = "https://www.dailymotion.com/"; $this->uri = "https://www.dailymotion.com/";
$this->description = "Returns the 5 newest videos by username/playlist or search"; $this->description = "Returns the 5 newest videos by username/playlist or search";
$this->parameters["By username"] = $this->parameters["By username"] = array(
'[ 'u'=>array('name'=>'username')
{ );
"name" : "username",
"identifier" : "u"
}
]';
$this->parameters["By playlist id"] = $this->parameters["By playlist id"] = array(
'[ 'p'=>array(
{ 'name'=>'playlist id',
"name" : "playlist id", 'type'=>'text')
"identifier" : "p", );
"type" : "text"
}
]';
$this->parameters["From search results"] = $this->parameters["From search results"] = array(
'[ 's'=>array('name'=>'Search keyword'),
{ 'pa'=>array(
"name" : "Search keyword", 'name'=>'Page',
"identifier" : "s" 'type'=>'number'
}, )
{ );
"name" : "Page",
"identifier" : "pa",
"type" : "number"
}
]';
} }
function getMetadata($id) { function getMetadata($id) {

View file

@ -8,18 +8,10 @@ class DanbooruBridge extends BridgeAbstract{
$this->uri = "http://donmai.us/"; $this->uri = "http://donmai.us/";
$this->description = "Returns images from given page"; $this->description = "Returns images from given page";
$this->parameters[] = $this->parameters[] = array(
'[ 'p'=>array('name'=>'page'),
{ 't'=>array('name'=>'tags')
"name" : "page", );
"identifier" : "p"
},
{
"name" : "tags",
"identifier" : "t"
}
]';
} }
public function collectData(array $param){ public function collectData(array $param){

View file

@ -8,76 +8,29 @@ class DauphineLibereBridge extends BridgeAbstract {
$this->uri = "http://www.ledauphine.com/"; $this->uri = "http://www.ledauphine.com/";
$this->description = "Returns the newest articles."; $this->description = "Returns the newest articles.";
$this->parameters[] = $this->parameters[] = array(
'[ 'u'=>array(
{ 'name'=>'Catégorie de l\'article',
"name" : "Catégorie de l\'article", 'type'=>'list',
"identifier" : "u", 'values'=>array(
"type" : "list", 'À la une'=>'',
"values" : [ 'France Monde'=>'france-monde',
{ 'Faits Divers'=>'faits-divers',
"name" : "À la une", 'Économie et Finance'=>'economie-et-finance',
"value" : "" 'Politique'=>'politique',
}, 'Sport'=>'sport',
{ 'Ain'=>'ain',
"name" : "France Monde", 'Alpes-de-Haute-Provence'=>'haute-provence',
"value" : "france-monde" 'Hautes-Alpes'=>'hautes-alpes',
}, 'Ardèche'=>'ardeche',
{ 'Drôme'=>'drome',
"name" : "Faits Divers", 'Isère Sud'=>'isere-sud',
"value" : "faits-divers" 'Savoie'=>'savoie',
}, 'Haute-Savoie'=>'haute-savoie',
{ 'Vaucluse'=>'vaucluse'
"name" : "Économie et Finance", )
"value" : "economie-et-finance" )
}, );
{
"name" : "Politique",
"value" : "politique"
},
{
"name" : "Sport",
"value" : "sport"
},
{
"name" : "Ain",
"value" : "ain"
},
{
"name" : "Alpes-de-Haute-Provence",
"value" : "haute-provence"
},
{
"name" : "Hautes-Alpes",
"value" : "hautes-alpes"
},
{
"name" : "Ardèche",
"value" : "ardeche"
},
{
"name" : "Drôme",
"value" : "drome"
},
{
"name" : "Isère Sud",
"value" : "isere-sud"
},
{
"name" : "Savoie",
"value" : "savoie"
},
{
"name" : "Haute-Savoie",
"value" : "haute-savoie"
},
{
"name" : "Vaucluse",
"value" : "vaucluse"
}
]
}
]';
} }
private function ExtractContent($url, $context) { private function ExtractContent($url, $context) {

View file

@ -8,46 +8,31 @@ class DemoBridge extends BridgeAbstract{
$this->uri = "http://github.com/sebsauvage/rss-bridge"; $this->uri = "http://github.com/sebsauvage/rss-bridge";
$this->description = "Bridge used for demos"; $this->description = "Bridge used for demos";
$this->parameters['testCheckbox'] = $this->parameters['testCheckbox'] = array(
'[ 'testCheckbox'=>array(
{ 'type'=>'checkbox',
"type" : "checkbox", 'name'=>'test des checkbox'
"identifier" : "testCheckbox", )
"name" : "test des checkbox" );
}
]'; $this->parameters['testList'] = array(
'testList'=>array(
$this->parameters['testList'] = 'type'=>'list',
'[ 'name'=>'test des listes',
{ 'values'=>array(
"type" : "list", 'Test'=>'test',
"identifier" : "testList", 'Test 2'=>'test2'
"name" : "test des listes", )
"values" : [ )
{ );
"name" : "Test",
"value" : "test"
},
{
"name" : "Test 2",
"value" : "test2"
}
]
}
]';
$this->parameters['testNumber'] =
'[
{
"type" : "number",
"identifier" : "testNumber",
"name" : "test des numéros",
"exampleValue" : "1515632"
}
]';
$this->parameters['testNumber'] = array(
'testNumber'=>array(
'type'=>'number',
'name'=>'test des numéros',
'exampleValue'=>'1515632'
)
);
} }
public function collectData(array $param){ public function collectData(array $param){

View file

@ -9,18 +9,13 @@ class DollbooruBridge extends BridgeAbstract{
$this->description = "Returns images from given page"; $this->description = "Returns images from given page";
$this->parameters[] = $this->parameters[] = array(
'[ 'p'=>array(
{ 'name'=>'page',
"name" : "page", 'type'=>'number'
"type" : "number", ),
"identifier" : "p" 't'=>array('name'=>'tags')
}, );
{
"name" : "tags",
"identifier" : "t"
}
]';
} }
public function collectData(array $param){ public function collectData(array $param){

View file

@ -8,14 +8,11 @@ class DuckDuckGoBridge extends BridgeAbstract{
$this->uri = "https://duckduckgo.com/"; $this->uri = "https://duckduckgo.com/";
$this->description = "Returns most recent results from DuckDuckGo."; $this->description = "Returns most recent results from DuckDuckGo.";
$this->parameters[] = $this->parameters[] = array(
'[ 'u'=>array(
{ 'name'=>'keyword',
"name" : "keyword", 'required'=>true)
"identifier" : "u", );
"required":true
}
]';
} }
public function collectData(array $param){ public function collectData(array $param){

View file

@ -8,16 +8,13 @@ class EZTVBridge extends BridgeAbstract{
$this->uri = "https://eztv.ch/"; $this->uri = "https://eztv.ch/";
$this->description = "Returns list of *recent* torrents for a specific show on EZTV. Get showID from URLs in https://eztv.ch/shows/showID/show-full-name."; $this->description = "Returns list of *recent* torrents for a specific show on EZTV. Get showID from URLs in https://eztv.ch/shows/showID/show-full-name.";
$this->parameters[] = $this->parameters[] = array(
'[ 'i'=>array(
{ 'name'=>'Show ids',
"name" : "Show ids", 'exampleValue'=>'showID1,showID2,…',
"identifier" : "i", 'required'=>true
"exampleValue" : "showID1,showID2,...", )
"required": true );
}
]';
} }
public function collectData(array $param){ public function collectData(array $param){

View file

@ -7,16 +7,14 @@ class ElsevierBridge extends BridgeAbstract{
$this->uri = 'http://www.journals.elsevier.com'; $this->uri = 'http://www.journals.elsevier.com';
$this->description = 'Returns the recent articles published in Elsevier journals'; $this->description = 'Returns the recent articles published in Elsevier journals';
$this->parameters[] = $this->parameters[] = array(
'[ 'j'=>array(
{ 'name'=>'Journal name',
"name" : "Journal name", 'required'=>true,
"identifier" : "j", 'exampleValue'=>'academic-pediactrics',
"required" : true, 'title'=>'Insert html-part of your journal'
"exampleValue" : "academic-pediatrics", )
"title" : "Insert html-part of your journal" );
}
]';
} }
// Extracts the list of names from an article as string // Extracts the list of names from an article as string

View file

@ -8,14 +8,12 @@ class FacebookBridge extends BridgeAbstract{
$this->uri = "http://www.facebook.com/"; $this->uri = "http://www.facebook.com/";
$this->description = "Input a page title or a profile log. For a profile log, please insert the parameter as follow : myExamplePage/132621766841117"; $this->description = "Input a page title or a profile log. For a profile log, please insert the parameter as follow : myExamplePage/132621766841117";
$this->parameters[] = $this->parameters[] =array(
'[ 'u'=>array(
{ 'name'=>'Username',
"name" : "Username", 'required'=>true
"identifier" : "u", )
"required" : true );
}
]';
} }
public function collectData(array $param) { public function collectData(array $param) {

View file

@ -8,21 +8,13 @@ class FlickrTagBridge extends BridgeAbstract{
$this->uri = "http://www.flickr.com/"; $this->uri = "http://www.flickr.com/";
$this->description = "Returns the tagged or user images from Flickr"; $this->description = "Returns the tagged or user images from Flickr";
$this->parameters["By keyword"] = $this->parameters["By keyword"] = array(
'[ 'q'=>array('name'=>'keyword')
{ );
"name" : "Keyword",
"identifier" : "q"
}
]';
$this->parameters["By username"] = $this->parameters["By username"] = array(
'[ 'u'=>array('name'=>'Username')
{ );
"name" : "Username",
"identifier" : "u"
}
]';
} }
public function collectData(array $param){ public function collectData(array $param){

View file

@ -8,13 +8,9 @@ class FourchanBridge extends BridgeAbstract{
$this->uri = "https://www.4chan.org/"; $this->uri = "https://www.4chan.org/";
$this->description = "Returns posts from the specified thread"; $this->description = "Returns posts from the specified thread";
$this->parameters[] = $this->parameters[] = array(
'[ 't'=>array('name'=>'Thread URL')
{ );
"name" : "Thread URL",
"identifier" : "t"
}
]';
} }

View file

@ -9,19 +9,15 @@ class Freenews extends RssExpander {
$this->uri = "http://freenews.fr"; $this->uri = "http://freenews.fr";
$this->description = "Un site d'actualité pour les freenautes (mais ne parlant pas que de la freebox). Ne rentrez pas d'id si vous voulez accéder aux actualités générales."; $this->description = "Un site d'actualité pour les freenautes (mais ne parlant pas que de la freebox). Ne rentrez pas d'id si vous voulez accéder aux actualités générales.";
$this->parameters[] = $this->parameters[] = array(
'[ 'id'=>array('name'=>'Id de la rubrique (sans le \'-\')')
{ );
"name" : "Id de la rubrique (sans le \'-\')",
"identifier" : "id"
}
]';
} }
public function collectData(array $param){ public function collectData(array $param){
parent::collectExpandableDatas($param, FREENEWS_RSS); parent::collectExpandableDatas($param, FREENEWS_RSS);
} }
protected function parseRSSItem($newsItem) { protected function parseRSSItem($newsItem) {
$item = new Item(); $item = new Item();
$item->title = trim($newsItem->title); $item->title = trim($newsItem->title);

View file

@ -8,104 +8,77 @@ class FuturaSciencesBridge extends BridgeAbstract {
$this->uri = 'http://www.futura-sciences.com/'; $this->uri = 'http://www.futura-sciences.com/';
$this->description = 'Returns the newest articles.'; $this->description = 'Returns the newest articles.';
$this->parameters[] = $this->parameters[] = array(
'[ 'feed'=> array(
{ 'name'=>'Feed',
"name" : "Feed", 'type'=>'list',
"type" : "list", 'values'=>array(
"identifier" : "feed", 'Les flux multi-magazines'=>array(
"values" : 'Les dernières actualités de Futura-Sciences'=>'actualites',
[ 'Les dernières définitions de Futura-Sciences'=>'definitions',
{ "name" : "---- Select ----", "value" : "" }, 'Les dernières photos de Futura-Sciences'=>'photos',
'Les dernières questions - réponses de Futura-Sciences'=>'questions-reponses',
{ "name" : "", "value" : "" }, 'Les derniers dossiers de Futura-Sciences'=>'dossiers'
{ "name" : "Les flux multi-magazines", "value" : "" }, ),
'Les flux Services'=> array(
{ "name" : "&nbsp;&nbsp;&nbsp;&nbsp;Les dernières actualités de Futura-Sciences", "value" : "actualites" }, 'Les cartes virtuelles de Futura-Sciences'=>'services/cartes-virtuelles',
{ "name" : "&nbsp;&nbsp;&nbsp;&nbsp;Les dernières définitions de Futura-Sciences", "value" : "definitions" }, 'Les fonds d\'écran de Futura-Sciences'=>'services/fonds-ecran'
{ "name" : "&nbsp;&nbsp;&nbsp;&nbsp;Les dernières photos de Futura-Sciences", "value" : "photos" }, ),
{ "name" : "&nbsp;&nbsp;&nbsp;&nbsp;Les dernières questions - réponses de Futura-Sciences", "value" : "questions-reponses" }, 'Les flux Santé'=>array(
{ "name" : "&nbsp;&nbsp;&nbsp;&nbsp;Les derniers dossiers de Futura-Sciences", "value" : "dossiers" }, 'Les dernières actualités de Futura-Santé'=>'sante/actualites',
'Les dernières définitions de Futura-Santé'=>'sante/definitions',
{ "name" : "", "value" : "" }, 'Les dernières questions-réponses de Futura-Santé'=>'sante/question-reponses',
{ "name" : "Les flux Services", "value" : "" }, 'Les derniers dossiers de Futura-Santé'=>'sante/dossiers'
),
{ "name" : "&nbsp;&nbsp;&nbsp;&nbsp;Les cartes virtuelles de Futura-Sciences", "value" : "services/cartes-virtuelles" }, 'Les flux High-Tech'=>array(
{ "name" : "&nbsp;&nbsp;&nbsp;&nbsp;Les fonds d\'écran de Futura-Sciences", "value" : "services/fonds-ecran" }, 'Les dernières actualités de Futura-High-Tech'=>'high-tech/actualites',
'Les dernières astuces de Futura-High-Tech'=>'high-tech/question-reponses',
{ "name" : "", "value" : "" }, 'Les dernières définitions de Futura-High-Tech'=>'high-tech/definitions',
{ "name" : "Les flux Santé", "value" : "" }, 'Les derniers dossiers de Futura-High-Tech'=>'high-tech/dossiers'
),
{ "name" : "&nbsp;&nbsp;&nbsp;&nbsp;Les dernières actualités de Futura-Santé", "value" : "sante/actualites" }, 'Les flux Espace'=>array(
{ "name" : "&nbsp;&nbsp;&nbsp;&nbsp;Les dernières définitions de Futura-Santé", "value" : "sante/definitions" }, 'Les dernières actualités de Futura-Espace'=>'espace/actualites',
{ "name" : "&nbsp;&nbsp;&nbsp;&nbsp;Les dernières questions-réponses de Futura-Santé", "value" : "sante/questions-reponses" }, 'Les dernières définitions de Futura-Espace'=>'espace/definitions',
{ "name" : "&nbsp;&nbsp;&nbsp;&nbsp;Les derniers dossiers de Futura-Santé", "value" : "sante/dossiers" }, 'Les dernières questions-réponses de Futura-Espace'=>'espace/question-reponses',
'Les derniers dossiers de Futura-Espace'=>'espace/dossiers'
{ "name" : "", "value" : "" }, ),
{ "name" : "Les flux High-Tech", "value" : "" }, 'Les flux Environnement'=>array(
'Les dernières actualités de Futura-Environnement'=>'environnement/actualites',
{ "name" : "&nbsp;&nbsp;&nbsp;&nbsp;Les dernières actualités de Futura High-Tech", "value" : "high-tech/actualites" }, 'Les dernières définitions de Futura-Environnement'=>'environnement/definitions',
{ "name" : "&nbsp;&nbsp;&nbsp;&nbsp;Les dernières astuces de Futura High-Tech", "value" : "high-tech/questions-reponses" }, 'Les dernières questions-réponses de Futura-Environnement'=>'environnement/question-reponses',
{ "name" : "&nbsp;&nbsp;&nbsp;&nbsp;Les dernières définitions de Futura High-Tech", "value" : "high-tech/definitions" }, 'Les derniers dossiers de Futura-Environnement'=>'environnement/dossiers'
{ "name" : "&nbsp;&nbsp;&nbsp;&nbsp;Les derniers dossiers de Futura High-Tech", "value" : "high-tech/dossiers" }, ),
'Les flux Maison'=>array(
{ "name" : "", "value" : "" }, 'Les dernières actualités de Futura-Maison'=>'maison/actualites',
{ "name" : "Les flux Espace", "value" : "" }, 'Les dernières astuces de Futura-Maison'=>'maison/question-reponses',
'Les dernières définitions de Futura-Maison'=>'maison/definitions',
{ "name" : "&nbsp;&nbsp;&nbsp;&nbsp;Les dernières actualités de Futura-Espace", "value" : "espace/actualites" }, 'Les derniers dossiers de Futura-Maison'=>'maison/dossiers'
{ "name" : "&nbsp;&nbsp;&nbsp;&nbsp;Les dernières définitions de Futura-Espace", "value" : "espace/definitions" }, ),
{ "name" : "&nbsp;&nbsp;&nbsp;&nbsp;Les dernières questions-réponses de Futura-Espace", "value" : "espace/questions-reponses" }, 'Les flux Nature'=>array(
{ "name" : "&nbsp;&nbsp;&nbsp;&nbsp;Les derniers dossiers de Futura-Espace", "value" : "espace/dossiers" }, 'Les dernières actualités de Futura-Nature'=>'nature/actualites',
'Les dernières définitions de Futura-Nature'=>'nature/definitions',
{ "name" : "", "value" : "" }, 'Les dernières questions-réponses de Futura-Nature'=>'nature/question-reponses',
{ "name" : "Les flux Environnement", "value" : "" }, 'Les derniers dossiers de Futura-Nature'=>'nature/dossiers'
),
{ "name" : "&nbsp;&nbsp;&nbsp;&nbsp;Les dernières actualités de Futura-Environnement", "value" : "environnement/actualites" }, 'Les flux Terre'=>array(
{ "name" : "&nbsp;&nbsp;&nbsp;&nbsp;Les dernières définitions de Futura-Environnement", "value" : "environnement/definitions" }, 'Les dernières actualités de Futura-Terre'=>'terre/actualites',
{ "name" : "&nbsp;&nbsp;&nbsp;&nbsp;Les dernières questions - réponses de Futura-Environnement", "value" : "environnement/questions-reponses" }, 'Les dernières définitions de Futura-Terre'=>'terre/definitions',
{ "name" : "&nbsp;&nbsp;&nbsp;&nbsp;Les derniers dossiers de Futura-Environnement", "value" : "environnement/dossiers" }, 'Les dernières questions-réponses de Futura-Terre'=>'terre/question-reponses',
'Les derniers dossiers de Futura-Terre'=>'terre/dossiers'
{ "name" : "", "value" : "" }, ),
{ "name" : "Les flux Maison", "value" : "" }, 'Les flux Matière'=>array(
'Les dernières actualités de Futura-Matière'=>'matiere/actualites',
{ "name" : "&nbsp;&nbsp;&nbsp;&nbsp;Les dernières actualités de Futura-Maison", "value" : "maison/actualites" }, 'Les dernières définitions de Futura-Matière'=>'matiere/definitions',
{ "name" : "&nbsp;&nbsp;&nbsp;&nbsp;Les dernières astuces de Futura-Maison", "value" : "maison/questions-reponses" }, 'Les dernières questions-réponses de Futura-Matière'=>'matiere/question-reponses',
{ "name" : "&nbsp;&nbsp;&nbsp;&nbsp;Les dernières définitions de Futura-Maison", "value" : "maison/definitions" }, 'Les derniers dossiers de Futura-Matière'=>'matiere/dossiers'
{ "name" : "&nbsp;&nbsp;&nbsp;&nbsp;Les derniers dossiers de Futura-Maison", "value" : "maison/dossiers" }, ),
'Les flux Mathématiques'=>array(
{ "name" : "", "value" : "" }, 'Les dernières actualités de Futura-Mathématiques'=>'mathematiques/actualites',
{ "name" : "Les flux Nature", "value" : "" }, 'Les derniers dossiers de Futura-Mathématiques'=>'mathematiques/dossiers'
)
{ "name" : "&nbsp;&nbsp;&nbsp;&nbsp;Les dernières actualités de Futura-Nature", "value" : "nature/actualites" }, )
{ "name" : "&nbsp;&nbsp;&nbsp;&nbsp;Les dernières définitions de Futura-Nature", "value" : "nature/definitions" }, )
{ "name" : "&nbsp;&nbsp;&nbsp;&nbsp;Les dernières questions-réponses de Futura-Nature", "value" : "nature/questions-reponses" }, );
{ "name" : "&nbsp;&nbsp;&nbsp;&nbsp;Les derniers dossiers de Futura-Nature", "value" : "nature/dossiers" },
{ "name" : "", "value" : "" },
{ "name" : "Les flux Terre", "value" : "" },
{ "name" : "&nbsp;&nbsp;&nbsp;&nbsp;Les dernières actualités de Futura-Terre", "value" : "terre/actualites" },
{ "name" : "&nbsp;&nbsp;&nbsp;&nbsp;Les dernières définitions de Futura-Terre", "value" : "terre/definitions" },
{ "name" : "&nbsp;&nbsp;&nbsp;&nbsp;Les dernières questions-réponses de Futura-Terre", "value" : "terre/questions-reponses" },
{ "name" : "&nbsp;&nbsp;&nbsp;&nbsp;Les derniers dossiers de Futura-Terre", "value" : "terre/dossiers" },
{ "name" : "", "value" : "" },
{ "name" : "Les flux Matière", "value" : "" },
{ "name" : "&nbsp;&nbsp;&nbsp;&nbsp;Les dernières actualités de Futura-Matière", "value" : "matiere/actualites" },
{ "name" : "&nbsp;&nbsp;&nbsp;&nbsp;Les dernières définitions de Futura-Matière", "value" : "matiere/definitions" },
{ "name" : "&nbsp;&nbsp;&nbsp;&nbsp;Les dernières questions-réponses de Futura-Matière", "value" : "matiere/questions-reponses" },
{ "name" : "&nbsp;&nbsp;&nbsp;&nbsp;Les derniers dossiers de Futura-Matière", "value" : "matiere/dossiers" },
{ "name" : "", "value" : "" },
{ "name" : "Les flux Mathématiques", "value" : "" },
{ "name" : "&nbsp;&nbsp;&nbsp;&nbsp;Les dernières actualités de Futura-Mathématiques", "value" : "mathematiques/actualites" },
{ "name" : "&nbsp;&nbsp;&nbsp;&nbsp;Les derniers dossiers de Futura-Mathématiques", "value" : "mathematiques/dossiers" }
]
}
]';
} }
public function collectData(array $param) { public function collectData(array $param) {

View file

@ -10,33 +10,18 @@ class GBAtempBridge extends BridgeAbstract {
$this->uri = 'http://gbatemp.net/'; $this->uri = 'http://gbatemp.net/';
$this->description = 'GBAtemp is a user friendly underground video game community.'; $this->description = 'GBAtemp is a user friendly underground video game community.';
$this->parameters[] = $this->parameters[] = array(
'[ 'type'=>array(
{ 'name'=>'Type',
"name" : "Type", 'type'=>'list',
"type" : "list", 'values'=>array(
"identifier" : "type", 'News'=>'N',
"values" : 'Reviews'=>'R',
[ 'Tutorials'=>'T',
{ 'Forum'=>'F'
"name" : "News", )
"value" : "N" )
}, );
{
"name" : "Reviews",
"value" : "R"
},
{
"name" : "Tutorials",
"value" : "T"
},
{
"name" : "Forum",
"value" : "F"
}
]
}
]';
} }
private function ExtractFromDelimiters($string, $start, $end) { private function ExtractFromDelimiters($string, $start, $end) {

View file

@ -11,13 +11,9 @@ class Gawker extends RssExpander{
$this->uri = "http://feeds.gawker.com/"; $this->uri = "http://feeds.gawker.com/";
$this->description = "A bridge allowing access to any of the numerous Gawker media blogs (Lifehacker, deadspin, Kotaku, Jezebel, and so on. Notice you have to give its id to find the RSS stream in gawker maze"; $this->description = "A bridge allowing access to any of the numerous Gawker media blogs (Lifehacker, deadspin, Kotaku, Jezebel, and so on. Notice you have to give its id to find the RSS stream in gawker maze";
$this->parameters[] = $this->parameters[] = array(
'[ 'site'=>array('name'=>'site id to put in uri between feeds.gawker.com and /full .. which is obviously not full AT ALL')
{ );
"name" : "site id to put in uri between feeds.gawker.com and /full .. which is obviously not full AT ALL",
"identifier" : "site"
}
]';
} }
@ -35,7 +31,7 @@ class Gawker extends RssExpander{
// $this->message("loading feed from ".$this->getURI()); // $this->message("loading feed from ".$this->getURI());
parent::collectExpandableDatas($param, $url); parent::collectExpandableDatas($param, $url);
} }
protected function parseRSSItem($newsItem) { protected function parseRSSItem($newsItem) {
$item = new Item(); $item = new Item();
$item->uri = trim($newsItem->link); $item->uri = trim($newsItem->link);

View file

@ -8,18 +8,13 @@ class GelbooruBridge extends BridgeAbstract{
$this->uri = "http://gelbooru.com/"; $this->uri = "http://gelbooru.com/";
$this->description = "Returns images from given page"; $this->description = "Returns images from given page";
$this->parameters[] = $this->parameters[] = array(
'[ 'p'=>array(
{ 'name'=>'page',
"name" : "page", 'type'=>'number'
"identifier" : "p", ),
"type" : "number" 't'=>array('name'=>'tags')
}, );
{
"name" : "tags",
"identifier" : "t"
}
]';
} }

View file

@ -10,22 +10,16 @@ class GiphyBridge extends BridgeAbstract{
$this->uri = "http://giphy.com/"; $this->uri = "http://giphy.com/";
$this->description = "Bridge for giphy.com"; $this->description = "Bridge for giphy.com";
$this->parameters["By tag"] = $this->parameters["By tag"] = array(
'[ 's'=>array('name'=>'search tag')
{ );
"name" : "search tag",
"identifier" : "s"
}
]';
$this->parameters["Without tag"] = $this->parameters["Without tag"] = array(
'[ 'n'=>array(
{ 'name'=>'max number of returned items',
"name" : "max number of returned items", 'type'=>'number'
"type" : "number", )
"identifier" : "n" );
}
]';
} }
public function collectData(array $param){ public function collectData(array $param){

View file

@ -13,22 +13,21 @@ class GithubIssueBridge extends BridgeAbstract{
$this->uri = ''; $this->uri = '';
$this->description = 'Returns the comments of a github project issue'; $this->description = 'Returns the comments of a github project issue';
$this->parameters[]= $this->parameters[]=array (
'[ 'u'=>array(
{ 'name'=>'User name',
"name" : "User name", 'required'=>true
"identifier" : "u" ),
}, 'p'=>array(
{ 'name'=>'Project name',
"name" : "Project name", 'required'=>true
"identifier" : "p" ),
}, 'i'=>array(
{ 'name'=>'Issue number',
"name" : "Issue number", 'type'=>'number',
"identifier" : "i" 'required'=>true
} )
);
]';
} }
public function collectData(array $param){ public function collectData(array $param){

View file

@ -13,30 +13,24 @@ class GitlabCommitsBridge extends BridgeAbstract{
$this->uri = ''; $this->uri = '';
$this->description = 'Returns the commits of a project hosted on a gitlab instance'; $this->description = 'Returns the commits of a project hosted on a gitlab instance';
$this->parameters[] = $this->parameters[] = array(
'[ 'uri'=>array(
{ 'name'=>'Base URI',
"name" : "Base URI", 'defaultValue'=>'https://gitlab.com'
"identifier" : "uri", ),
"defaultValue":"https://gitlab.com" 'u'=>array(
}, 'name'=>'User name',
{ 'required'=>true
"name" : "User name", ),
"identifier" : "u", 'p'=>array(
"required": true 'name'=>'Project name',
}, 'required'=>true
{ ),
"name" : "Project name", 'b'=>array(
"identifier" : "p", 'name'=>'Project branch',
"required":true 'defaultValue'=>'master'
}, )
{ );
"name" : "Project branch",
"identifier" : "b",
"defaultValue":"master"
}
]';
} }
public function collectData(array $param){ public function collectData(array $param){

View file

@ -11,13 +11,9 @@ class GooglePlusPostBridge extends BridgeAbstract
$this->uri = "http://plus.google.com/"; $this->uri = "http://plus.google.com/";
$this->description = "Returns user public post (without API)."; $this->description = "Returns user public post (without API).";
$this->parameters[] = $this->parameters[] = array(
'[ 'username'=>array('name'=>'username or Id')
{ );
"name" : "username or Id",
"identifier" : "username"
}
]';
} }

View file

@ -18,13 +18,9 @@ class GoogleSearchBridge extends BridgeAbstract{
$this->uri = "https://www.google.com/"; $this->uri = "https://www.google.com/";
$this->description = "Returns most recent results from Google search."; $this->description = "Returns most recent results from Google search.";
$this->parameters[] = $this->parameters[] = array(
'[ 'q'=>array('name'=>"keyword")
{ );
"name" : "keyword",
"identifier" : "q"
}
]';
} }

View file

@ -11,22 +11,14 @@ class HDWallpapersBridge extends BridgeAbstract {
$this->uri = "http://www.hdwallpapers.in/"; $this->uri = "http://www.hdwallpapers.in/";
$this->description = "Returns the latests wallpapers from HDWallpapers"; $this->description = "Returns the latests wallpapers from HDWallpapers";
$this->parameters[] = $this->parameters[] = array(
'[ 'c'=>array('name'=>'category'),
{ 'm'=>array('name'=>'max number of wallpapers'),
"name" : "category", 'r'=>array(
"identifier" : "c" 'name'=>'resolution',
}, 'exampleValue'=>'1920x1200, 1680x1050,…'
{ )
"name" : "max number of wallpapers", );
"identifier" : "m"
},
{
"name" : "resolution",
"identifier" : "r",
"exampleValue" : "1920x1200, 1680x1050, ..."
}
]';
} }
public function collectData(array $param){ public function collectData(array $param){

View file

@ -10,13 +10,9 @@ class IdenticaBridge extends BridgeAbstract{
$this->uri = "https://identi.ca/"; $this->uri = "https://identi.ca/";
$this->description = "Returns user timelines"; $this->description = "Returns user timelines";
$this->parameters[] = $this->parameters[] = array(
'[ 'u'=>array('name'=>'username')
{ );
"name" : "username",
"identifier" : "u"
}
]';
} }

View file

@ -10,13 +10,9 @@ class InstagramBridge extends BridgeAbstract{
$this->uri = "http://instagram.com/"; $this->uri = "http://instagram.com/";
$this->description = "Returns the newest images"; $this->description = "Returns the newest images";
$this->parameters[] = $this->parameters[] = array(
'[ 'u'=>array('name'=>'username')
{ );
"name" : "username",
"identifier" : "u"
}
]';
} }

View file

@ -11,164 +11,82 @@ class IsoHuntBridge extends BridgeAbstract{
* Notice: The categories "News" and "Top Searches" are received from the main page * Notice: The categories "News" and "Top Searches" are received from the main page
* Elements are sorted by name ascending! * Elements are sorted by name ascending!
*/ */
$this->parameters['By "Latest" category'] = $this->parameters['By "Latest" category'] = array(
'[ 'latest_category'=>array(
{ 'name'=>'Latest category',
"name" : "Latest category", 'type'=>'list',
"identifier" : "latest_category", 'required'=>true,
"type" : "list", 'title'=>'Select your category',
"required" : true, 'defaultValue'=>'News',
"title" : "Select your category", 'values'=>array(
"defaultValue" : "News", 'Hot Torrents'=>'hot_torrents',
"values" : 'News'=>'news',
[ 'Releases'=>'releases',
{ 'Torrents'=>'torrents'
"name" : "Hot Torrents", )
"value" : "hot_torrents" )
}, );
{
"name" : "News",
"value" : "news"
},
{
"name" : "Releases",
"value" : "releases"
},
{
"name" : "Torrents",
"value" : "torrents"
}
]
}
]';
/* /*
* Get feeds for one of the "torrent" categories * Get feeds for one of the "torrent" categories
* Make sure to add new categories also to get_torrent_category_index($)! * Make sure to add new categories also to get_torrent_category_index($)!
* Elements are sorted by name ascending! * Elements are sorted by name ascending!
*/ */
$this->parameters['By "Torrent" category'] = $this->parameters['By "Torrent" category'] = array(
'[ 'torrent_category'=>array(
{ 'name'=>'Torrent category',
"name" : "Torrent category", 'type'=>'list',
"identifier" : "torrent_category", 'required'=>true,
"type" : "list", 'title'=>'Select your category',
"required" : true, 'defaultValue'=>'Anime',
"title" : "Select your category", 'values'=>array(
"defaultValue" : "Anime", 'Adult'=>'adult',
"values" : 'Anime'=>'anime',
[ 'Books'=>'books',
{ 'Games'=>'games',
"name" : "Adult", 'Movies'=>'movies',
"value" : "adult" 'Music'=>'music',
}, 'Other'=>'other',
{ 'Series & TV'=>'series_tv',
"name" : "Anime", 'Software'=>'software'
"value" : "anime" )
}, ),
{ 'torrent_popularity'=>array(
"name" : "Books", 'name'=>'Sort by popularity',
"value" : "books" 'type'=>'checkbox',
}, 'title'=>'Activate to receive results by popularity'
{ )
"name" : "Games", );
"value" : "games"
},
{
"name" : "Movies",
"value" : "movies"
},
{
"name" : "Music",
"value" : "music"
},
{
"name" : "Other",
"value" : "other"
},
{
"name" : "Series & TV",
"value" : "series_tv"
},
{
"name" : "Software",
"value" : "software"
}
]
},
{
"name" : "Sort by popularity",
"identifier" : "torrent_popularity",
"type" : "checkbox",
"title" : "Activate to receive results by popularity"
}
]';
/* /*
* Get feeds for a specific search request * Get feeds for a specific search request
*/ */
$this->parameters['Search torrent by name'] = $this->parameters['Search torrent by name'] = array(
'[ 'search_name'=>array(
{ 'name'=>'Name',
"name" : "Name", 'required'=>true,
"identifier" : "search_name", 'title'=>'Insert your search query',
"type" : "text", 'exampleValue'=>'Bridge'
"required" : true, ),
"title" : "Insert your search query", 'search_category'=>array(
"exampleValue" : "Bridge" 'name'=>'Category',
}, 'type'=>'list',
{ 'title'=>'Select your category',
"name" : "Category", 'defaultValue'=>'All',
"identifier" : "search_category", 'values'=>array(
"type" : "list", 'Adult'=>'adult',
"required" : false, 'All'=>'all',
"title" : "Select your category", 'Anime'=>'anime',
"defaultValue" : "All", 'Books'=>'books',
"values" : 'Games'=>'games',
[ 'Movies'=>'movies',
{ 'Music'=>'music',
"name" : "Adult", 'Other'=>'other',
"value" : "adult" 'Series & TV'=>'series_tv',
}, 'Software'=>'software'
{ )
"name" : "All", )
"value" : "all" );
},
{
"name" : "Anime",
"value" : "anime"
},
{
"name" : "Books",
"value" : "books"
},
{
"name" : "Games",
"value" : "games"
},
{
"name" : "Movies",
"value" : "movies"
},
{
"name" : "Music",
"value" : "music"
},
{
"name" : "Other",
"value" : "other"
},
{
"name" : "Series & TV",
"value" : "series_tv"
},
{
"name" : "Software",
"value" : "software"
}
]
}
]';
} }
public function collectData(array $params){ public function collectData(array $params){
@ -215,13 +133,13 @@ class IsoHuntBridge extends BridgeAbstract{
} }
private function get_torrent_category_name($category){ private function get_torrent_category_name($category){
$parameter = json_decode($this->parameters['By "Torrent" category'], true); $parameter = $this->parameters['By "Torrent" category'];
$languages = $parameter[0]['values']; $languages = $parameter['torrent_category']['values'];
foreach($languages as $name=>$value)
if(strtolower(trim($value)) === strtolower(trim($category)))
return $name;
foreach($languages as $language)
if(strtolower(trim($language['value'])) === strtolower(trim($category)))
return $language['name'];
return 'Unknown category'; return 'Unknown category';
} }
@ -244,19 +162,19 @@ class IsoHuntBridge extends BridgeAbstract{
private function request_latest_category($category){ private function request_latest_category($category){
switch($category){ switch($category){
case 'hot_torrents': case 'hot_torrents':
$this->name = 'Latest hot torrents - ' . $this->name; $this->name = 'Latest hot torrents - ' . $this->name;
$this->uri .= '/statistic/hot/torrents'; $this->uri .= '/statistic/hot/torrents';
break; break;
case 'news': case 'news':
$this->name = 'Latest news - ' . $this->name; $this->name = 'Latest news - ' . $this->name;
$this->uri .= '/'; $this->uri .= '/';
break; break;
case 'releases': case 'releases':
$this->name = 'Latest releases - ' . $this->name; $this->name = 'Latest releases - ' . $this->name;
$this->uri .= '/releases.php'; $this->uri .= '/releases.php';
break; break;
case 'torrents': case 'torrents':
$this->name = 'Latest torrents - ' . $this->name; $this->name = 'Latest torrents - ' . $this->name;
$this->uri .= '/latest.php'; $this->uri .= '/latest.php';
break; break;
@ -288,13 +206,13 @@ class IsoHuntBridge extends BridgeAbstract{
} }
private function get_search_category_name($category){ private function get_search_category_name($category){
$parameter = json_decode($this->parameters['Search torrent by name'], true); $parameter = $this->parameters['Search torrent by name'];
$languages = $parameter[1]['values']; $languages = $parameter['search_category']['values'];
foreach($languages as $name=>$value)
if(strtolower(trim($value)) === strtolower(trim($category)))
return $name;
foreach($languages as $language)
if(strtolower(trim($language['value'])) === strtolower(trim($category)))
return $language['name'];
return 'Unknown category'; return 'Unknown category';
} }
@ -332,7 +250,7 @@ class IsoHuntBridge extends BridgeAbstract{
$item->uri = $this->fix_relative_uri($anchor->href); $item->uri = $this->fix_relative_uri($anchor->href);
$item->title = $anchor->title; $item->title = $anchor->title;
// $item->author = // $item->author =
$item->timestamp = strtotime($date->plaintext); $item->timestamp = strtotime($date->plaintext);
$item->content = $this->fix_relative_uri($torrent->innertext); $item->content = $this->fix_relative_uri($torrent->innertext);
@ -370,9 +288,9 @@ class IsoHuntBridge extends BridgeAbstract{
$item->uri = $element->href; $item->uri = $element->href;
$item->title = $element->plaintext; $item->title = $element->plaintext;
// $item->author = // $item->author =
// $item->timestamp = // $item->timestamp =
// $item->content = // $item->content =
$this->items[] = $item; $this->items[] = $item;
} }
@ -453,7 +371,7 @@ class IsoHuntBridge extends BridgeAbstract{
$content = $post->find('div', 0); $content = $post->find('div', 0);
if(!$content) if(!$content)
$this->returnServerError('Unable to find content!'); $this->returnServerError('Unable to find content!');
// Remove <h2>...</h2> (title) // Remove <h2>...</h2> (title)
foreach($content->find('h2') as $element){ foreach($content->find('h2') as $element){
$element->outertext = ''; $element->outertext = '';
@ -497,7 +415,7 @@ class IsoHuntBridge extends BridgeAbstract{
$cell = $torrent->find('td.title-row', 0); $cell = $torrent->find('td.title-row', 0);
if(!$cell) if(!$cell)
$this->returnServerError('Unable to find title cell!'); $this->returnServerError('Unable to find title cell!');
$title = $cell->find('span', 0); $title = $cell->find('span', 0);
if(!$title) if(!$title)
$this->returnServerError('Unable to find title!'); $this->returnServerError('Unable to find title!');
@ -509,7 +427,7 @@ class IsoHuntBridge extends BridgeAbstract{
$cell = $torrent->find('td.title-row', 0); $cell = $torrent->find('td.title-row', 0);
if(!$cell) if(!$cell)
$this->returnServerError('Unable to find title cell!'); $this->returnServerError('Unable to find title cell!');
$uri = $cell->find('a', 0); $uri = $cell->find('a', 0);
if(!$uri) if(!$uri)
$this->returnServerError('Unable to find uri!'); $this->returnServerError('Unable to find uri!');
@ -521,7 +439,7 @@ class IsoHuntBridge extends BridgeAbstract{
$cell = $torrent->find('td.user-row', 0); $cell = $torrent->find('td.user-row', 0);
if(!$cell) if(!$cell)
return; // No author return; // No author
$user = $cell->find('a', 0); $user = $cell->find('a', 0);
if(!$user) if(!$user)
$this->returnServerError('Unable to find user!'); $this->returnServerError('Unable to find user!');
@ -545,7 +463,7 @@ class IsoHuntBridge extends BridgeAbstract{
$html = $this->getSimpleHTMLDOM($uri); $html = $this->getSimpleHTMLDOM($uri);
if(!$html) if(!$html)
$this->returnServerError('Unable to load ' . $uri . '!'); $this->returnServerError('Unable to load ' . $uri . '!');
return $html; return $html;
} }

View file

@ -6,25 +6,16 @@ class JapanExpoBridge extends BridgeAbstract{
$this->name = 'Japan Expo Actualités'; $this->name = 'Japan Expo Actualités';
$this->uri = 'http://www.japan-expo-paris.com/fr/actualites'; $this->uri = 'http://www.japan-expo-paris.com/fr/actualites';
$this->description = 'Returns most recent entries from Japan Expo actualités.'; $this->description = 'Returns most recent entries from Japan Expo actualités.';
$this->parameters[] = $this->parameters[] = array(
'[ 'mode'=>array(
{ 'name'=>'Mode',
"name" : "Mode", 'type'=>'list',
"type" : "list", 'values'=>array(
"identifier" : "mode", 'Titles only'=>'light',
"values" : 'Full Contents'=>'full'
[ )
{ )
"name" : "Titles only", );
"value" : "light"
},
{
"name" : "Full Contents",
"value" : "full"
}
]
}
]';
} }
public function collectData(array $param) { public function collectData(array $param) {

View file

@ -8,18 +8,13 @@ class KonachanBridge extends BridgeAbstract{
$this->uri = "http://konachan.com/"; $this->uri = "http://konachan.com/";
$this->description = "Returns images from given page"; $this->description = "Returns images from given page";
$this->parameters[] = $this->parameters[] = array(
'[ 'p'=>array(
{ 'name'=>'page',
"name" : "page", 'type'=>'number'
"identifier" : "p", ),
"type" : "number" 't'=>array('name'=>'tags')
}, );
{
"name" : "tags",
"identifier" : "t"
}
]';
} }
public function collectData(array $param){ public function collectData(array $param){

View file

@ -6,56 +6,37 @@ class KununuBridge extends BridgeAbstract{
$this->uri = "https://www.kununu.com"; /* This will be replaced later! */ $this->uri = "https://www.kununu.com"; /* This will be replaced later! */
$this->description = "Returns the latest reviews for a company and site of your choice."; $this->description = "Returns the latest reviews for a company and site of your choice.";
$this->parameters['global'] = $this->parameters['global'] = array(
'[ 'site'=>array(
{ 'name'=>'Site',
"name" : "Site", 'type'=>'list',
"identifier" : "site", 'required'=>true,
"type" : "list", 'exampleValue'=>'United States',
"required" : true, 'title'=>'Select your site',
"exampleValue" : "United States", 'values'=>array(
"title" : "Select your site", 'Austria'=>'at',
"values" : 'Germany'=>'de',
[ 'Switzerland'=>'ch',
{ 'United States'=>'us'
"name" : "Austria", )
"value" : "at" ),
}, 'full'=>array(
{ 'name'=>'Load full article',
"name" : "Germany", 'type'=>'checkbox',
"value" : "de" 'required'=>false,
}, 'exampleValue'=>'checked',
{ 'title'=>'Activate to load full article'
"name" : "Switzerland", )
"value" : "ch" );
},
{
"name" : "United States",
"value" : "us"
}
]
},
{
"name" : "Load full article",
"identifier" : "full",
"type" : "checkbox",
"required" : false,
"exampleValue" : "checked",
"title" : "Activate to load full article"
}
]';
$this->parameters[] = $this->parameters[] = array(
'[ 'company'=>array(
{ 'name'=>'Company',
"name" : "Company", 'required'=>true,
"identifier" : "company", 'exampleValue'=>'kununu-us',
"type" : "text", 'title'=>'Insert company name (i.e. Kununu US) or URI path (i.e. kununu-us)'
"required" : true, )
"exampleValue" : "kununu-us", );
"title" : "Insert company name (i.e. Kununu US) or URI path (i.e. kununu-us)"
}
]';
} }
public function collectData(array $params){ public function collectData(array $params){
@ -132,17 +113,17 @@ class KununuBridge extends BridgeAbstract{
return 86400; // 1 day return 86400; // 1 day
} }
/** /**
* Returns true if the given site is part of the parameters list * Returns true if the given site is part of the parameters list
*/ */
private function site_is_valid($site){ private function site_is_valid($site){
$parameter = json_decode($this->parameters['global'], true); $parameter = $this->parameters['global'];
$sites = $parameter[0]['values']; $sites = $parameter['site']['values'];
$site_names = array(); $site_names = array();
foreach($sites as $site_item) foreach($sites as $name=>$value)
$site_names[] = $site_item['value']; $site_names[] = $value;
return in_array($site, $site_names); return in_array($site, $site_names);
} }
@ -171,11 +152,11 @@ class KununuBridge extends BridgeAbstract{
$panel = $html->find('div.panel', 0); $panel = $html->find('div.panel', 0);
if($panel === false) if($panel === false)
$this->returnServerError('Cannot find panel for company name!'); $this->returnServerError('Cannot find panel for company name!');
$company_name = $panel->find('h1', 0); $company_name = $panel->find('h1', 0);
if($company_name === false) if($company_name === false)
$this->returnServerError('Cannot find company name!'); $this->returnServerError('Cannot find company name!');
return $company_name->plaintext; return $company_name->plaintext;
} }
@ -187,7 +168,7 @@ class KununuBridge extends BridgeAbstract{
$date = $article->find('time[itemprop=dtreviewed]', 0); $date = $article->find('time[itemprop=dtreviewed]', 0);
if($date === false) if($date === false)
$this->returnServerError('Cannot find article date!'); $this->returnServerError('Cannot find article date!');
return strtotime($date->datetime); return strtotime($date->datetime);
} }
@ -198,7 +179,7 @@ class KununuBridge extends BridgeAbstract{
$rating = $article->find('span.rating', 0); $rating = $article->find('span.rating', 0);
if($rating === false) if($rating === false)
$this->returnServerError('Cannot find article rating!'); $this->returnServerError('Cannot find article rating!');
return $rating->getAttribute('aria-label'); return $rating->getAttribute('aria-label');
} }
@ -209,7 +190,7 @@ class KununuBridge extends BridgeAbstract{
$summary = $article->find('[itemprop=summary]', 0); $summary = $article->find('[itemprop=summary]', 0);
if($summary === false) if($summary === false)
$this->returnServerError('Cannot find article summary!'); $this->returnServerError('Cannot find article summary!');
return strip_tags($summary->innertext); return strip_tags($summary->innertext);
} }
@ -225,7 +206,7 @@ class KununuBridge extends BridgeAbstract{
$anchor = $summary->find('a', 0); $anchor = $summary->find('a', 0);
if($anchor === false) if($anchor === false)
$this->returnServerError('Cannot find article URI!'); $this->returnServerError('Cannot find article URI!');
return 'https://www.kununu.com' . $anchor->href; return 'https://www.kununu.com' . $anchor->href;
} }
@ -246,7 +227,7 @@ class KununuBridge extends BridgeAbstract{
break; break;
} }
} }
return $author_position; return $author_position;
} }
@ -257,7 +238,7 @@ class KununuBridge extends BridgeAbstract{
$description = $article->find('div[itemprop=description]', 0); $description = $article->find('div[itemprop=description]', 0);
if($description === false) if($description === false)
$this->returnServerError('Cannot find article description!'); $this->returnServerError('Cannot find article description!');
return $this->fix_url($description->innertext); return $this->fix_url($description->innertext);
} }

View file

@ -8,223 +8,132 @@ class LeBonCoinBridge extends BridgeAbstract{
$this->uri = "http://www.leboncoin.fr"; $this->uri = "http://www.leboncoin.fr";
$this->description = "Returns most recent results from LeBonCoin for a region, and optionally a category and a keyword ."; $this->description = "Returns most recent results from LeBonCoin for a region, and optionally a category and a keyword .";
$this->parameters[] = $this->parameters[] = array(
'[ 'k'=>array('name'=>'Mot Clé'),
'r'=>array(
{ 'name'=>'Région',
"name" : "Mot Clé", 'type'=>'list',
"identifier" : "k" 'values'=>array(
}, 'Alsace'=>'alsace',
'Aquitaine'=>'aquitaine',
{ 'Auvergne'=>'auvergne',
"name" : "Région", 'Basse Normandie'=>'basse_normandie',
"identifier" : "r", 'Bourgogne'=>'bourgogne',
"type" : "list", 'Bretagne'=>'bretagne',
"values" : [ 'Centre'=>'centre',
{ 'Champagne Ardenne'=>'champagne_ardenne',
"name" : "Alsace", 'Corse'=>'corse',
"value" : "alsace" 'Franche Comté'=>'franche_comte',
}, 'Haute Normandie'=>'haute_normandie',
{ 'Ile de France'=>'ile_de_france',
"name" : "Aquitaine", 'Languedoc Roussillon'=>'languedoc_roussillon',
"value" : "aquitaine" 'Limousin'=>'limousin',
}, 'Lorraine'=>'lorraine',
{ 'Midi Pyrénées'=>'midi_pyrenees',
"name" : "Auvergne", 'Nord Pas De Calais'=>'nord_pas_de_calais',
"value" : "auvergne" 'Pays de la Loire'=>'pays_de_la_loire',
}, 'Picardie'=>'picardie',
{ 'Poitou Charentes'=>'poitou_charentes',
"name" : "Basse Normandie", 'Provence Alpes Côte d\'Azur'=>'provence_alpes_cote_d_azur',
"value" : "basse_normandie" 'Rhône-Alpes'=>'rhone_alpes',
}, 'Guadeloupe'=>'guadeloupe',
{ 'Martinique'=>'martinique',
"name" : "Bourgogne", 'Guyane'=>'guyane',
"value" : "bourgogne" 'Réunion'=>'reunion'
}, )
{ ),
"name" : "Bretagne", 'c'=>array(
"value" : "bretagne" 'name'=>'Catégorie',
}, 'type'=>'list',
{ 'values'=>array(
"name" : "Centre", 'EMPLOI'=>'_emploi_',
"value" : "centre" 'VEHICULES'=>array(
}, 'Tous'=>'_vehicules_',
{ 'Voitures'=>'voitures',
"name" : "Champagne Ardenne", 'Motos'=>'motos',
"value" : "champagne_ardenne" 'Caravaning'=>'caravaning',
}, 'Utilitaires'=>'utilitaires',
{ 'Équipement Auto'=>'equipement_auto',
"name" : "Corse", 'Équipement Moto'=>'equipement_moto',
"value" : "corse" 'Équipement Caravaning'=>'equipement_caravaning',
}, 'Nautisme'=>'nautisme',
{ 'Équipement Nautisme'=>'equipement_nautisme'
"name" : "Franche Comté", ),
"value" : "franche_comte" 'IMMOBILIER'=>array(
}, 'Tous'=>'_immobilier_',
{ 'Ventes immobilières'=>'ventes_immobilieres',
"name" : "Haute Normandie", 'Locations'=>'locations',
"value" : "haute_normandie" 'Colocations'=>'colocations',
}, 'Bureaux & Commerces'=>'bureaux_commerces'
{ ),
"name" : "Ile de France", 'VACANCES'=>array(
"value" : "ile_de_france" 'Tous'=>'_vacances_',
}, 'Location gîtes'=>'locations_gites',
{ 'Chambres d\'hôtes'=>'chambres_d_hotes',
"name" : "Languedoc Roussillon", 'Campings'=>'campings',
"value" : "languedoc_roussillon" 'Hôtels'=>'hotels',
}, 'Hébergements insolites'=>'hebergements_insolites'
{ ),
"name" : "Limousin", 'MULTIMEDIA'=>array(
"value" : "limousin" 'Tous'=>'_multumedia_',
}, 'Informatique'=>'informatique',
{ 'Consoles & Jeux vidéo'=>'consoles_jeux_video',
"name" : "Lorraine", 'Image & Son'=>'image_son',
"value" : "lorraine" 'Téléphonie'=>'telephonie'
}, ),
{ 'LOISIRS'=>array(
"name" : "Midi Pyrénées", 'Tous'=>'_loisirs_',
"value" : "midi_pyrenees" 'DVD / Films'=>'dvd_films',
}, 'CD / Musique'=>'cd_musique',
{ 'Livres'=>'livres',
"name" : "Nord Pas De Calais", 'Animaux'=>'animaux',
"value" : "nord_pas_de_calais" 'Vélos'=>'velos',
}, 'Sports & Hobbies'=>'sports_hobbies',
{ 'Instruments de musique'=>'instruments_de_musique',
"name" : "Pays de la Loire", 'Collection'=>'collection',
"value" : "pays_de_la_loire" 'Jeux & Jouets'=>'jeux_jouets',
}, 'Vins & Gastronomie'=>'vins_gastronomie'
{ ),
"name" : "Picardie", 'MATÉRIEL PROFESSIONNEL'=>array(
"value" : "picardie" 'Tous'=>'_materiel_professionnel_',
}, 'Matériel Agricole'=>'mateiel_agricole',
{ 'Transport - Manutention'=>'transport_manutention',
"name" : "Poitou Charentes", 'BTP - Chantier - Gros-œuvre'=>'btp_chantier_gros_oeuvre',
"value" : "poitou_charentes" 'Outillage - Matériaux 2nd-œuvre'=>'outillage_materiaux_2nd_oeuvre',
}, 'Équipements Industriels'=>'equipement_industriels',
{ 'Restauration - Hôtellerie'=>'restauration_hotellerie',
"name" : "Provence Alpes Côte d\'Azur", 'Fournitures de Bureau'=>'fournitures_de_bureau',
"value" : "provence_alpes_cote_d_azur" 'Commerces & Marchés'=>'commerces_marches',
}, 'Matériel médical'=>'materiel_medical'
{ ),
"name" : "Rhône-Alpes", 'SERVICES'=>array(
"value" : "rhone_alpes" 'Tous'=>'_services_',
}, 'Prestations de services'=>'prestations_de_services',
{ 'Billetterie'=>'billetterie',
"name" : "Guadeloupe", 'Évènements'=>'evenements',
"value" : "guadeloupe" 'Cours particuliers'=>'cours_particuliers',
}, 'Covoiturage'=>'covoiturage'
{ ),
"name" : "Martinique", 'MAISON'=>array(
"value" : "martinique" 'Tous'=>'_maison_',
}, 'Ameublement'=>'ameublement',
{ 'Électroménager'=>'electromenager',
"name" : "Guyane", 'Arts de la table'=>'arts_de_la_table',
"value" : "guyane" 'Décoration'=>'decoration',
}, 'Linge de maison'=>'linge_de_maison',
{ 'Bricolage'=>'bricolage',
"name" : "Réunion", 'Jardinage'=>'jardinage',
"value" : "reunion" 'Vêtements'=>'vetements',
} 'Chaussures'=>'chaussures',
] 'Accessoires & Bagagerie'=>'accessoires_bagagerie',
}, 'Montres & Bijoux'=>'montres_bijoux',
{ 'Équipement bébé'=>'equipement_bebe',
"name" : "Catégorie", 'Vêtements bébé'=>'vetements_bebe'
"identifier" : "c", ),
"type" : "list", 'AUTRES'=>'autres'
"values" : [ )
{ "name" : "---- Select ----", "value" : "" }, )
);
{ "name" : "", "value" : "" },
{ "name" : "EMPLOI", "value" : "_emploi_" },
{ "name" : "", "value" : "" },
{ "name" : "VEHICULES", "value" : "_vehicules_" },
{ "name" : "&nbsp;&nbsp;&nbsp;&nbsp;Voitures", "value" : "voitures" },
{ "name" : "&nbsp;&nbsp;&nbsp;&nbsp;Motos", "value" : "motos" },
{ "name" : "&nbsp;&nbsp;&nbsp;&nbsp;Caravaning", "value" : "caravaning" },
{ "name" : "&nbsp;&nbsp;&nbsp;&nbsp;Utilitaires", "value" : "utilitaires" },
{ "name" : "&nbsp;&nbsp;&nbsp;&nbsp;Equipement Auto", "value" : "equipement_auto" },
{ "name" : "&nbsp;&nbsp;&nbsp;&nbsp;Equipement Moto", "value" : "equipement_moto" },
{ "name" : "&nbsp;&nbsp;&nbsp;&nbsp;Equipement Caravaning", "value" : "equipement_caravaning" },
{ "name" : "&nbsp;&nbsp;&nbsp;&nbsp;Nautisme", "value" : "nautisme" },
{ "name" : "&nbsp;&nbsp;&nbsp;&nbsp;Equipement Nautisme", "value" : "equipement_nautisme" },
{ "name" : "", "value" : "" },
{ "name" : "IMMOBILIER", "value" : "_immobilier_" },
{ "name" : "&nbsp;&nbsp;&nbsp;&nbsp;Ventes immobilieres", "value" : "ventes_immobilieres" },
{ "name" : "&nbsp;&nbsp;&nbsp;&nbsp;Locations", "value" : "locations" },
{ "name" : "&nbsp;&nbsp;&nbsp;&nbsp;Colocations", "value" : "colocations" },
{ "name" : "&nbsp;&nbsp;&nbsp;&nbsp;Bureaux &amp; Commerces", "value" : "bureaux_commerces" },
{ "name" : "", "value" : "" },
{ "name" : "VACANCES", "value" : "_vacances_" },
{ "name" : "&nbsp;&nbsp;&nbsp;&nbsp;Locations gites", "value" : "locations_gites" },
{ "name" : "&nbsp;&nbsp;&nbsp;&nbsp;Chambres d\'hôtes", "value" : "chambres_d_hotes" },
{ "name" : "&nbsp;&nbsp;&nbsp;&nbsp;Campings", "value" : "campings" },
{ "name" : "&nbsp;&nbsp;&nbsp;&nbsp;Hôtels", "value" : "hotels" },
{ "name" : "&nbsp;&nbsp;&nbsp;&nbsp;Hébergements insolites", "value" : "hebergements_insolites" },
{ "name" : "", "value" : "" },
{ "name" : "MULTIMEDIA", "value" : "_multimedia_" },
{ "name" : "&nbsp;&nbsp;&nbsp;&nbsp;Informatique", "value" : "informatique" },
{ "name" : "&nbsp;&nbsp;&nbsp;&nbsp;Consoles & Jeux vidéo", "value" : "consoles_jeux_video" },
{ "name" : "&nbsp;&nbsp;&nbsp;&nbsp;Image & Son", "value" : "image_son" },
{ "name" : "&nbsp;&nbsp;&nbsp;&nbsp;Téléphonie", "value" : "telephonie" },
{ "name" : "", "value" : "" },
{ "name" : "LOISIRS", "value" : "_loisirs_" },
{ "name" : "&nbsp;&nbsp;&nbsp;&nbsp;DVD / Films", "value" : "dvd_films" },
{ "name" : "&nbsp;&nbsp;&nbsp;&nbsp;CD / Musique", "value" : "cd_musique" },
{ "name" : "&nbsp;&nbsp;&nbsp;&nbsp;Livres", "value" : "livres" },
{ "name" : "&nbsp;&nbsp;&nbsp;&nbsp;Animaux", "value" : "animaux" },
{ "name" : "&nbsp;&nbsp;&nbsp;&nbsp;Vélos", "value" : "velos" },
{ "name" : "&nbsp;&nbsp;&nbsp;&nbsp;Sports & Hobbies", "value" : "sports_hobbies" },
{ "name" : "&nbsp;&nbsp;&nbsp;&nbsp;Instruments de musique", "value" : "instruments_de_musique" },
{ "name" : "&nbsp;&nbsp;&nbsp;&nbsp;Collection", "value" : "collection" },
{ "name" : "&nbsp;&nbsp;&nbsp;&nbsp;Jeux & Jouets", "value" : "jeux_jouets" },
{ "name" : "&nbsp;&nbsp;&nbsp;&nbsp;Vins & Gastronomie", "value" : "vins_gastronomie" },
{ "name" : "", "value" : "" },
{ "name" : "MATERIEL PROFESSIONNEL", "value" : "_materiel_professionnel_" },
{ "name" : "&nbsp;&nbsp;&nbsp;&nbsp;Materiel Agricole", "value" : "materiel_agricole" },
{ "name" : "&nbsp;&nbsp;&nbsp;&nbsp;Transport - Manutention", "value" : "transport_manutention" },
{ "name" : "&nbsp;&nbsp;&nbsp;&nbsp;BTP - Chantier - Gros-oeuvre", "value" : "btp_chantier_gros_oeuvre" },
{ "name" : "&nbsp;&nbsp;&nbsp;&nbsp;Outillage - Materiaux 2nd-oeuvre", "value" : "outillage_materiaux_2nd_oeuvre" },
{ "name" : "&nbsp;&nbsp;&nbsp;&nbsp;Equipements Industriels", "value" : "equipements_industriels" },
{ "name" : "&nbsp;&nbsp;&nbsp;&nbsp;Restauration - Hôtellerie", "value" : "restauration_hotellerie" },
{ "name" : "&nbsp;&nbsp;&nbsp;&nbsp;Fournitures de Bureau", "value" : "fournitures_de_bureau" },
{ "name" : "&nbsp;&nbsp;&nbsp;&nbsp;Commerces & Marchés", "value" : "commerces_marches" },
{ "name" : "&nbsp;&nbsp;&nbsp;&nbsp;Matériel médical", "value" : "materiel_medical" },
{ "name" : "", "value" : "" },
{ "name" : "SERVICES", "value" : "_services_" },
{ "name" : "&nbsp;&nbsp;&nbsp;&nbsp;Prestations de services", "value" : "prestations_de_services" },
{ "name" : "&nbsp;&nbsp;&nbsp;&nbsp;Billetterie", "value" : "billetterie" },
{ "name" : "&nbsp;&nbsp;&nbsp;&nbsp;Evénements", "value" : "evenements" },
{ "name" : "&nbsp;&nbsp;&nbsp;&nbsp;Cours particuliers", "value" : "cours_particuliers" },
{ "name" : "&nbsp;&nbsp;&nbsp;&nbsp;Covoiturage", "value" : "covoiturage" },
{ "name" : "", "value" : "" },
{ "name" : "MAISON", "value" : "_maison_" },
{ "name" : "&nbsp;&nbsp;&nbsp;&nbsp;Ameublement", "value" : "ameublement" },
{ "name" : "&nbsp;&nbsp;&nbsp;&nbsp;Electroménager", "value" : "electromenager" },
{ "name" : "&nbsp;&nbsp;&nbsp;&nbsp;Arts de la table", "value" : "arts_de_la_table" },
{ "name" : "&nbsp;&nbsp;&nbsp;&nbsp;Décoration", "value" : "decoration" },
{ "name" : "&nbsp;&nbsp;&nbsp;&nbsp;Linge de maison", "value" : "linge_de_maison" },
{ "name" : "&nbsp;&nbsp;&nbsp;&nbsp;Bricolage", "value" : "bricolage" },
{ "name" : "&nbsp;&nbsp;&nbsp;&nbsp;Jardinage", "value" : "jardinage" },
{ "name" : "&nbsp;&nbsp;&nbsp;&nbsp;Vêtements", "value" : "vetements" },
{ "name" : "&nbsp;&nbsp;&nbsp;&nbsp;Chaussures", "value" : "chaussures" },
{ "name" : "&nbsp;&nbsp;&nbsp;&nbsp;Accessoires & Bagagerie", "value" : "accessoires_bagagerie" },
{ "name" : "&nbsp;&nbsp;&nbsp;&nbsp;Montres & Bijoux", "value" : "montres_bijoux" },
{ "name" : "&nbsp;&nbsp;&nbsp;&nbsp;Equipement bébé", "value" : "equipement_bebe" },
{ "name" : "&nbsp;&nbsp;&nbsp;&nbsp;Vêtements bébé", "value" : "vetements_bebe" },
{ "name" : "", "value" : "" },
{ "name" : "AUTRES", "value" : "autres" }
]
}
]';
} }

View file

@ -8,14 +8,12 @@ class LinkedInCompany extends BridgeAbstract{
$this->uri = "https://www.linkedin.com/"; $this->uri = "https://www.linkedin.com/";
$this->description = "Returns most recent actus from Company on LinkedIn. (https://www.linkedin.com/company/<strong style=\"font-weight:bold;\">apple</strong>)"; $this->description = "Returns most recent actus from Company on LinkedIn. (https://www.linkedin.com/company/<strong style=\"font-weight:bold;\">apple</strong>)";
$this->parameters[] = $this->parameters[] = array(
'[ 'c'=>array(
{ 'name'=>'Company name',
"name" : "Company name", 'required'=>true
"identifier" : "c", )
"required": true );
}
]';
} }
public function collectData(array $param){ public function collectData(array $param){

View file

@ -8,19 +8,13 @@ class LolibooruBridge extends BridgeAbstract{
$this->uri = "http://lolibooru.moe/"; $this->uri = "http://lolibooru.moe/";
$this->description = "Returns images from given page and tags"; $this->description = "Returns images from given page and tags";
$this->parameters[] = $this->parameters[] = array(
'[ 'p'=>array(
{ 'name'=>'page',
"name" : "page", 'type'=>'number'
"identifier" : "p", ),
"type" : "number" 't'=>array('name'=>'tags')
}, );
{
"name" : "tags",
"identifier" : "t"
}
]';
} }
public function collectData(array $param){ public function collectData(array $param){

View file

@ -9,193 +9,73 @@ class MangareaderBridge extends BridgeAbstract{
$this->uri = "http://www.mangareader.net"; $this->uri = "http://www.mangareader.net";
$this->description = "Returns the latest updates, popular mangas or manga updates (new chapters)"; $this->description = "Returns the latest updates, popular mangas or manga updates (new chapters)";
$this->parameters["Get latest updates"] = '[]'; $this->parameters["Get latest updates"] = array();
$this->parameters["Get popular mangas"] = $this->parameters["Get popular mangas"] = array(
'[ 'category'=>array(
{ 'name'=>'Category',
"name" : "Category", 'type'=>'list',
"identifier" : "category", 'required'=>true,
"type" : "list", 'values'=>array(
"required" : true, 'All'=>'all',
"values" : [ 'Action'=>'action',
{ 'Adventure'=>'adventure',
"name" : "All", 'Comedy'=>'comedy',
"value" : "all" 'Demons'=>'demons',
}, 'Drama'=>'drama',
{ 'Ecchi'=>'ecchi',
"name" : "Action", 'Fantasy'=>'fantasy',
"value" : "action" 'Gender Bender'=>'gender-bender',
}, 'Harem'=>'harem',
{ 'Historical'=>'historical',
"name" : "Adventure", 'Horror'=>'horror',
"value" : "adventure" 'Josei'=>'josei',
}, 'Magic'=>'magic',
{ 'Martial Arts'=>'martial-arts',
"name" : "Comedy", 'Mature'=>'mature',
"value" : "comedy" 'Mecha'=>'mecha',
}, 'Military'=>'military',
{ 'Mystery'=>'mystery',
"name" : "Demons", 'One Shot'=>'one-shot',
"value" : "demons" 'Psychological'=>'psychological',
}, 'Romance'=>'romance',
{ 'School Life'=>'school-life',
"name" : "Drama", 'Sci-Fi'=>'sci-fi',
"value" : "drama" 'Seinen'=>'seinen',
}, 'Shoujo'=>'shoujo',
{ 'Shoujoai'=>'shoujoai',
"name" : "Ecchi", 'Shounen'=>'shounen',
"value" : "ecchi" 'Shounenai'=>'shounenai',
}, 'Slice of Life'=>'slice-of-life',
{ 'Smut'=>'smut',
"name" : "Fantasy", 'Sports'=>'sports',
"value" : "fantasy" 'Super Power'=>'super-power',
}, 'Supernatural'=>'supernatural',
{ 'Tragedy'=>'tragedy',
"name" : "Gender Bender", 'Vampire'=>'vampire',
"value" : "gender-bender" 'Yaoi'=>'yaoi',
}, 'Yuri'=>'yuri'
{ ),
"name" : "Harem", 'exampleValue'=>'All',
"value" : "harem" 'title'=>'Select your category'
}, )
{ );
"name" : "Historical", $this->parameters["Get manga updates"] = array(
"value" : "historical" 'path'=>array(
}, 'name'=>'Path',
{ 'required'=>true,
"name" : "Horror", 'pattern'=>'[a-zA-Z0-9-_]*',
"value" : "horror" 'exampleValue'=>'bleach, umi-no-kishidan',
}, 'title'=>'URL part of desired manga'
{ ),
"name" : "Josei", 'limit'=>array(
"value" : "josei" 'name'=>'Limit',
}, 'type'=>'number',
{ 'exampleValue'=>10,
"name" : "Magic", 'title'=>'Number of items to return [-1 returns all]'
"value" : "magic" )
}, );
{
"name" : "Martial Arts",
"value" : "martial-arts"
},
{
"name" : "Mature",
"value" : "mature"
},
{
"name" : "Mecha",
"value" : "mecha"
},
{
"name" : "Military",
"value" : "military"
},
{
"name" : "Mystery",
"value" : "mystery"
},
{
"name" : "One Shot",
"value" : "one-shot"
},
{
"name" : "Psychological",
"value" : "psychological"
},
{
"name" : "Romance",
"value" : "romance"
},
{
"name" : "School Life",
"value" : "school-life"
},
{
"name" : "Sci-Fi",
"value" : "sci-fi"
},
{
"name" : "Seinen",
"value" : "seinen"
},
{
"name" : "Shoujo",
"value" : "shoujo"
},
{
"name" : "Shoujoai",
"value" : "shoujoai"
},
{
"name" : "Shounen",
"value" : "shounen"
},
{
"name" : "Shounenai",
"value" : "shounenai"
},
{
"name" : "Slice of Life",
"value" : "slice-of-life"
},
{
"name" : "Smut",
"value" : "smut"
},
{
"name" : "Sports",
"value" : "sports"
},
{
"name" : "Super Power",
"value" : "super-power"
},
{
"name" : "Supernatural",
"value" : "supernatural"
},
{
"name" : "Tragedy",
"value" : "tragedy"
},
{
"name" : "Vampire",
"value" : "vampire"
},
{
"name" : "Yaoi",
"value" : "yaoi"
},
{
"name" : "Yuri",
"value" : "yuri"
}
],
"exampleValue" : "All",
"title" : "Select your category"
}
]';
$this->parameters["Get manga updates"] =
'[
{
"name" : "Path",
"identifier" : "path",
"type" : "text",
"required" : true,
"pattern" : "[a-zA-Z0-9-_]*",
"exampleValue" : "bleach, umi-no-kishidan",
"title" : "URL part of desired manga"
},
{
"name" : "Limit",
"identifier" : "limit",
"type" : "number",
"exampleValue" : "10",
"title" : "Number of items to return.\n-1 returns all"
}
]';
} }
public function collectData(array $param){ public function collectData(array $param){
$this->request = ''; $this->request = '';
@ -203,7 +83,7 @@ class MangareaderBridge extends BridgeAbstract{
$type = "latest"; // can be "latest", "popular" or "path". Default is "latest"! $type = "latest"; // can be "latest", "popular" or "path". Default is "latest"!
$path = "latest"; $path = "latest";
$limit = MANGAREADER_LIMIT; $limit = MANGAREADER_LIMIT;
if(isset($param['category'])){ // Get popular updates if(isset($param['category'])){ // Get popular updates
$type = "popular"; $type = "popular";
$path = "popular"; $path = "popular";
@ -211,16 +91,16 @@ class MangareaderBridge extends BridgeAbstract{
$path .= "/" . $param['category']; $path .= "/" . $param['category'];
} }
} }
if(isset($param['path'])){ // Get manga updates if(isset($param['path'])){ // Get manga updates
$type = "path"; $type = "path";
$path = $param['path']; $path = $param['path'];
} }
if(isset($param['limit']) && $param['limit'] !== ""){ // Get manga updates (optional parameter) if(isset($param['limit']) && $param['limit'] !== ""){ // Get manga updates (optional parameter)
$limit = $param['limit']; $limit = $param['limit'];
} }
// We'll use the DOM parser for this as it makes navigation easier // We'll use the DOM parser for this as it makes navigation easier
$html = file_get_contents("http://www.mangareader.net/" . $path); $html = file_get_contents("http://www.mangareader.net/" . $path);
if(!$html){ if(!$html){
@ -228,22 +108,22 @@ class MangareaderBridge extends BridgeAbstract{
} }
$doc = new DomDocument; $doc = new DomDocument;
@$doc->loadHTML($html); @$doc->loadHTML($html);
// Navigate via XPath // Navigate via XPath
$xpath = new DomXPath($doc); $xpath = new DomXPath($doc);
// Build feed based on the context (site updates or manga updates) // Build feed based on the context (site updates or manga updates)
if($type === "latest"){ if($type === "latest"){
$this->request = 'Latest updates'; $this->request = 'Latest updates';
// Query each item (consists of Manga + chapters) // Query each item (consists of Manga + chapters)
$nodes = $xpath->query("//*[@id='latestchapters']/table//td"); $nodes = $xpath->query("//*[@id='latestchapters']/table//td");
foreach ($nodes as $node){ foreach ($nodes as $node){
// Query the manga // Query the manga
$manga = $xpath->query("a[@class='chapter']", $node)->item(0); $manga = $xpath->query("a[@class='chapter']", $node)->item(0);
// Collect the chapters for each Manga // Collect the chapters for each Manga
$chapters = $xpath->query("a[@class='chaptersrec']", $node); $chapters = $xpath->query("a[@class='chaptersrec']", $node);
@ -251,35 +131,35 @@ class MangareaderBridge extends BridgeAbstract{
$item = new \Item(); $item = new \Item();
$item->uri = 'http://www.mangareader.net' . htmlspecialchars($manga->getAttribute('href')); $item->uri = 'http://www.mangareader.net' . htmlspecialchars($manga->getAttribute('href'));
$item->title = htmlspecialchars($manga->nodeValue); $item->title = htmlspecialchars($manga->nodeValue);
// Add each chapter to the feed // Add each chapter to the feed
$item->content = ""; $item->content = "";
foreach ($chapters as $chapter){ foreach ($chapters as $chapter){
if($item->content <> ""){ if($item->content <> ""){
$item->content .= "<br>"; $item->content .= "<br>";
} }
$item->content .= "<a href='http://www.mangareader.net" . htmlspecialchars($chapter->getAttribute('href')) . "'>" . htmlspecialchars($chapter->nodeValue) . "</a>"; $item->content .= "<a href='http://www.mangareader.net" . htmlspecialchars($chapter->getAttribute('href')) . "'>" . htmlspecialchars($chapter->nodeValue) . "</a>";
} }
$this->items[] = $item; $this->items[] = $item;
} }
} }
} }
if($type === "popular"){ if($type === "popular"){
$pagetitle = $xpath->query(".//*[@id='bodyalt']/h1")->item(0)->nodeValue; $pagetitle = $xpath->query(".//*[@id='bodyalt']/h1")->item(0)->nodeValue;
$this->request = substr($pagetitle, 0, strrpos($pagetitle, " -")); // "Popular mangas for ..." $this->request = substr($pagetitle, 0, strrpos($pagetitle, " -")); // "Popular mangas for ..."
// Query all mangas // Query all mangas
$mangas = $xpath->query("//*[@id='mangaresults']/*[@class='mangaresultitem']"); $mangas = $xpath->query("//*[@id='mangaresults']/*[@class='mangaresultitem']");
foreach ($mangas as $manga){ foreach ($mangas as $manga){
// The thumbnail is encrypted in a css-style... // The thumbnail is encrypted in a css-style...
// format: "background-image:url('<the part which is actually interesting>')" // format: "background-image:url('<the part which is actually interesting>')"
$mangaimgelement = $xpath->query(".//*[@class='imgsearchresults']", $manga)->item(0)->getAttribute('style'); $mangaimgelement = $xpath->query(".//*[@class='imgsearchresults']", $manga)->item(0)->getAttribute('style');
$thumbnail = substr($mangaimgelement, 22, strlen($mangaimgelement) - 24); $thumbnail = substr($mangaimgelement, 22, strlen($mangaimgelement) - 24);
$item = new \Item(); $item = new \Item();
@ -292,35 +172,35 @@ class MangareaderBridge extends BridgeAbstract{
$this->items[] = $item; $this->items[] = $item;
} }
} }
if($type === "path") { if($type === "path") {
$this->request = $xpath->query(".//*[@id='mangaproperties']//*[@class='aname']")->item(0)->nodeValue; $this->request = $xpath->query(".//*[@id='mangaproperties']//*[@class='aname']")->item(0)->nodeValue;
$query = "(.//*[@id='listing']//tr)[position() > 1]"; $query = "(.//*[@id='listing']//tr)[position() > 1]";
if($limit !== -1){ if($limit !== -1){
$query = "(.//*[@id='listing']//tr)[position() > 1][position() > last() - " . $limit . "]"; $query = "(.//*[@id='listing']//tr)[position() > 1][position() > last() - " . $limit . "]";
} }
$chapters = $xpath->query($query); $chapters = $xpath->query($query);
foreach ($chapters as $chapter){ foreach ($chapters as $chapter){
$item = new \Item(); $item = new \Item();
$item->title = htmlspecialchars($xpath->query("td[1]", $chapter)->item(0)->nodeValue); $item->title = htmlspecialchars($xpath->query("td[1]", $chapter)->item(0)->nodeValue);
$item->uri = 'http://www.mangareader.net' . $xpath->query("td[1]/a", $chapter)->item(0)->getAttribute('href'); $item->uri = 'http://www.mangareader.net' . $xpath->query("td[1]/a", $chapter)->item(0)->getAttribute('href');
$item->timestamp = strtotime($xpath->query("td[2]", $chapter)->item(0)->nodeValue); $item->timestamp = strtotime($xpath->query("td[2]", $chapter)->item(0)->nodeValue);
array_unshift($this->items, $item); array_unshift($this->items, $item);
} }
} }
// Return some dummy-data if no content available // Return some dummy-data if no content available
if(count($this->items) == 0){ if(count($this->items) == 0){
$item = new \Item(); $item = new \Item();
$item->content = "<p>No updates available</p>"; $item->content = "<p>No updates available</p>";
$this->items[] = $item; $this->items[] = $item;
} }
} }
public function getName(){ public function getName(){
@ -331,4 +211,4 @@ class MangareaderBridge extends BridgeAbstract{
return 10800; // 3 hours return 10800; // 3 hours
} }
} }
?> ?>

View file

@ -8,18 +8,13 @@ class MilbooruBridge extends BridgeAbstract{
$this->uri = "http://sheslostcontrol.net/moe/shimmie/"; $this->uri = "http://sheslostcontrol.net/moe/shimmie/";
$this->description = "Returns images from given page"; $this->description = "Returns images from given page";
$this->parameters[] = $this->parameters[] = array(
'[ 'p'=>array(
{ 'name'=>'page',
"name" : "page", 'type'=>'number'
"identifier" : "p", ),
"type" : "number" 't'=>array('name'=>'tags')
}, );
{
"name" : "tags",
"identifier" : "t"
}
]';
} }
public function collectData(array $param){ public function collectData(array $param){

View file

@ -8,18 +8,13 @@ class MspabooruBridge extends BridgeAbstract{
$this->uri = "http://mspabooru.com/"; $this->uri = "http://mspabooru.com/";
$this->description = "Returns images from given page"; $this->description = "Returns images from given page";
$this->parameters[] = $this->parameters[] = array(
'[ 'p'=>array(
{ 'name'=>'page',
"name" : "page", 'type'=>'number'
"identifier" : "p", ),
"type" : "number" 't'=>array('name'=>'tags')
}, );
{
"name" : "tags",
"identifier" : "t"
}
]';
} }

View file

@ -8,28 +8,24 @@ class NextgovBridge extends BridgeAbstract {
$this->uri = 'https://www.nextgov.com/'; $this->uri = 'https://www.nextgov.com/';
$this->description = 'USA Federal technology news, best practices, and web 2.0 tools.'; $this->description = 'USA Federal technology news, best practices, and web 2.0 tools.';
$this->parameters[] = $this->parameters[] = array(
'[ 'category'=>array(
{ 'name'=>'Category',
"name" : "Category", 'type'=>'list',
"type" : "list", 'values'=>array(
"identifier" : "category", 'All'=>'all',
"values" : 'Technology News'=>'technology-news',
[ 'CIO Briefing'=>'cio-briefing',
{ "name" : "All", "value" : "all" }, 'Emerging Tech'=>'emerging-tech',
{ "name" : "Technology News", "value" : "technology-news" }, 'Cloud'=>'cloud-computing',
{ "name" : "CIO Briefing", "value" : "cio-briefing" }, 'Cybersecurity'=>'cybersecurity',
{ "name" : "Emerging Tech", "value" : "emerging-tech" }, 'Mobile'=>'mobile',
{ "name" : "Cloud", "value" : "cloud-computing" }, 'Health'=>'health',
{ "name" : "Cybersecurity", "value" : "cybersecurity" }, 'Defense'=>'defense',
{ "name" : "Mobile", "value" : "mobile" }, 'Big Data'=>'big-data'
{ "name" : "Health", "value" : "health" }, )
{ "name" : "Defense", "value" : "defense" }, )
{ "name" : "Big Data", "value" : "big-data" } );
]
}
]';
} }
public function collectData(array $param) { public function collectData(array $param) {

View file

@ -7,14 +7,12 @@ class NovelUpdatesBridge extends BridgeAbstract{
$this->name = "Novel Updates"; $this->name = "Novel Updates";
$this->uri = "http://www.novelupdates.com/"; $this->uri = "http://www.novelupdates.com/";
$this->description = "Returns releases from Novel Updates"; $this->description = "Returns releases from Novel Updates";
$this->parameters[] = $this->parameters[] = array(
'[ 'n'=>array(
{ 'name'=>'Novel URL',
"name" : "Novel URL", 'required'=>true
"identifier" : "n", )
"required": true );
}
]';
} }
public function collectData(array $param){ public function collectData(array $param){

View file

@ -9,52 +9,23 @@ class OpenClassroomsBridge extends BridgeAbstract{
$this->description = "Returns latest tutorials from OpenClassrooms."; $this->description = "Returns latest tutorials from OpenClassrooms.";
$this->parameters[] = $this->parameters[] = array(
'[ 'u'=>array(
{ 'name'=>'Catégorie',
"name" : "Catégorie", 'type'=>'list',
"identifier" : "u", 'values'=>array(
"type" : "list", 'Arts & Culture'=>'arts',
"values" : [ 'Code'=>'code',
{ 'Design'=>'design',
"name" : "Arts & Culture", 'Entreprise'=>'business',
"value" : "arts" 'Numérique'=>'digital',
}, 'Sciences'=>'sciences',
{ 'Sciences Humaines'=>'humainities',
"name" : "Code", 'Systèmes d\'information'=>'it',
"value" : "code" 'Autres'=>'others'
}, )
{ )
"name" : "Design", );
"value" : "design"
},
{
"name" : "Entreprise",
"value" : "business"
},
{
"name" : "Numérique",
"value" : "digital"
},
{
"name" : "Sciences",
"value" : "sciences"
},
{
"name" : "Sciences Humaines",
"value" : "humainities"
},
{
"name" : "Systèmes d\'information",
"value" : "it"
},
{
"name" : "Autres",
"value" : "others"
}
]
}
]';
} }

View file

@ -12,31 +12,21 @@ class ParuVenduImmoBridge extends BridgeAbstract
$this->description = "Returns the ads from the first page of search result."; $this->description = "Returns the ads from the first page of search result.";
$this->parameters[] = $this->parameters[] = array(
'[ 'minarea'=>array(
{ 'name'=>'Minimal surface m²',
"name": "Minimal surface m²", 'type'=>'number'
"type" : "number", ),
"identifier" : "minarea" 'maxprice'=>array(
}, 'name'=>'Max price',
{ 'type'=>'number'
"name" : "Max price", ),
"type" : "number", 'pa'=>array(
"identifier" : "maxprice" 'name'=>'Country code',
}, 'exampleValue'=>'FR'
{ ),
"name" : "Country code", 'lo'=>array('name'=>'department numbers or postal codes, comma-separated')
"type" : "text", );
"identifier" : "pa",
"exampleValue" : "FR"
},
{
"name" : "department numbers or postal codes, comma-separated",
"type" : "text",
"identifier" : "lo"
}
]';
} }
public function collectData(array $param) public function collectData(array $param)

View file

@ -12,29 +12,20 @@ class PickyWallpapersBridge extends BridgeAbstract {
$this->uri = "http://www.pickywallpapers.com/"; $this->uri = "http://www.pickywallpapers.com/";
$this->description = "Returns the latests wallpapers from PickyWallpapers"; $this->description = "Returns the latests wallpapers from PickyWallpapers";
$this->parameters[] = $this->parameters[] = array(
'[ 'c'=>array('name'=>'category'),
{ 's'=>array('name'=>'subcategory'),
"name" : "Category", 'm'=>array(
"identifier" : "c" 'name'=>'Max number of wallpapers',
}, 'type'=>'number'
{ ),
"name" : "subcategory", 'r'=>array(
"identifier" : "s" 'name'=>'resolution',
}, 'exampleValue'=>'1920x1200, 1680x1050,…',
{ 'pattern'=>'[0-9]{3,4}x[0-9]{3,4}'
"name" : "Max number of wallpapers", )
"identifier" : "m", );
"type" : "number"
},
{
"name" : "resolution",
"identifier" : "r",
"exampleValue" : "1920x1200, 1680x1050, ...",
"pattern" : "[0-9]{3,4}x[0-9]{3,4}"
}
]';
} }
public function collectData(array $param){ public function collectData(array $param){

View file

@ -12,26 +12,14 @@ class PinterestBridge extends BridgeAbstract{
$this->uri = "http://www.pinterest.com"; $this->uri = "http://www.pinterest.com";
$this->description = "Returns the newest images on a board"; $this->description = "Returns the newest images on a board";
$this->parameters["By username and board"] = $this->parameters["By username and board"] = array(
'[ 'u'=>array('name'=>'username'),
{ 'b'=>array('name'=>'board')
"name" : "username", );
"identifier" : "u"
},
{
"name" : "board",
"identifier" : "b"
} $this->parameters["From search"] = array(
]'; 'q'=>array('name'=>'Keyword')
);
$this->parameters["From search"] =
'[
{
"name" : "Keyword",
"identifier" : "q"
}
]';
} }
public function collectData(array $param){ public function collectData(array $param){

View file

@ -6,16 +6,13 @@ class RTBFBridge extends BridgeAbstract {
$this->description = "Returns the newest RTBF videos by series ID"; $this->description = "Returns the newest RTBF videos by series ID";
$this->maintainer = "Frenzie"; $this->maintainer = "Frenzie";
$this->parameters[] = $this->parameters[] = array(
'[ 'c'=>array(
{ 'name'=>'series id',
"type" : "text", 'exampleValue'=>9500,
"identifier" : "c", 'required'=>true
"name" : "series id", )
"exampleValue" : "9500", );
"required" : true
}
]';
} }
public function collectData(array $param) { public function collectData(array $param) {

View file

@ -8,18 +8,14 @@ class Rule34Bridge extends BridgeAbstract{
$this->uri = "http://rule34.xxx/"; $this->uri = "http://rule34.xxx/";
$this->description = "Returns images from given page"; $this->description = "Returns images from given page";
$this->parameters[] = $this->parameters[] = array(
'[ 'p'=>array(
{ 'name'=>'page',
"name" : "page", 'type'=>'number'
"identifier" : "p", ),
"type" : "number" 't'=>array('name'=>'tags')
}, );
{
"name" : "tags",
"identifier" : "t"
}
]';
} }
public function collectData(array $param){ public function collectData(array $param){

View file

@ -8,18 +8,13 @@ class Rule34pahealBridge extends BridgeAbstract{
$this->uri = "http://rule34.paheal.net/"; $this->uri = "http://rule34.paheal.net/";
$this->description = "Returns images from given page"; $this->description = "Returns images from given page";
$this->parameters[] = $this->parameters[] = array(
'[ 'p'=>array(
{ 'name'=>'page',
"name" : "page", 'type'=>'number'
"identifier" : "p", ),
"type" : "number" 't'=>array('name'=>'tags')
}, );
{
"name" : "tags",
"identifier" : "t"
}
]';
} }

View file

@ -8,18 +8,13 @@ class SafebooruBridge extends BridgeAbstract{
$this->uri = "http://safebooru.org/"; $this->uri = "http://safebooru.org/";
$this->description = "Returns images from given page"; $this->description = "Returns images from given page";
$this->parameters[] = $this->parameters[] = array(
'[ 'p'=>array(
{ 'name'=>'page',
"name" : "page", 'type'=>'number'
"identifier" : "p", ),
"type" : "number" 't'=>array('name'=>'tags')
}, );
{
"name" : "tags",
"identifier" : "t"
}
]';
} }

View file

@ -8,18 +8,14 @@ class SakugabooruBridge extends BridgeAbstract{
$this->uri = "http://sakuga.yshi.org/"; $this->uri = "http://sakuga.yshi.org/";
$this->description = "Returns images from given page"; $this->description = "Returns images from given page";
$this->parameters[] = $this->parameters[] = array(
'[ 'p'=>array(
{ 'name'=>'page',
"name" : "page", 'type'=>'number'
"identifier" : "p", ),
"type" : "number" 't'=>array('name'=>'tags')
}, );
{
"name" : "tags",
"identifier" : "t"
}
]';
} }
public function collectData(array $param){ public function collectData(array $param){

View file

@ -8,14 +8,12 @@ class ScoopItBridge extends BridgeAbstract{
$this->uri = "http://www.scoop.it"; $this->uri = "http://www.scoop.it";
$this->description = "Returns most recent results from ScoopIt."; $this->description = "Returns most recent results from ScoopIt.";
$this->parameters[] = $this->parameters[] = array(
'[ 'u'=>array(
{ 'name'=>'keyword',
"name" : "keyword", 'required'=>true
"identifier" : "u", )
"required": true );
}
]';
} }

View file

@ -9,40 +9,33 @@ class SensCritiqueBridge extends BridgeAbstract {
$this->uri = "http://www.senscritique.com"; $this->uri = "http://www.senscritique.com";
$this->description = "Sens Critique news"; $this->description = "Sens Critique news";
$this->parameters[] = $this->parameters[] = array(
'[ 'm'=>array(
{ 'name'=>'Movies',
"name" : "Movies", 'type'=>'checkbox'
"identifier" : "m", ),
"type": "checkbox" 's'=>array(
}, 'name'=>'Series',
{ 'type'=>'checkbox'
"name" : "Series", ),
"identifier" : "s", 'g'=>array(
"type": "checkbox" 'name'=>'Video Games',
}, 'type'=>'checkbox'
{ ),
"name" : "Video Games", 'b'=>array(
"identifier" : "g", 'name'=>'Books',
"type": "checkbox" 'type'=>'checkbox'
}, ),
{ 'bd'=>array(
"name" : "Books", 'name'=>'BD',
"identifier" : "b", 'type'=>'checkbox'
"type": "checkbox" ),
}, 'mu'=>array(
{ 'name'=>'Music',
"name" : "BD", 'type'=>'checkbox'
"identifier" : "bd", )
"type": "checkbox" );
}, }
{
"name" : "Music",
"identifier" : "mu",
"type": "checkbox"
}
]';
}
public function collectData(array $param) { public function collectData(array $param) {
if ((isset($param['m']) && $param['m'])) { if ((isset($param['m']) && $param['m'])) {

View file

@ -11,14 +11,12 @@ class SoundCloudBridge extends BridgeAbstract{
$this->uri = "http://www.soundcloud.com/"; $this->uri = "http://www.soundcloud.com/";
$this->description = "Returns 10 newest music from user profile"; $this->description = "Returns 10 newest music from user profile";
$this->parameters[] = $this->parameters[] = array(
'[ 'u'=>array(
{ 'name'=>'username',
"name" : "username", 'required'=>true
"identifier" : "u", )
"required": true );
}
]';
} }

View file

@ -11,24 +11,17 @@ class SuperbWallpapersBridge extends BridgeAbstract {
$this->uri = "http://www.superbwallpapers.com/"; $this->uri = "http://www.superbwallpapers.com/";
$this->description = "Returns the latests wallpapers from SuperbWallpapers"; $this->description = "Returns the latests wallpapers from SuperbWallpapers";
$this->parameters[] = $this->parameters[] = array(
'[ 'c'=>array('name'=>'category'),
{ 'm'=>array(
"name" : "Category", 'name'=>'Max number of wallpapers',
"identifier" : "c" 'type'=>'number'
}, ),
{ 'r'=>array(
"name" : "Max number of wallpapers", 'name'=>'resolution',
"identifier" : "m", 'exampleValue'=>'1920x1200, 1680x1050,…'
"type" : "number" )
}, );
{
"name" : "resolution",
"identifier" : "r",
"exampleValue" : "1920x1200, 1680x1050, ..."
}
]';
} }

View file

@ -8,14 +8,12 @@ class T411Bridge extends BridgeAbstract {
$this->uri = 'https://t411.ch/'; $this->uri = 'https://t411.ch/';
$this->description = 'Returns the 10 newest torrents with specified search terms <br /> Use url part after "?" mark when using their search engine.'; $this->description = 'Returns the 10 newest torrents with specified search terms <br /> Use url part after "?" mark when using their search engine.';
$this->parameters[] = $this->parameters[] = array(
'[ 'search'=>array(
{ 'name'=>'Search criteria',
"name" : "Search criteria", 'required'=>true
"identifier" : "search", )
"required": true );
}
]';
} }
public function collectData(array $param) { public function collectData(array $param) {

View file

@ -8,14 +8,12 @@ class TagBoardBridge extends BridgeAbstract{
$this->uri = "http://www.TagBoard.com"; $this->uri = "http://www.TagBoard.com";
$this->description = "Returns most recent results from TagBoard."; $this->description = "Returns most recent results from TagBoard.";
$this->parameters[] = $this->parameters[] = array(
'[ 'u'=>array(
{ 'name'=>'keyword',
"name" : "keyword", 'required'=>true
"identifier" : "u", )
"required" :true );
}
]';
} }

View file

@ -8,18 +8,13 @@ class TbibBridge extends BridgeAbstract{
$this->uri = "http://tbib.org/"; $this->uri = "http://tbib.org/";
$this->description = "Returns images from given page"; $this->description = "Returns images from given page";
$this->parameters[] = $this->parameters[] = array(
'[ 'p'=>array(
{ 'name'=>'page',
"name" : "page", 'type'=>'number'
"identifier" : "p", ),
"type" : "number" 't'=>array('name'=>'tags')
}, );
{
"name" : "tags",
"identifier" : "t"
}
]';
} }
public function collectData(array $param){ public function collectData(array $param){

View file

@ -8,14 +8,12 @@ class ThePirateBayBridge extends BridgeAbstract{
$this->uri = "https://thepiratebay.org/"; $this->uri = "https://thepiratebay.org/";
$this->description = "Returns results for the keywords. You can put several list of keywords by separating them with a semicolon (e.g. \"one show;another show\")"; $this->description = "Returns results for the keywords. You can put several list of keywords by separating them with a semicolon (e.g. \"one show;another show\")";
$this->parameters[] = $this->parameters[] = array(
'[ 'q'=>array(
{ 'name'=>'keywords, separated by semicolons',
"name" : "keywords, separated by semicolons", 'exampleValue'=>'first list;second list;…'
"identifier" : "q", )
"exampleValue" : "first list;second list;..." );
}
]';
} }
public function collectData(array $param){ public function collectData(array $param){

View file

@ -14,64 +14,45 @@ class TwitchApiBridge extends BridgeAbstract{
$this->uri = "http://www.twitch.tv"; $this->uri = "http://www.twitch.tv";
$this->description = "Returns the newest broadcasts or highlights by channel name using the Twitch API (v3)"; $this->description = "Returns the newest broadcasts or highlights by channel name using the Twitch API (v3)";
$this->parameters["Get channel without limit"] = $this->parameters["Get channel without limit"] = array(
'[ 'channel'=>array(
{ 'name'=>'Channel',
"name" : "Channel", 'required'=>true
"identifier" : "channel", ),
"required" : true 'broadcasts'=>array(
}, 'name'=>'Broadcasts',
{ 'type'=>'list',
"name" : "Broadcasts", 'values'=>array(
"identifier" : "broadcasts", 'Show broadcasts'=>'true',
"type" : "list", 'Show highlights'=>'false'
"values" : [ )
{ )
"name" : "Show broadcasts", );
"value" : "true"
},
{
"name" : "Show highlights",
"value" : "false"
}
]
}
]';
$this->parameters["Get channel with limit"] =
'[
{
"name" : "Channel",
"identifier" : "channel",
"required" : true
},
{
"name" : "Limit",
"identifier" : "limit",
"type" : "number"
},
{
"name" : "Broadcasts",
"identifier" : "broadcasts",
"type" : "list",
"values" : [
{
"name" : "Show broadcasts",
"value" : "true"
},
{
"name" : "Show highlights",
"value" : "false"
}
]
}
]';
$this->parameters["Get channel with limit"] = array(
'channel'=>array(
'name'=>'Channel',
'required'=>true
),
'limit'=>array(
'name'=>'Limit',
'type'=>'number'
),
'broadcasts'=>array(
'name'=>'Broadcasts',
'type'=>'list',
'values'=>array(
'Show broadcasts'=>'true',
'Show highlights'=>'false'
)
)
);
} }
public function collectData(array $param){ public function collectData(array $param){
/* In accordance with API description: /* In accordance with API description:
* "When specifying a version for a request to the Twitch API, set the Accept HTTP header to the API version you prefer." * "When specifying a version for a request to the Twitch API, set the Accept HTTP header to the API version you prefer."
* Now we prefer v3 right now and need to build the context options. */ * Now we prefer v3 right now and need to build the context options. */
$opts = array('https' => $opts = array('https' =>
array( array(
@ -79,22 +60,22 @@ class TwitchApiBridge extends BridgeAbstract{
'header' => 'Accept: application/vnd.twitchtv.v3+json' 'header' => 'Accept: application/vnd.twitchtv.v3+json'
) )
); );
$context = stream_context_create($opts); $context = stream_context_create($opts);
$channel = ''; $channel = '';
$limit = TWITCH_LIMIT; $limit = TWITCH_LIMIT;
$broadcasts = TWITCH_BROADCASTS; $broadcasts = TWITCH_BROADCASTS;
$requests = 1; $requests = 1;
if(isset($param['channel'])) { if(isset($param['channel'])) {
$channel = $param['channel']; $channel = $param['channel'];
} else { } else {
$this->returnClientError('You must specify a valid channel name! Received: &channel=' . $param['channel']); $this->returnClientError('You must specify a valid channel name! Received: &channel=' . $param['channel']);
} }
$this->channel = $channel; $this->channel = $channel;
if(isset($param['limit'])) { if(isset($param['limit'])) {
try { try {
$limit = (int)$param['limit']; $limit = (int)$param['limit'];
@ -104,39 +85,39 @@ class TwitchApiBridge extends BridgeAbstract{
} else { } else {
$limit = TWITCH_LIMIT; $limit = TWITCH_LIMIT;
} }
// The Twitch API allows a limit between 1 .. 100. Therefore any value below must be set to 1, any greater must result in multiple requests. // The Twitch API allows a limit between 1 .. 100. Therefore any value below must be set to 1, any greater must result in multiple requests.
if($limit < 1) { $limit = 1; } if($limit < 1) { $limit = 1; }
if($limit > 100) { if($limit > 100) {
$requests = (int)($limit / 100); $requests = (int)($limit / 100);
if($limit % 100 != 0) { $requests++; } if($limit % 100 != 0) { $requests++; }
} }
if(isset($param['broadcasts']) && ($param['broadcasts'] == 'true' || $param['broadcasts'] == 'false')) { if(isset($param['broadcasts']) && ($param['broadcasts'] == 'true' || $param['broadcasts'] == 'false')) {
$broadcasts = $param['broadcasts']; $broadcasts = $param['broadcasts'];
} else { } else {
$this->returnClientError('The value for broadcasts you specified is not valid! Received: &broadcasts=' . $param['broadcasts'] . ' Expected: &broadcasts=false or &broadcasts=true'); $this->returnClientError('The value for broadcasts you specified is not valid! Received: &broadcasts=' . $param['broadcasts'] . ' Expected: &broadcasts=false or &broadcasts=true');
} }
// Build the initial request, see also: https://github.com/justintv/Twitch-API/blob/master/v3_resources/videos.md#get-channelschannelvideos // Build the initial request, see also: https://github.com/justintv/Twitch-API/blob/master/v3_resources/videos.md#get-channelschannelvideos
$request = ''; $request = '';
if($requests == 1) { if($requests == 1) {
$request = 'https://api.twitch.tv/kraken/channels/' . $channel . '/videos?limit=' . $limit . '&broadcasts=' . $broadcasts; $request = 'https://api.twitch.tv/kraken/channels/' . $channel . '/videos?limit=' . $limit . '&broadcasts=' . $broadcasts;
} else { } else {
$request = 'https://api.twitch.tv/kraken/channels/' . $channel . '/videos?limit=100&broadcasts=' . $broadcasts; $request = 'https://api.twitch.tv/kraken/channels/' . $channel . '/videos?limit=100&broadcasts=' . $broadcasts;
} }
/* Finally we're ready to request data from the API. Each response provides information for the next request. */ /* Finally we're ready to request data from the API. Each response provides information for the next request. */
for($i = 0; $i < $requests; $i++) { for($i = 0; $i < $requests; $i++) {
$response = $this->getSimpleHTMLDOM($request, false, $context); $response = $this->getSimpleHTMLDOM($request, false, $context);
if($response == false) { if($response == false) {
$this->returnServerError('Request failed! Check if the channel name is valid!'); $this->returnServerError('Request failed! Check if the channel name is valid!');
} }
$data = json_decode($response); $data = json_decode($response);
foreach($data->videos as $video) { foreach($data->videos as $video) {
$item = new \Item(); $item = new \Item();
$item->id = $video->_id; $item->id = $video->_id;
@ -145,13 +126,13 @@ class TwitchApiBridge extends BridgeAbstract{
$item->timestamp = strtotime($video->recorded_at); $item->timestamp = strtotime($video->recorded_at);
$item->content = '<a href="' . $item->uri . '"><img src="' . $video->preview . '" /></a><br><a href="' . $item->uri . '">' . $item->title . '</a>'; $item->content = '<a href="' . $item->uri . '"><img src="' . $video->preview . '" /></a><br><a href="' . $item->uri . '">' . $item->title . '</a>';
$this->items[] = $item; $this->items[] = $item;
// Stop once the number of requested items is reached // Stop once the number of requested items is reached
if(count($this->items) >= $limit) { if(count($this->items) >= $limit) {
break; break;
} }
} }
// Get next request (if available) // Get next request (if available)
if(isset($data->_links->next)) { if(isset($data->_links->next)) {
$request = $data->_links->next; $request = $data->_links->next;

View file

@ -8,50 +8,36 @@ class TwitterBridge extends BridgeAbstract{
$this->uri = "https://twitter.com/"; $this->uri = "https://twitter.com/";
$this->description = "Returns tweets by keyword/hashtag or user name"; $this->description = "Returns tweets by keyword/hashtag or user name";
$this->parameters["global"] = $this->parameters["global"] = array(
'[ 'nopic'=>array(
{ 'name'=>'Hide profile pictures',
"name" : "Hide profile pictures", 'type'=>'checkbox',
"identifier" : "nopic", 'title'=>'Activate to hide profile pictures in content'
"type" : "checkbox", )
"required" : false, );
"exampleValue" : "checked",
"title" : "Activate to hide profile pictures in content"
}
]';
$this->parameters["By keyword or hashtag"] = $this->parameters["By keyword or hashtag"] = array(
'[ 'q'=>array(
{ 'name'=>'Keyword or #hashtag',
"name" : "Keyword or #hashtag", 'required'=>true,
"identifier" : "q", 'exampleValue'=>'rss-bridge, #rss-bridge',
"type" : "text", 'title'=>'Insert a keyword or hashtag'
"required" : true, )
"exampleValue" : "rss-bridge, #rss-bridge", );
"title" : "Insert a keyword or hashtag"
}
]';
$this->parameters["By username"] =
'[
{
"name" : "username",
"identifier" : "u",
"type" : "text",
"required" : true,
"exampleValue" : "sebsauvage",
"title" : "Insert a user name"
},
{
"name" : "Without replies",
"identifier" : "norep",
"type" : "checkbox",
"required" : false,
"exampleValue" : "checked",
"title" : "Only return initial tweets"
}
]';
$this->parameters["By username"] = array(
'u'=>array(
'name'=>'username',
'required'=>true,
'exampleValue'=>'sebsauvage',
'title'=>'Insert a user name'
),
'norep'=>array(
'name'=>'Without replies',
'type'=>'checkbox',
'title'=>'Only return initial tweets'
)
);
} }
public function collectData(array $param){ public function collectData(array $param){

View file

@ -8,26 +8,20 @@ class UnsplashBridge extends BridgeAbstract {
$this->uri = "http://unsplash.com/"; $this->uri = "http://unsplash.com/";
$this->description = "Returns the latests photos from Unsplash"; $this->description = "Returns the latests photos from Unsplash";
$this->parameters[] = $this->parameters[] = array(
'[ 'm'=>array(
{ 'name'=>'Max number of photos',
"name" : "Max number of photos", 'type'=>'number'
"identifier" : "m", ),
"type" : "number" 'w'=>array(
}, 'name'=>'Width',
{ 'exampleValue'=>'1920, 1680, …'
"name" : "Width", ),
"identifier" : "w", 'q'=>array(
"exampleValue" : "1920, 1680, ..." 'name'=>'JPEG quality',
}, 'type'=>'number'
{ )
"name" : "JPEG quality", );
"identifier" : "q",
"type" : "number"
}
]';
} }
public function collectData(array $param){ public function collectData(array $param){

View file

@ -8,14 +8,12 @@ class ViadeoCompany extends BridgeAbstract{
$this->uri = "https://www.viadeo.com/"; $this->uri = "https://www.viadeo.com/";
$this->description = "Returns most recent actus from Company on Viadeo. (http://www.viadeo.com/fr/company/<strong style=\"font-weight:bold;\">apple</strong>)"; $this->description = "Returns most recent actus from Company on Viadeo. (http://www.viadeo.com/fr/company/<strong style=\"font-weight:bold;\">apple</strong>)";
$this->parameters[] = $this->parameters[] = array(
'[ 'c'=>array(
{ 'name'=>'Company name',
"name" : "Company name", 'required'=>true
"identifier" : "c", )
"required" : true );
}
]';
} }
public function collectData(array $param){ public function collectData(array $param){

View file

@ -8,15 +8,12 @@ class VineBridge extends BridgeAbstract {
$this->uri = "http://vine.co/"; $this->uri = "http://vine.co/";
$this->description = "Returns the latests vines from vine user page"; $this->description = "Returns the latests vines from vine user page";
$this->parameters[] = $this->parameters[] = array(
'[ 'u'=>array(
{ 'name'=>'User id',
"name" : "User id", 'required'=>true
"identifier" : "u", )
"type" : "text", );
"required" : true
}
]';
} }
public function collectData(array $param){ public function collectData(array $param){

View file

@ -9,13 +9,12 @@ class VkBridge extends BridgeAbstract {
$this->name = "VK.com"; $this->name = "VK.com";
$this->uri = "http://www.vk.com/"; $this->uri = "http://www.vk.com/";
$this->description = "Working with open pages"; $this->description = "Working with open pages";
$this->parameters["Url on page group or user"] = '[ $this->parameters["Url on page group or user"] = array(
{ 'u'=>array(
"name" : "Url", 'name'=>'Url',
"identifier" : "u", 'required'=>true
"required" : true )
} );
]';
} }
public function collectData(array $param) { public function collectData(array $param) {

View file

@ -12,29 +12,18 @@ class WallpaperStopBridge extends BridgeAbstract {
$this->uri = "http://www.wallpaperstop.com/"; $this->uri = "http://www.wallpaperstop.com/";
$this->description = "Returns the latests wallpapers from WallpaperStop"; $this->description = "Returns the latests wallpapers from WallpaperStop";
$this->parameters[] = $this->parameters[] = array(
'[ 'c'=>array('name'=>'Category'),
{ 's'=>array('name'=>'subcategory'),
"name" : "Category", 'm'=>array(
"identifier" : "c" 'name'=>'Max number of wallpapers',
}, 'type'=>'number'
{ ),
"name" : "subcategory", 'r'=>array(
"identifier" : "s" 'name'=>'resolution',
}, 'exampleValue'=>'1920x1200, 1680x1050,…',
{ )
"name" : "Max number of wallpapers", );
"identifier" : "m",
"type" : "number"
},
{
"name" : "resolution",
"identifier" : "r",
"exampleValue" : "1920x1200, 1680x1050, ..."
}
]';
} }

View file

@ -11,14 +11,12 @@ class WhydBridge extends BridgeAbstract{
$this->uri = "http://www.whyd.com/"; $this->uri = "http://www.whyd.com/";
$this->description = "Returns 10 newest music from user profile"; $this->description = "Returns 10 newest music from user profile";
$this->parameters[] = $this->parameters[] = array(
'[ 'u'=>array(
{ 'name'=>'username/id',
"name" : "username/id", 'required'=>true
"identifier" : "u", )
"required" :true );
}
]';
} }

View file

@ -10,73 +10,49 @@ class WikipediaBridge extends BridgeAbstract{
$this->uri = 'https://www.wikipedia.org/'; $this->uri = 'https://www.wikipedia.org/';
$this->description = 'Returns articles for a language of your choice'; $this->description = 'Returns articles for a language of your choice';
$this->parameters[] = $this->parameters[] = array(
'[ 'language'=>array(
{ 'name'=>'Language',
"name": "Language", 'type'=>'list',
"identifier": "language", 'required'=>true,
"type": "list", 'title'=>'Select your language',
"required": true, 'exampleValue'=>'English',
"title": "Select your language", 'values'=>array(
"exampleValue": "English", 'English'=>'en',
"values": [ 'German'=>'de',
{ 'French'=>'fr',
"name": "English", 'Esperanto'=>'es'
"value": "en" )
}, ),
{ 'subject'=>array(
"name": "German", 'name'=>'Subject',
"value": "de" 'type'=>'list',
}, 'required'=>true,
{ 'title'=>'What subject are you interested in?',
"name": "French", 'exampleValue'=>'Today\'s featured article',
"value": "fr" 'values'=>array(
}, 'Today\'s featured article'=>'tfa',
{ 'Did you know…'=>'dyk'
"name": "Esperanto", )
"value": "eo" ),
} 'fullarticle'=>array(
] 'name'=>'Load full article',
}, 'type'=>'checkbox',
{ 'title'=>'Activate to always load the full article'
"name": "Subject", )
"identifier": "subject", );
"type": "list",
"required": true,
"title": "What subject are you interested in?",
"exampleValue": "Today\'s featured article",
"values": [
{
"name": "Today\'s featured article",
"value": "tfa"
},
{
"name": "Did you know...",
"value": "dyk"
}
]
},
{
"name": "Load full article",
"identifier": "fullarticle",
"type": "checkbox",
"required": false,
"title": "Activate to always load the full article",
"exampleValue": "false"
}
]';
} }
public function collectData(array $params){ public function collectData(array $params){
if(!isset($params['language'])) if(!isset($params['language']))
$this->returnClientError('You must specify a valid language via \'&language=\'!'); $this->returnClientError('You must specify a valid language via \'&language=\'!');
if(!$this->CheckLanguageCode(strtolower($params['language']))) if(!$this->CheckLanguageCode(strtolower($params['language'])))
$this->returnClientError('The language code you provided (\'' . $params['language'] . '\') is not supported!'); $this->returnClientError('The language code you provided (\'' . $params['language'] . '\') is not supported!');
if(!isset($params['subject'])) if(!isset($params['subject']))
$this->returnClientError('You must specify a valid subject via \'&subject=\'!'); $this->returnClientError('You must specify a valid subject via \'&subject=\'!');
$subject = WIKIPEDIA_SUBJECT_TFA; $subject = WIKIPEDIA_SUBJECT_TFA;
switch($params['subject']){ switch($params['subject']){
case 'tfa': case 'tfa':
@ -116,7 +92,7 @@ class WikipediaBridge extends BridgeAbstract{
if(!$html) if(!$html)
$this->returnServerError('Could not load site: ' . $this->uri . '!'); $this->returnServerError('Could not load site: ' . $this->uri . '!');
/* /*
* Now read content depending on the language (make sure to create one function per language!) * Now read content depending on the language (make sure to create one function per language!)
* We build the function name automatically, just make sure you create a private function ending * We build the function name automatically, just make sure you create a private function ending
* with your desired language code, where the language code is upper case! (en -> GetContentsEN). * with your desired language code, where the language code is upper case! (en -> GetContentsEN).
@ -125,25 +101,24 @@ class WikipediaBridge extends BridgeAbstract{
if(!method_exists($this, $function)) if(!method_exists($this, $function))
$this->returnServerError('A function to get the contents for your langauage is missing (\'' . $function . '\')!'); $this->returnServerError('A function to get the contents for your langauage is missing (\'' . $function . '\')!');
/* /*
* The method takes care of creating all items. * The method takes care of creating all items.
*/ */
$this->$function($html, $subject, $fullArticle); $this->$function($html, $subject, $fullArticle);
} }
/** /**
* Returns true if the language code is part of the parameters list * Returns true if the language code is part of the parameters list
*/ */
private function CheckLanguageCode($languageCode){ private function CheckLanguageCode($languageCode){
$parameter = json_decode($this->parameters[0], true); $languages = $this->parameters[0]['language']['values'];
$languages = $parameter[0]['values'];
$language_names = array(); $language_names = array();
foreach($languages as $language) foreach($languages as $name=>$value)
$language_names[] = $language['value']; $language_names[] = $value;
return in_array($languageCode, $language_names); return in_array($languageCode, $language_names);
} }
@ -169,7 +144,7 @@ class WikipediaBridge extends BridgeAbstract{
if(strpos($anchor->innertext, '...') !== false){ if(strpos($anchor->innertext, '...') !== false){
$target = $anchor; $target = $anchor;
break; break;
} }
} }
$item = new \Item(); $item = new \Item();
@ -178,7 +153,7 @@ class WikipediaBridge extends BridgeAbstract{
if(!$fullArticle) if(!$fullArticle)
$item->content = strip_tags($this->ReplaceURIInHTMLElement($element), '<a><p><br><img>'); $item->content = strip_tags($this->ReplaceURIInHTMLElement($element), '<a><p><br><img>');
else else
$item->content = $this->LoadFullArticle($item->uri); $item->content = $this->LoadFullArticle($item->uri);
$this->items[] = $item; $this->items[] = $item;
@ -190,14 +165,14 @@ class WikipediaBridge extends BridgeAbstract{
private function AddDidYouKnowGeneric($element, $fullArticle){ private function AddDidYouKnowGeneric($element, $fullArticle){
foreach($element->find('ul', 0)->find('li') as $entry){ foreach($element->find('ul', 0)->find('li') as $entry){
$item = new \Item(); $item = new \Item();
// We can only use the first anchor, there is no way of finding the 'correct' one if there are multiple // We can only use the first anchor, there is no way of finding the 'correct' one if there are multiple
$item->uri = $this->uri . $entry->find('a', 0)->href; $item->uri = $this->uri . $entry->find('a', 0)->href;
$item->title = strip_tags($entry->innertext); $item->title = strip_tags($entry->innertext);
if(!$fullArticle) if(!$fullArticle)
$item->content = $this->ReplaceURIInHTMLElement($entry); $item->content = $this->ReplaceURIInHTMLElement($entry);
else else
$item->content = $this->LoadFullArticle($item->uri); $item->content = $this->LoadFullArticle($item->uri);
$this->items[] = $item; $this->items[] = $item;
@ -209,15 +184,15 @@ class WikipediaBridge extends BridgeAbstract{
*/ */
private function LoadFullArticle($uri){ private function LoadFullArticle($uri){
$content_html = $this->getSimpleHTMLDOM($uri); $content_html = $this->getSimpleHTMLDOM($uri);
if(!$content_html) if(!$content_html)
$this->returnServerError('Could not load site: ' . $uri . '!'); $this->returnServerError('Could not load site: ' . $uri . '!');
$content = $content_html->find('#mw-content-text', 0); $content = $content_html->find('#mw-content-text', 0);
if(!$content) if(!$content)
$this->returnServerError('Could not find content in page: ' . $uri . '!'); $this->returnServerError('Could not find content in page: ' . $uri . '!');
// Let's remove a couple of things from the article // Let's remove a couple of things from the article
$table = $content->find('#toc', 0); // Table of contents $table = $content->find('#toc', 0); // Table of contents
if(!$table === false) if(!$table === false)
@ -234,7 +209,7 @@ class WikipediaBridge extends BridgeAbstract{
*/ */
private function GetContentsDE($html, $subject, $fullArticle){ private function GetContentsDE($html, $subject, $fullArticle){
switch($subject){ switch($subject){
case WIKIPEDIA_SUBJECT_TFA: case WIKIPEDIA_SUBJECT_TFA:
$element = $html->find('div[id=mf-tfa]', 0); $element = $html->find('div[id=mf-tfa]', 0);
$this->AddTodaysFeaturedArticleGeneric($element, $fullArticle); $this->AddTodaysFeaturedArticleGeneric($element, $fullArticle);
break; break;
@ -252,7 +227,7 @@ class WikipediaBridge extends BridgeAbstract{
*/ */
private function GetContentsFR($html, $subject, $fullArticle){ private function GetContentsFR($html, $subject, $fullArticle){
switch($subject){ switch($subject){
case WIKIPEDIA_SUBJECT_TFA: case WIKIPEDIA_SUBJECT_TFA:
$element = $html->find('div[id=accueil-lumieresur]', 0); $element = $html->find('div[id=accueil-lumieresur]', 0);
$this->AddTodaysFeaturedArticleGeneric($element, $fullArticle); $this->AddTodaysFeaturedArticleGeneric($element, $fullArticle);
break; break;
@ -270,7 +245,7 @@ class WikipediaBridge extends BridgeAbstract{
*/ */
private function GetContentsEN($html, $subject, $fullArticle){ private function GetContentsEN($html, $subject, $fullArticle){
switch($subject){ switch($subject){
case WIKIPEDIA_SUBJECT_TFA: case WIKIPEDIA_SUBJECT_TFA:
$element = $html->find('div[id=mp-tfa]', 0); $element = $html->find('div[id=mp-tfa]', 0);
$this->AddTodaysFeaturedArticleGeneric($element, $fullArticle); $this->AddTodaysFeaturedArticleGeneric($element, $fullArticle);
break; break;
@ -288,7 +263,7 @@ class WikipediaBridge extends BridgeAbstract{
*/ */
private function GetContentsEO($html, $subject, $fullArticle){ private function GetContentsEO($html, $subject, $fullArticle){
switch($subject){ switch($subject){
case WIKIPEDIA_SUBJECT_TFA: case WIKIPEDIA_SUBJECT_TFA:
$element = $html->find('div[id=mf-artikolo-de-la-semajno]', 0); $element = $html->find('div[id=mf-artikolo-de-la-semajno]', 0);
$this->AddTodaysFeaturedArticleGeneric($element, $fullArticle); $this->AddTodaysFeaturedArticleGeneric($element, $fullArticle);
break; break;

View file

@ -13,14 +13,12 @@ class WordPressBridge extends BridgeAbstract {
$this->uri = "https://wordpress.org/"; $this->uri = "https://wordpress.org/";
$this->description = "Returns the 3 newest full posts of a Wordpress blog"; $this->description = "Returns the 3 newest full posts of a Wordpress blog";
$this->parameters[] = $this->parameters[] = array(
'[ 'url'=>array(
{ 'name'=>'Blog URL',
"name" : "blog URL", 'required'=>true
"required" : true, )
"identifier" : "url" );
}
]';
} }
// Returns the content type for a given html dom // Returns the content type for a given html dom

View file

@ -13,50 +13,25 @@ class WorldOfTanks extends HttpCachingBridgeAbstract{
$this->uri = "http://worldoftanks.eu/"; $this->uri = "http://worldoftanks.eu/";
$this->description = "News about the tank slaughter game."; $this->description = "News about the tank slaughter game.";
$this->parameters[] = $this->parameters[] = array(
'[ 'category'=>array(
{ 'name'=>'ID de la catégorie',
"name" : "ID de la catégorie", 'type'=>'number'
"type" : "number", ),
"identifier" : "category" 'lang'=>array(
}, 'name'=>'Langue',
{ 'type'=>'list',
"name" : "Langue", 'values'=>array(
"identifier" : "lang", 'Français'=>'fr',
"type" : "list", 'English'=>'en',
"values" : [ 'Español'=>'es',
{ 'Deutsch'=>'de',
"name" : "Français", 'Čeština'=>'cs',
"value" : "fr" 'Polski'=>'pl',
}, 'Türkçe'=>'tr'
{ )
"name" : "English", )
"value" : "en" );
},
{
"name" : "Español",
"value" : "es"
},
{
"name" : "Deutsch",
"value" : "de"
},
{
"name" : "Čeština",
"value" : "cs"
},
{
"name" : "Polski",
"value" : "pl"
},
{
"name" : "Türkçe",
"value" : "tr"
}
]
}
]';
} }

View file

@ -8,18 +8,13 @@ class XbooruBridge extends BridgeAbstract{
$this->uri = "http://xbooru.com/"; $this->uri = "http://xbooru.com/";
$this->description = "Returns images from given page"; $this->description = "Returns images from given page";
$this->parameters[] = $this->parameters[] = array(
'[ 'p'=>array(
{ 'name'=>'page',
"name" : "page", 'type'=>'number'
"identifier" : "p", ),
"type" : "number" 't'=>array('name'=>'tags')
}, );
{
"name" : "tags",
"identifier" : "t"
}
]';
} }
public function collectData(array $param){ public function collectData(array $param){

View file

@ -8,18 +8,13 @@ class YandereBridge extends BridgeAbstract{
$this->uri = "https://yande.re/"; $this->uri = "https://yande.re/";
$this->description = "Returns images from given page and tags"; $this->description = "Returns images from given page and tags";
$this->parameters[] = $this->parameters[] = array(
'[ 'p'=>array(
{ 'name'=>'page',
"name" : "page", 'type'=>'number'
"identifier" : "p", ),
"type" : "number" 't'=>array('name'=>'tags')
}, );
{
"name" : "tags",
"identifier" : "t"
}
]';
} }
public function collectData(array $param){ public function collectData(array $param){

View file

@ -15,55 +15,40 @@ class YoutubeBridge extends BridgeAbstract {
$this->description = 'Returns the 10 newest videos by username/channel/playlist or search'; $this->description = 'Returns the 10 newest videos by username/channel/playlist or search';
$this->maintainer = 'mitsukarenai'; $this->maintainer = 'mitsukarenai';
$this->parameters['By username'] = $this->parameters['By username'] = array(
'[ 'u'=>array(
{ 'name'=>'username',
"type" : "text", 'exampleValue'=>'test',
"identifier" : "u", 'required'=>true
"name" : "username", )
"exampleValue" : "test", );
"required" : true
}
]';
$this->parameters['By channel id'] = $this->parameters['By channel id'] = array(
'[ 'c'=>array(
{ 'name'=>'channel id',
"type" : "text", 'exampleValue'=>"15",
"identifier" : "c", 'required'=>true
"name" : "channel id", )
"exampleValue" : "15", );
"required" : true
}
]';
$this->parameters['By playlist Id'] = $this->parameters['By playlist Id'] = array(
'[ 'p'=>array(
{ 'name'=>'playlist id',
"type" : "text", 'exampleValue'=>"15"
"identifier" : "p", )
"name" : "playlist id", );
"exampleValue" : "15"
}
]';
$this->parameters['Search result'] = $this->parameters['Search result'] = array(
'[ 's'=>array(
{ 'name'=>'search keyword',
"type" : "text", 'exampleValue'=>'test'
"identifier" : "s", ),
"name" : "search keyword", 'pa'=>array(
"exampleValue" : "test" 'name'=>'page',
'type'=>'number',
}, 'exampleValue'=>1
{ )
"type" : "number", );
"identifier" : "pa",
"name" : "page",
"exampleValue" : "1"
}
]';
} }
private function ytBridgeQueryVideoInfo($vid, &$author, &$desc, &$time) { private function ytBridgeQueryVideoInfo($vid, &$author, &$desc, &$time) {

View file

@ -8,173 +8,158 @@ class ZDNetBridge extends BridgeAbstract {
$this->uri = 'http://www.zdnet.com/'; $this->uri = 'http://www.zdnet.com/';
$this->description = 'Technology News, Analysis, Comments and Product Reviews for IT Professionals.'; $this->description = 'Technology News, Analysis, Comments and Product Reviews for IT Professionals.';
$this->parameters[] =
// http://www.zdnet.com/zdnet.opml // http://www.zdnet.com/zdnet.opml
'[ $this->parameters[] = array(
{ 'feed'=>array(
"name" : "Feed", 'name'=>'Feed',
"type" : "list", 'type'=>'list',
"identifier" : "feed", 'values'=>array(
"values" : 'Subscribe to ZDNet RSS Feeds'=>array(
[ 'All Blogs'=>'blog',
{ "name" : "---- Select ----", "value" : "" }, 'Just News'=>'news',
'All Reviews'=>'topic/reviews',
{ "name" : "", "value" : "" }, 'Latest Downloads'=>'downloads!recent',
{ "name" : "Subscribe to ZDNet RSS Feeds", "value" : "" }, 'Latest Articles'=>'/',
'Latest Australia Articles'=>'au',
{ "name" : "&nbsp;&nbsp;&nbsp;&nbsp;All Blogs", "value" : "blog" }, 'Latest UK Articles'=>'uk',
{ "name" : "&nbsp;&nbsp;&nbsp;&nbsp;Just News", "value" : "news" }, 'Latest US Articles'=>'us',
{ "name" : "&nbsp;&nbsp;&nbsp;&nbsp;All Reviews", "value" : "topic/reviews" }, 'Latest Asia Articles'=>'as'
{ "name" : "&nbsp;&nbsp;&nbsp;&nbsp;Latest Downloads", "value" : "downloads!recent" }, ),
{ "name" : "&nbsp;&nbsp;&nbsp;&nbsp;Latest Articles", "value" : "/" }, 'Keep up with ZDNet Blogs RSS:'=>array(
{ "name" : "&nbsp;&nbsp;&nbsp;&nbsp;Latest Australia Articles", "value" : "au" }, 'Transforming the Datacenter'=>'blog/transforming-datacenter',
{ "name" : "&nbsp;&nbsp;&nbsp;&nbsp;Latest UK Articles", "value" : "uk" }, 'SMB India'=>'blog/smb-india',
{ "name" : "&nbsp;&nbsp;&nbsp;&nbsp;Latest US Articles", "value" : "us" }, 'Indonesia BizTech'=>'blog/indonesia-biztech',
{ "name" : "&nbsp;&nbsp;&nbsp;&nbsp;Latest Asia Articles", "value" : "as" }, 'Hong Kong Techie'=>'blog/hong-kong-techie',
'Tech Taiwan'=>'blog/tech-taiwan',
{ "name" : "", "value" : "" }, 'Startup India'=>'blog/startup-india',
{ "name" : "Keep up with ZDNet Blogs RSS:", "value" : "" }, 'Starting Up Asia'=>'blog/starting-up-asia',
'Next-Gen Partner'=>'blog/partner',
{ "name" : "&nbsp;&nbsp;&nbsp;&nbsp;Transforming the Datacenter", "value" : "blog/transforming-datacenter" }, 'Post-PC Developments'=>'blog/post-pc',
{ "name" : "&nbsp;&nbsp;&nbsp;&nbsp;SMB India", "value" : "blog/smb-india" }, 'Benelux'=>'blog/benelux',
{ "name" : "&nbsp;&nbsp;&nbsp;&nbsp;Indonesia BizTech", "value" : "blog/indonesia-biztech" }, 'Heat Sink'=>'blog/heat-sink',
{ "name" : "&nbsp;&nbsp;&nbsp;&nbsp;Hong Kong Techie", "value" : "blog/hong-kong-techie" }, 'Italy\'s got tech'=>'blog/italy',
{ "name" : "&nbsp;&nbsp;&nbsp;&nbsp;Tech Taiwan", "value" : "blog/tech-taiwan" }, 'African Enterprise'=>'blog/african-enterprise',
{ "name" : "&nbsp;&nbsp;&nbsp;&nbsp;Startup India", "value" : "blog/startup-india" }, 'New Tech for Old India'=>'blog/new-india',
{ "name" : "&nbsp;&nbsp;&nbsp;&nbsp;Starting Up Asia", "value" : "blog/starting-up-asia" }, 'Estonia Uncovered'=>'blog/estonia',
{ "name" : "&nbsp;&nbsp;&nbsp;&nbsp;Next-Gen Partner", "value" : "blog/partner" }, 'IT Iberia'=>'blog/iberia',
{ "name" : "&nbsp;&nbsp;&nbsp;&nbsp;Post-PC Developments", "value" : "blog/post-pc" }, 'Brazil Tech'=>'blog/brazil',
{ "name" : "&nbsp;&nbsp;&nbsp;&nbsp;Benelux", "value" : "blog/benelux" }, '500 words into the future'=>'blog/500-words-into-the-future',
{ "name" : "&nbsp;&nbsp;&nbsp;&nbsp;Heat Sink", "value" : "blog/heat-sink" }, 'ÜberTech'=>'blog/ubertech',
{ "name" : "&nbsp;&nbsp;&nbsp;&nbsp;Italy&#039;s got tech", "value" : "blog/italy" }, 'All About Microsoft'=>'blog/microsoft',
{ "name" : "&nbsp;&nbsp;&nbsp;&nbsp;African Enterprise", "value" : "blog/african-enterprise" }, 'Back office'=>'blog/back-office',
{ "name" : "&nbsp;&nbsp;&nbsp;&nbsp;New Tech for Old India", "value" : "blog/new-india" }, 'Barker Bites Back'=>'blog/barker-bites-back',
{ "name" : "&nbsp;&nbsp;&nbsp;&nbsp;Estonia Uncovered", "value" : "blog/estonia" }, 'Between the Lines'=>'blog/btl',
{ "name" : "&nbsp;&nbsp;&nbsp;&nbsp;IT Iberia", "value" : "blog/iberia" }, 'Big on Data'=>'blog/big-data',
{ "name" : "&nbsp;&nbsp;&nbsp;&nbsp;Brazil Tech", "value" : "blog/brazil" }, 'bootstrappr'=>'blog/bootstrappr',
{ "name" : "&nbsp;&nbsp;&nbsp;&nbsp;500 words into the future", "value" : "blog/500-words-into-the-future" }, 'By The Way'=>'blog/by-the-way',
{ "name" : "&nbsp;&nbsp;&nbsp;&nbsp;ÜberTech", "value" : "blog/ubertech" }, 'Central European Processing'=>'blog/central-europe',
{ "name" : "&nbsp;&nbsp;&nbsp;&nbsp;All About Microsoft", "value" : "blog/microsoft" }, 'Cloud Builders'=>'blog/cloud-builders',
{ "name" : "&nbsp;&nbsp;&nbsp;&nbsp;Back office", "value" : "blog/back-office" }, 'Communication Breakdown'=>'blog/communication-breakdown',
{ "name" : "&nbsp;&nbsp;&nbsp;&nbsp;Barker Bites Back", "value" : "blog/barker-bites-back" }, 'Collaboration 2.0'=>'blog/collaboration',
{ "name" : "&nbsp;&nbsp;&nbsp;&nbsp;Between the Lines", "value" : "blog/btl" }, 'Constellation Research'=>'blog/constellation',
{ "name" : "&nbsp;&nbsp;&nbsp;&nbsp;Big on Data", "value" : "blog/big-data" }, 'Consumerization: BYOD'=>'blog/consumerization',
{ "name" : "&nbsp;&nbsp;&nbsp;&nbsp;bootstrappr", "value" : "blog/bootstrappr" }, 'DIY-IT'=>'blog/diy-it',
{ "name" : "&nbsp;&nbsp;&nbsp;&nbsp;By The Way", "value" : "blog/by-the-way" }, 'Enterprise Web 2.0'=>'blog/hinchcliffe',
{ "name" : "&nbsp;&nbsp;&nbsp;&nbsp;Central European Processing", "value" : "blog/central-europe" }, 'Five Nines: The Next Gen Datacenter'=>'blog/datacenter',
{ "name" : "&nbsp;&nbsp;&nbsp;&nbsp;Cloud Builders", "value" : "blog/cloud-builders" }, 'Forrester Research'=>'blog/forrester',
{ "name" : "&nbsp;&nbsp;&nbsp;&nbsp;Communication Breakdown", "value" : "blog/communication-breakdown" }, 'Full Duplex'=>'blog/full-duplex',
{ "name" : "&nbsp;&nbsp;&nbsp;&nbsp;Collaboration 2.0", "value" : "blog/collaboration" }, 'Gen Why?'=>'blog/gen-why',
{ "name" : "&nbsp;&nbsp;&nbsp;&nbsp;Constellation Research", "value" : "blog/constellation" }, 'Hardware 2.0'=>'blog/hardware',
{ "name" : "&nbsp;&nbsp;&nbsp;&nbsp;Consumerization: BYOD", "value" : "blog/consumerization" }, 'Identity Matters'=>'blog/identity',
{ "name" : "&nbsp;&nbsp;&nbsp;&nbsp;DIY-IT", "value" : "blog/diy-it" }, 'iGeneration'=>'blog/igeneration',
{ "name" : "&nbsp;&nbsp;&nbsp;&nbsp;Enterprise Web 2.0", "value" : "blog/hinchcliffe" }, 'Internet of Everything'=>'blog/cisco',
{ "name" : "&nbsp;&nbsp;&nbsp;&nbsp;Five Nines: The Next Gen Datacenter", "value" : "blog/datacenter" }, 'Beyond IT Failure'=>'blog/projectfailures',
{ "name" : "&nbsp;&nbsp;&nbsp;&nbsp;Forrester Research", "value" : "blog/forrester" }, 'Jamie\'s Mostly Linux Stuff'=>'blog/jamies-mostly-linux-stuff',
{ "name" : "&nbsp;&nbsp;&nbsp;&nbsp;Full Duplex", "value" : "blog/full-duplex" }, 'Jack\'s Blog'=>'blog/jacks-blog',
{ "name" : "&nbsp;&nbsp;&nbsp;&nbsp;Gen Why?", "value" : "blog/gen-why" }, 'Laptops & Desktops'=>'blog/computers',
{ "name" : "&nbsp;&nbsp;&nbsp;&nbsp;Hardware 2.0", "value" : "blog/hardware" }, 'Linux and Open Source'=>'blog/open-source',
{ "name" : "&nbsp;&nbsp;&nbsp;&nbsp;Identity Matters", "value" : "blog/identity" }, 'London Calling'=>'blog/london',
{ "name" : "&nbsp;&nbsp;&nbsp;&nbsp;iGeneration", "value" : "blog/igeneration" }, 'Mapping Babel'=>'blog/mapping-babel',
{ "name" : "&nbsp;&nbsp;&nbsp;&nbsp;Internet of Everything", "value" : "blog/cisco" }, 'Mixed Signals'=>'blog/mixed-signals',
{ "name" : "&nbsp;&nbsp;&nbsp;&nbsp;Beyond IT Failure", "value" : "blog/projectfailures" }, 'Mobile India'=>'blog/mobile-india',
{ "name" : "&nbsp;&nbsp;&nbsp;&nbsp;Jamie&#039;s Mostly Linux Stuff", "value" : "blog/jamies-mostly-linux-stuff" }, 'Mobile News'=>'blog/mobile-news',
{ "name" : "&nbsp;&nbsp;&nbsp;&nbsp;Jack&#039;s Blog", "value" : "blog/jacks-blog" }, 'Networking'=>'blog/networking',
{ "name" : "&nbsp;&nbsp;&nbsp;&nbsp;Laptops &amp; Desktops", "value" : "blog/computers" }, 'Norse Code'=>'blog/norse-code',
{ "name" : "&nbsp;&nbsp;&nbsp;&nbsp;Linux and Open Source", "value" : "blog/open-source" }, 'Null Pointer'=>'blog/null-pointer',
{ "name" : "&nbsp;&nbsp;&nbsp;&nbsp;London Calling", "value" : "blog/london" }, 'The Full Tilt'=>'blog/the-full-tilt',
{ "name" : "&nbsp;&nbsp;&nbsp;&nbsp;Mapping Babel", "value" : "blog/mapping-babel" }, 'Pinoy Post'=>'blog/pinoy-post',
{ "name" : "&nbsp;&nbsp;&nbsp;&nbsp;Mixed Signals", "value" : "blog/mixed-signals" }, 'Practically Tech'=>'blog/practically-tech',
{ "name" : "&nbsp;&nbsp;&nbsp;&nbsp;Mobile India", "value" : "blog/mobile-india" }, 'Product Central'=>'blog/product-central',
{ "name" : "&nbsp;&nbsp;&nbsp;&nbsp;Mobile News", "value" : "blog/mobile-news" }, 'Pulp Tech'=>'blog/violetblue',
{ "name" : "&nbsp;&nbsp;&nbsp;&nbsp;Networking", "value" : "blog/networking" }, 'Qubits and Pieces'=>'blog/qubits-and-pieces',
{ "name" : "&nbsp;&nbsp;&nbsp;&nbsp;Norse Code", "value" : "blog/norse-code" }, 'Securify This!'=>'blog/securify-this',
{ "name" : "&nbsp;&nbsp;&nbsp;&nbsp;Null Pointer", "value" : "blog/null-pointer" }, 'Service Oriented'=>'blog/service-oriented',
{ "name" : "&nbsp;&nbsp;&nbsp;&nbsp;The Full Tilt", "value" : "blog/the-full-tilt" }, 'Small Talk'=>'blog/small-talk',
{ "name" : "&nbsp;&nbsp;&nbsp;&nbsp;Pinoy Post", "value" : "blog/pinoy-post" }, 'Small Business Matters'=>'blog/small-business-matters',
{ "name" : "&nbsp;&nbsp;&nbsp;&nbsp;Practically Tech", "value" : "blog/practically-tech" }, 'Smartphones and Cell Phones'=>'blog/cell-phones',
{ "name" : "&nbsp;&nbsp;&nbsp;&nbsp;Product Central", "value" : "blog/product-central" }, 'Social Business'=>'blog/feeds',
{ "name" : "&nbsp;&nbsp;&nbsp;&nbsp;Pulp Tech", "value" : "blog/violetblue" }, 'Social CRM: The Conversation'=>'blog/crm',
{ "name" : "&nbsp;&nbsp;&nbsp;&nbsp;Qubits and Pieces", "value" : "blog/qubits-and-pieces" }, 'Software & Services Safari'=>'blog/sommer',
{ "name" : "&nbsp;&nbsp;&nbsp;&nbsp;Securify This!", "value" : "blog/securify-this" }, 'Storage Bits'=>'blog/storage',
{ "name" : "&nbsp;&nbsp;&nbsp;&nbsp;Service Oriented", "value" : "blog/service-oriented" }, 'Stacking up Open Clouds'=>'blog/apac-redhat',
{ "name" : "&nbsp;&nbsp;&nbsp;&nbsp;Small Talk", "value" : "blog/small-talk" }, 'Techie Isles'=>'blog/techie-isles',
{ "name" : "&nbsp;&nbsp;&nbsp;&nbsp;Small Business Matters", "value" : "blog/small-business-matters" }, 'Technolatte'=>'blog/technolatte',
{ "name" : "&nbsp;&nbsp;&nbsp;&nbsp;Smartphones and Cell Phones", "value" : "blog/cell-phones" }, 'Tech Podium'=>'blog/tech-podium',
{ "name" : "&nbsp;&nbsp;&nbsp;&nbsp;Social Business", "value" : "blog/feeds" }, 'Tel Aviv Tech'=>'blog/tel-aviv',
{ "name" : "&nbsp;&nbsp;&nbsp;&nbsp;Social CRM: The Conversation", "value" : "blog/crm" }, 'Tech Broiler'=>'blog/perlow',
{ "name" : "&nbsp;&nbsp;&nbsp;&nbsp;Software &amp; Services Safari", "value" : "blog/sommer" }, 'The SANMAN'=>'blog/the-sanman',
{ "name" : "&nbsp;&nbsp;&nbsp;&nbsp;Storage Bits", "value" : "blog/storage" }, 'The open source revolution'=>'blog/the-open-source-revolution',
{ "name" : "&nbsp;&nbsp;&nbsp;&nbsp;Stacking up Open Clouds", "value" : "blog/apac-redhat" }, 'The German View'=>'blog/german',
{ "name" : "&nbsp;&nbsp;&nbsp;&nbsp;Techie Isles", "value" : "blog/techie-isles" }, 'The Ed Bott Report'=>'blog/bott',
{ "name" : "&nbsp;&nbsp;&nbsp;&nbsp;Technolatte", "value" : "blog/technolatte" }, 'The Mobile Gadgeteer'=>'blog/mobile-gadgeteer',
{ "name" : "&nbsp;&nbsp;&nbsp;&nbsp;Tech Podium", "value" : "blog/tech-podium" }, 'The Apple Core'=>'blog/apple',
{ "name" : "&nbsp;&nbsp;&nbsp;&nbsp;Tel Aviv Tech", "value" : "blog/tel-aviv" }, 'Tom Foremski: IMHO'=>'blog/foremski',
{ "name" : "&nbsp;&nbsp;&nbsp;&nbsp;Tech Broiler", "value" : "blog/perlow" }, 'Twisted Wire'=>'blog/twisted-wire',
{ "name" : "&nbsp;&nbsp;&nbsp;&nbsp;The SANMAN", "value" : "blog/the-sanman" }, 'Vive la tech'=>'blog/france',
{ "name" : "&nbsp;&nbsp;&nbsp;&nbsp;The open source revolution", "value" : "blog/the-open-source-revolution" }, 'Virtually Speaking'=>'blog/virtualization',
{ "name" : "&nbsp;&nbsp;&nbsp;&nbsp;The German View", "value" : "blog/german" }, 'View from China'=>'blog/china',
{ "name" : "&nbsp;&nbsp;&nbsp;&nbsp;The Ed Bott Report", "value" : "blog/bott" }, 'Web design & Free Software'=>'blog/web-design-and-free-software',
{ "name" : "&nbsp;&nbsp;&nbsp;&nbsp;The Mobile Gadgeteer", "value" : "blog/mobile-gadgeteer" }, 'ZDNet Government'=>'blog/government',
{ "name" : "&nbsp;&nbsp;&nbsp;&nbsp;The Apple Core", "value" : "blog/apple" }, 'ZDNet UK Book Reviews'=>'blog/zdnet-uk-book-reviews',
{ "name" : "&nbsp;&nbsp;&nbsp;&nbsp;Tom Foremski: IMHO", "value" : "blog/foremski" }, 'ZDNet UK First Take'=>'blog/zdnet-uk-first-take',
{ "name" : "&nbsp;&nbsp;&nbsp;&nbsp;Twisted Wire", "value" : "blog/twisted-wire" }, 'Zero Day'=>'blog/security'
{ "name" : "&nbsp;&nbsp;&nbsp;&nbsp;Vive la tech", "value" : "blog/france" }, ),
{ "name" : "&nbsp;&nbsp;&nbsp;&nbsp;Virtually Speaking", "value" : "blog/virtualization" }, 'ZDNet Hot Topics RSS:'=>array(
{ "name" : "&nbsp;&nbsp;&nbsp;&nbsp;View from China", "value" : "blog/china" }, 'Apple'=>'topic/apple',
{ "name" : "&nbsp;&nbsp;&nbsp;&nbsp;Web design &amp; Free Software", "value" : "blog/web-design-and-free-software" }, 'Collaboration'=>'topic/collaboration',
{ "name" : "&nbsp;&nbsp;&nbsp;&nbsp;ZDNet Government", "value" : "blog/government" }, 'Enterprise Software'=>'topic/enterprise-software',
{ "name" : "&nbsp;&nbsp;&nbsp;&nbsp;ZDNet UK Book Reviews", "value" : "blog/zdnet-uk-book-reviews" }, 'Google'=>'topic/google',
{ "name" : "&nbsp;&nbsp;&nbsp;&nbsp;ZDNet UK First Take", "value" : "blog/zdnet-uk-first-take" }, 'Great debate'=>'topic/great-debate',
{ "name" : "&nbsp;&nbsp;&nbsp;&nbsp;Zero Day", "value" : "blog/security" }, 'Hardware'=>'topic/hardware',
'IBM'=>'topic/ibm',
{ "name" : "", "value" : "" }, 'iOS'=>'topic/ios',
{ "name" : "ZDNet Hot Topics RSS:", "value" : "" }, 'iPhone'=>'topic/iphone',
'iPad'=>'topic/ipad',
{ "name" : "&nbsp;&nbsp;&nbsp;&nbsp;Apple", "value" : "topic/apple" }, 'IT Priorities'=>'topic/it-priorities',
{ "name" : "&nbsp;&nbsp;&nbsp;&nbsp;Collaboration", "value" : "topic/collaboration" }, 'Laptops'=>'topic/laptops',
{ "name" : "&nbsp;&nbsp;&nbsp;&nbsp;Enterprise Software", "value" : "topic/enterprise-software" }, 'Legal'=>'topic/legal',
{ "name" : "&nbsp;&nbsp;&nbsp;&nbsp;Google", "value" : "topic/google" }, 'Linux'=>'topic/linux',
{ "name" : "&nbsp;&nbsp;&nbsp;&nbsp;Great debate", "value" : "topic/great-debate" }, 'Microsoft'=>'topic/microsoft',
{ "name" : "&nbsp;&nbsp;&nbsp;&nbsp;Hardware", "value" : "topic/hardware" }, 'Mobile OS'=>'topic/mobile-os',
{ "name" : "&nbsp;&nbsp;&nbsp;&nbsp;IBM", "value" : "topic/ibm" }, 'Mobility'=>'topic/mobility',
{ "name" : "&nbsp;&nbsp;&nbsp;&nbsp;iOS", "value" : "topic/ios" }, 'Networking'=>'topic/networking',
{ "name" : "&nbsp;&nbsp;&nbsp;&nbsp;iPhone", "value" : "topic/iphone" }, 'Oracle'=>'topic/oracle',
{ "name" : "&nbsp;&nbsp;&nbsp;&nbsp;iPad", "value" : "topic/ipad" }, 'Processors'=>'topic/processors',
{ "name" : "&nbsp;&nbsp;&nbsp;&nbsp;IT Priorities", "value" : "topic/it-priorities" }, 'Samsung'=>'topic/samsung',
{ "name" : "&nbsp;&nbsp;&nbsp;&nbsp;Laptops", "value" : "topic/laptops" }, 'Security'=>'topic/security',
{ "name" : "&nbsp;&nbsp;&nbsp;&nbsp;Legal", "value" : "topic/legal" }, 'Small business: going big on mobility'=>'topic/small-business-going-big-on-mobility'
{ "name" : "&nbsp;&nbsp;&nbsp;&nbsp;Linux", "value" : "topic/linux" }, ),
{ "name" : "&nbsp;&nbsp;&nbsp;&nbsp;Microsoft", "value" : "topic/microsoft" }, 'Product Blogs:'=>array(
{ "name" : "&nbsp;&nbsp;&nbsp;&nbsp;Mobile OS", "value" : "topic/mobile-os" }, 'Digital Cameras & Camcorders'=>'blog/digitalcameras',
{ "name" : "&nbsp;&nbsp;&nbsp;&nbsp;Mobility", "value" : "topic/mobility" }, 'Home Theater'=>'blog/home-theater',
{ "name" : "&nbsp;&nbsp;&nbsp;&nbsp;Networking", "value" : "topic/networking" }, 'Laptops and Desktops'=>'blog/computers',
{ "name" : "&nbsp;&nbsp;&nbsp;&nbsp;Oracle", "value" : "topic/oracle" }, 'The Mobile Gadgeteer'=>'blog/mobile-gadgeteer',
{ "name" : "&nbsp;&nbsp;&nbsp;&nbsp;Processors", "value" : "topic/processors" }, 'Smartphones and Cell Phones'=>'blog/cell-phones',
{ "name" : "&nbsp;&nbsp;&nbsp;&nbsp;Samsung", "value" : "topic/samsung" }, 'The ToyBox'=>'blog/gadgetreviews'
{ "name" : "&nbsp;&nbsp;&nbsp;&nbsp;Security", "value" : "topic/security" }, ),
{ "name" : "&nbsp;&nbsp;&nbsp;&nbsp;Small business: going big on mobility", "value" : "topic/small-business-going-big-on-mobility" }, 'Vertical Blogs:'=>array(
'ZDNet Education'=>'blog/education',
{ "name" : "", "value" : "" }, 'ZDNet Healthcare'=>'blog/healthcare',
{ "name" : "Product Blogs:", "value" : "" }, 'ZDNet Government'=>'blog/government'
)
{ "name" : "&nbsp;&nbsp;&nbsp;&nbsp;Digital Cameras &amp; Camcorders", "value" : "blog/digitalcameras" }, )
{ "name" : "&nbsp;&nbsp;&nbsp;&nbsp;Home Theater", "value" : "blog/home-theater" }, )
{ "name" : "&nbsp;&nbsp;&nbsp;&nbsp;Laptops and Desktops", "value" : "blog/computers" }, );
{ "name" : "&nbsp;&nbsp;&nbsp;&nbsp;The Mobile Gadgeteer", "value" : "blog/mobile-gadgeteer" },
{ "name" : "&nbsp;&nbsp;&nbsp;&nbsp;Smartphones and Cell Phones", "value" : "blog/cell-phones" },
{ "name" : "&nbsp;&nbsp;&nbsp;&nbsp;The ToyBox", "value" : "blog/gadgetreviews" },
{ "name" : "", "value" : "" },
{ "name" : "Vertical Blogs:", "value" : "" },
{ "name" : "&nbsp;&nbsp;&nbsp;&nbsp;ZDNet Education", "value" : "blog/education" },
{ "name" : "&nbsp;&nbsp;&nbsp;&nbsp;ZDNet Healthcare", "value" : "blog/healthcare" },
{ "name" : "&nbsp;&nbsp;&nbsp;&nbsp;ZDNet Government", "value" : "blog/government" }
]
}
]';
} }
public function collectData(array $param) { public function collectData(array $param) {

View file

@ -8,13 +8,9 @@ class ZoneTelechargementBridge extends BridgeAbstract {
$this->uri = 'https://www.zone-telechargement.com/'; $this->uri = 'https://www.zone-telechargement.com/';
$this->description = 'RSS proxy returning the newest releases.<br />You may specify a category found in RSS URLs, else main feed is selected.'; $this->description = 'RSS proxy returning the newest releases.<br />You may specify a category found in RSS URLs, else main feed is selected.';
$this->parameters[] = $this->parameters[] = array(
'[ 'category'=>array('name'=>'Category')
{ );
"name" : "Category",
"identifier" : "category"
}
]';
} }
public function collectData(array $param) { public function collectData(array $param) {