mirror of
https://github.com/RSS-Bridge/rss-bridge.git
synced 2025-08-13 03:54:04 +02:00
Ajout d'options multiples pour les méta-données.
Ajout d'un bridge de démonstration, DemoBridge. Ajout d'un début de documentation pour créer un bridge dans CREATE_BRIDGE.md
This commit is contained in:
@@ -1,6 +1,6 @@
|
||||
<?php
|
||||
/**
|
||||
* 2014-05-25
|
||||
*
|
||||
* @name Acrimed Bridge
|
||||
* @homepage http://www.acrimed.org/
|
||||
* @description Returns the newest articles.
|
||||
@@ -8,7 +8,16 @@
|
||||
*/
|
||||
class AcrimedBridge extends BridgeAbstract{
|
||||
|
||||
public function collectData(array $param){
|
||||
public function loadMetadatas() {
|
||||
|
||||
$this->maintainer = "qwertygc";
|
||||
$this->name = "Acrimed Bridge";
|
||||
$this->uri = "http://www.acrimed.org/";
|
||||
$this->description = "Returns the newest articles.";
|
||||
$this->update = "2014-05-25";
|
||||
|
||||
}
|
||||
public function collectData(array $param){
|
||||
|
||||
function StripCDATA($string) {
|
||||
$string = str_replace('<![CDATA[', '', $string);
|
||||
@@ -37,13 +46,6 @@ class AcrimedBridge extends BridgeAbstract{
|
||||
|
||||
}
|
||||
|
||||
public function getName(){
|
||||
return 'Acrimed Bridge';
|
||||
}
|
||||
|
||||
public function getURI(){
|
||||
return 'http://acrimed.org/';
|
||||
}
|
||||
|
||||
public function getCacheDuration(){
|
||||
return 3600*2; // 2 hours
|
||||
|
@@ -12,6 +12,46 @@
|
||||
*/
|
||||
class Arte7Bridge extends BridgeAbstract{
|
||||
|
||||
public function loadMetadatas() {
|
||||
|
||||
$this->maintainer = "mitsukarenai";
|
||||
$this->name = "Arte +7";
|
||||
$this->uri = "http://www.arte.tv/";
|
||||
$this->description = "Returns newest videos from ARTE +7";
|
||||
$this->update = "2015-10-31";
|
||||
$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"
|
||||
}
|
||||
|
||||
]
|
||||
|
||||
|
||||
}
|
||||
|
||||
]';
|
||||
}
|
||||
|
||||
|
||||
public function collectData(array $param){
|
||||
|
||||
function extractVideoset($category='toutes-les-videos', $lang='fr')
|
||||
|
72
bridges/DemoBridge.php
Normal file
72
bridges/DemoBridge.php
Normal file
@@ -0,0 +1,72 @@
|
||||
<?php
|
||||
/**
|
||||
* ABCTabsBridge
|
||||
* Returns the newest tabs
|
||||
*
|
||||
* @name ABC Tabs Bridge
|
||||
* @homepage http://www.abc-tabs.com/
|
||||
* @description Returns 22 newest tabs
|
||||
* @maintainer kranack
|
||||
* @update 2014-07-23
|
||||
*
|
||||
*/
|
||||
class DemoBridge extends BridgeAbstract{
|
||||
|
||||
public function loadMetadatas() {
|
||||
|
||||
$this->maintainer = "teromene";
|
||||
$this->name = "DemoBridge";
|
||||
$this->uri = "http://github.com/sebsauvage/rss-bridge";
|
||||
$this->description = "Bridge used for demos";
|
||||
$this->update = "2015-11-03";
|
||||
|
||||
$this->parameters['testCheckbox'] =
|
||||
'[
|
||||
{
|
||||
"type" : "checkbox",
|
||||
"identifier" : "testCheckbox",
|
||||
"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"
|
||||
|
||||
}
|
||||
|
||||
]';
|
||||
|
||||
}
|
||||
|
||||
public function collectData(array $param){
|
||||
|
||||
}
|
||||
|
||||
public function getCacheDuration(){
|
||||
return 3600; // 1 hour
|
||||
}
|
||||
}
|
@@ -9,7 +9,7 @@
|
||||
*/
|
||||
class FacebookBridge extends BridgeAbstract{
|
||||
|
||||
private $name;
|
||||
|
||||
|
||||
public function collectData(array $param){
|
||||
|
||||
|
Reference in New Issue
Block a user