[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->description = "Bridge for allocine.fr";
$this->parameters[] =
'[
{
"name" : "category",
"identifier" : "category",
"type" : "list",
"required" : true,
"exampleValue" : "Faux Raccord",
"title" : "Select your category",
"values" :
[
{
"name" : "Faux Raccord",
"value" : "faux-raccord"
},
{
"name" : "Top 5",
"value" : "top-5"
},
{
"name" : "Tueurs En Serie",
"value" : "tuers-en-serie"
}
]
}
]';
$this->parameters[] = array(
'category'=>array(
'name'=>'category',
'type'=>'list',
'required'=>true,
'exampleValue'=>'Faux Raccord',
'title'=>'Select your category',
'values'=>array(
'Faux Raccord'=>'faux-raccord',
'Top 5'=>'top-5',
'Tueurs En Serie'=>'tuers-en-serie'
)
)
);
}
public function collectData(array $params){

View file

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

View file

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

View file

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

View file

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

View file

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

View file

@ -10,13 +10,9 @@ class CNETBridge extends BridgeAbstract {
$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->parameters[] =
'[
{
"name" : "Topic name",
"identifier" : "topic"
}
]';
$this->parameters[] = array(
'topic'=>array('name'=>'Topic name')
);
}
public function collectData(array $param) {

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

@ -8,16 +8,13 @@ class EZTVBridge extends BridgeAbstract{
$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->parameters[] =
'[
{
"name" : "Show ids",
"identifier" : "i",
"exampleValue" : "showID1,showID2,...",
"required": true
}
]';
$this->parameters[] = array(
'i'=>array(
'name'=>'Show ids',
'exampleValue'=>'showID1,showID2,…',
'required'=>true
)
);
}
public function collectData(array $param){

View file

@ -7,16 +7,14 @@ class ElsevierBridge extends BridgeAbstract{
$this->uri = 'http://www.journals.elsevier.com';
$this->description = 'Returns the recent articles published in Elsevier journals';
$this->parameters[] =
'[
{
"name" : "Journal name",
"identifier" : "j",
"required" : true,
"exampleValue" : "academic-pediatrics",
"title" : "Insert html-part of your journal"
}
]';
$this->parameters[] = array(
'j'=>array(
'name'=>'Journal name',
'required'=>true,
'exampleValue'=>'academic-pediactrics',
'title'=>'Insert html-part of your journal'
)
);
}
// 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->description = "Input a page title or a profile log. For a profile log, please insert the parameter as follow : myExamplePage/132621766841117";
$this->parameters[] =
'[
{
"name" : "Username",
"identifier" : "u",
"required" : true
}
]';
$this->parameters[] =array(
'u'=>array(
'name'=>'Username',
'required'=>true
)
);
}
public function collectData(array $param) {

View file

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

View file

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

View file

@ -9,19 +9,15 @@ class Freenews extends RssExpander {
$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->parameters[] =
'[
{
"name" : "Id de la rubrique (sans le \'-\')",
"identifier" : "id"
}
]';
$this->parameters[] = array(
'id'=>array('name'=>'Id de la rubrique (sans le \'-\')')
);
}
public function collectData(array $param){
parent::collectExpandableDatas($param, FREENEWS_RSS);
}
protected function parseRSSItem($newsItem) {
$item = new Item();
$item->title = trim($newsItem->title);

View file

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

View file

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

View file

@ -11,13 +11,9 @@ class Gawker extends RssExpander{
$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->parameters[] =
'[
{
"name" : "site id to put in uri between feeds.gawker.com and /full .. which is obviously not full AT ALL",
"identifier" : "site"
}
]';
$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')
);
}
@ -35,7 +31,7 @@ class Gawker extends RssExpander{
// $this->message("loading feed from ".$this->getURI());
parent::collectExpandableDatas($param, $url);
}
protected function parseRSSItem($newsItem) {
$item = new Item();
$item->uri = trim($newsItem->link);

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

@ -8,14 +8,12 @@ class LinkedInCompany extends BridgeAbstract{
$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->parameters[] =
'[
{
"name" : "Company name",
"identifier" : "c",
"required": true
}
]';
$this->parameters[] = array(
'c'=>array(
'name'=>'Company name',
'required'=>true
)
);
}
public function collectData(array $param){

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

@ -12,26 +12,14 @@ class PinterestBridge extends BridgeAbstract{
$this->uri = "http://www.pinterest.com";
$this->description = "Returns the newest images on a board";
$this->parameters["By username and board"] =
'[
{
"name" : "username",
"identifier" : "u"
},
{
"name" : "board",
"identifier" : "b"
$this->parameters["By username and board"] = array(
'u'=>array('name'=>'username'),
'b'=>array('name'=>'board')
);
}
]';
$this->parameters["From search"] =
'[
{
"name" : "Keyword",
"identifier" : "q"
}
]';
$this->parameters["From search"] = array(
'q'=>array('name'=>'Keyword')
);
}
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->maintainer = "Frenzie";
$this->parameters[] =
'[
{
"type" : "text",
"identifier" : "c",
"name" : "series id",
"exampleValue" : "9500",
"required" : true
}
]';
$this->parameters[] = array(
'c'=>array(
'name'=>'series id',
'exampleValue'=>9500,
'required'=>true
)
);
}
public function collectData(array $param) {

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

@ -8,14 +8,12 @@ class T411Bridge extends BridgeAbstract {
$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->parameters[] =
'[
{
"name" : "Search criteria",
"identifier" : "search",
"required": true
}
]';
$this->parameters[] = array(
'search'=>array(
'name'=>'Search criteria',
'required'=>true
)
);
}
public function collectData(array $param) {

View file

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

View file

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

View file

@ -8,14 +8,12 @@ class ThePirateBayBridge extends BridgeAbstract{
$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->parameters[] =
'[
{
"name" : "keywords, separated by semicolons",
"identifier" : "q",
"exampleValue" : "first list;second list;..."
}
]';
$this->parameters[] = array(
'q'=>array(
'name'=>'keywords, separated by semicolons',
'exampleValue'=>'first list;second list;…'
)
);
}
public function collectData(array $param){

View file

@ -14,64 +14,45 @@ class TwitchApiBridge extends BridgeAbstract{
$this->uri = "http://www.twitch.tv";
$this->description = "Returns the newest broadcasts or highlights by channel name using the Twitch API (v3)";
$this->parameters["Get channel without limit"] =
'[
{
"name" : "Channel",
"identifier" : "channel",
"required" : true
},
{
"name" : "Broadcasts",
"identifier" : "broadcasts",
"type" : "list",
"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 without limit"] = array(
'channel'=>array(
'name'=>'Channel',
'required'=>true
),
'broadcasts'=>array(
'name'=>'Broadcasts',
'type'=>'list',
'values'=>array(
'Show broadcasts'=>'true',
'Show highlights'=>'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){
/* 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."
/* 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."
* Now we prefer v3 right now and need to build the context options. */
$opts = array('https' =>
array(
@ -79,22 +60,22 @@ class TwitchApiBridge extends BridgeAbstract{
'header' => 'Accept: application/vnd.twitchtv.v3+json'
)
);
$context = stream_context_create($opts);
$channel = '';
$limit = TWITCH_LIMIT;
$broadcasts = TWITCH_BROADCASTS;
$requests = 1;
if(isset($param['channel'])) {
$channel = $param['channel'];
} else {
$this->returnClientError('You must specify a valid channel name! Received: &channel=' . $param['channel']);
}
$this->channel = $channel;
if(isset($param['limit'])) {
try {
$limit = (int)$param['limit'];
@ -104,39 +85,39 @@ class TwitchApiBridge extends BridgeAbstract{
} else {
$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.
if($limit < 1) { $limit = 1; }
if($limit > 100) {
$requests = (int)($limit / 100);
if($limit > 100) {
$requests = (int)($limit / 100);
if($limit % 100 != 0) { $requests++; }
}
if(isset($param['broadcasts']) && ($param['broadcasts'] == 'true' || $param['broadcasts'] == 'false')) {
$broadcasts = $param['broadcasts'];
} else {
$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
$request = '';
if($requests == 1) {
$request = 'https://api.twitch.tv/kraken/channels/' . $channel . '/videos?limit=' . $limit . '&broadcasts=' . $broadcasts;
} else {
$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. */
for($i = 0; $i < $requests; $i++) {
$response = $this->getSimpleHTMLDOM($request, false, $context);
if($response == false) {
$this->returnServerError('Request failed! Check if the channel name is valid!');
if($response == false) {
$this->returnServerError('Request failed! Check if the channel name is valid!');
}
$data = json_decode($response);
foreach($data->videos as $video) {
$item = new \Item();
$item->id = $video->_id;
@ -145,13 +126,13 @@ class TwitchApiBridge extends BridgeAbstract{
$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>';
$this->items[] = $item;
// Stop once the number of requested items is reached
if(count($this->items) >= $limit) {
break;
}
}
// Get next request (if available)
if(isset($data->_links->next)) {
$request = $data->_links->next;

View file

@ -8,50 +8,36 @@ class TwitterBridge extends BridgeAbstract{
$this->uri = "https://twitter.com/";
$this->description = "Returns tweets by keyword/hashtag or user name";
$this->parameters["global"] =
'[
{
"name" : "Hide profile pictures",
"identifier" : "nopic",
"type" : "checkbox",
"required" : false,
"exampleValue" : "checked",
"title" : "Activate to hide profile pictures in content"
}
]';
$this->parameters["global"] = array(
'nopic'=>array(
'name'=>'Hide profile pictures',
'type'=>'checkbox',
'title'=>'Activate to hide profile pictures in content'
)
);
$this->parameters["By keyword or hashtag"] =
'[
{
"name" : "Keyword or #hashtag",
"identifier" : "q",
"type" : "text",
"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 keyword or hashtag"] = array(
'q'=>array(
'name'=>'Keyword or #hashtag',
'required'=>true,
'exampleValue'=>'rss-bridge, #rss-bridge',
'title'=>'Insert a keyword or hashtag'
)
);
$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){

View file

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

View file

@ -8,14 +8,12 @@ class ViadeoCompany extends BridgeAbstract{
$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->parameters[] =
'[
{
"name" : "Company name",
"identifier" : "c",
"required" : true
}
]';
$this->parameters[] = array(
'c'=>array(
'name'=>'Company name',
'required'=>true
)
);
}
public function collectData(array $param){

View file

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

View file

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

View file

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

View file

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

View file

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

View file

@ -13,14 +13,12 @@ class WordPressBridge extends BridgeAbstract {
$this->uri = "https://wordpress.org/";
$this->description = "Returns the 3 newest full posts of a Wordpress blog";
$this->parameters[] =
'[
{
"name" : "blog URL",
"required" : true,
"identifier" : "url"
}
]';
$this->parameters[] = array(
'url'=>array(
'name'=>'Blog URL',
'required'=>true
)
);
}
// 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->description = "News about the tank slaughter game.";
$this->parameters[] =
'[
{
"name" : "ID de la catégorie",
"type" : "number",
"identifier" : "category"
},
{
"name" : "Langue",
"identifier" : "lang",
"type" : "list",
"values" : [
{
"name" : "Français",
"value" : "fr"
},
{
"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"
}
]
}
]';
$this->parameters[] = array(
'category'=>array(
'name'=>'ID de la catégorie',
'type'=>'number'
),
'lang'=>array(
'name'=>'Langue',
'type'=>'list',
'values'=>array(
'Français'=>'fr',
'English'=>'en',
'Español'=>'es',
'Deutsch'=>'de',
'Čeština'=>'cs',
'Polski'=>'pl',
'Türkçe'=>'tr'
)
)
);
}

View file

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

View file

@ -8,18 +8,13 @@ class YandereBridge extends BridgeAbstract{
$this->uri = "https://yande.re/";
$this->description = "Returns images from given page and tags";
$this->parameters[] =
'[
{
"name" : "page",
"identifier" : "p",
"type" : "number"
},
{
"name" : "tags",
"identifier" : "t"
}
]';
$this->parameters[] = array(
'p'=>array(
'name'=>'page',
'type'=>'number'
),
't'=>array('name'=>'tags')
);
}
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->maintainer = 'mitsukarenai';
$this->parameters['By username'] =
'[
{
"type" : "text",
"identifier" : "u",
"name" : "username",
"exampleValue" : "test",
"required" : true
}
]';
$this->parameters['By username'] = array(
'u'=>array(
'name'=>'username',
'exampleValue'=>'test',
'required'=>true
)
);
$this->parameters['By channel id'] =
'[
{
"type" : "text",
"identifier" : "c",
"name" : "channel id",
"exampleValue" : "15",
"required" : true
}
]';
$this->parameters['By channel id'] = array(
'c'=>array(
'name'=>'channel id',
'exampleValue'=>"15",
'required'=>true
)
);
$this->parameters['By playlist Id'] =
'[
{
"type" : "text",
"identifier" : "p",
"name" : "playlist id",
"exampleValue" : "15"
}
]';
$this->parameters['By playlist Id'] = array(
'p'=>array(
'name'=>'playlist id',
'exampleValue'=>"15"
)
);
$this->parameters['Search result'] =
'[
{
"type" : "text",
"identifier" : "s",
"name" : "search keyword",
"exampleValue" : "test"
},
{
"type" : "number",
"identifier" : "pa",
"name" : "page",
"exampleValue" : "1"
}
]';
$this->parameters['Search result'] = array(
's'=>array(
'name'=>'search keyword',
'exampleValue'=>'test'
),
'pa'=>array(
'name'=>'page',
'type'=>'number',
'exampleValue'=>1
)
);
}
private function ytBridgeQueryVideoInfo($vid, &$author, &$desc, &$time) {

View file

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

View file

@ -8,13 +8,9 @@ class ZoneTelechargementBridge extends BridgeAbstract {
$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->parameters[] =
'[
{
"name" : "Category",
"identifier" : "category"
}
]';
$this->parameters[] = array(
'category'=>array('name'=>'Category')
);
}
public function collectData(array $param) {