forked from blallo/rss-bridge
[BridgeAbstract] replace getCacheDuration method by CACHE_TIMEOUT class constant
Signed-off-by: Pierre Mazière <pierre.maziere@gmx.com>
This commit is contained in:
parent
ad534444fa
commit
235c985901
81 changed files with 84 additions and 332 deletions
|
@ -4,6 +4,7 @@ class AcrimedBridge extends FeedExpander {
|
|||
const MAINTAINER = "qwertygc";
|
||||
const NAME = "Acrimed Bridge";
|
||||
const URI = "http://www.acrimed.org/";
|
||||
const CACHE_TIMEOUT = 4800; //2hours
|
||||
const DESCRIPTION = "Returns the newest articles.";
|
||||
|
||||
public function collectData(){
|
||||
|
@ -22,7 +23,4 @@ class AcrimedBridge extends FeedExpander {
|
|||
return $item;
|
||||
}
|
||||
|
||||
public function getCacheDuration(){
|
||||
return 4800; // 2 hours
|
||||
}
|
||||
}
|
||||
|
|
|
@ -5,6 +5,7 @@ class AllocineFRBridge extends BridgeAbstract{
|
|||
const MAINTAINER = "superbaillot.net";
|
||||
const NAME = "Allo Cine Bridge";
|
||||
const URI = "http://www.allocine.fr";
|
||||
const CACHE_TIMEOUT = 25200; // 7h
|
||||
const DESCRIPTION = "Bridge for allocine.fr";
|
||||
const PARAMETERS = array( array(
|
||||
'category'=>array(
|
||||
|
@ -78,7 +79,4 @@ class AllocineFRBridge extends BridgeAbstract{
|
|||
}
|
||||
}
|
||||
|
||||
public function getCacheDuration(){
|
||||
return 25200; // 7 hours
|
||||
}
|
||||
}
|
||||
|
|
|
@ -4,6 +4,7 @@ class AnimeUltimeBridge extends BridgeAbstract {
|
|||
const MAINTAINER = 'ORelio';
|
||||
const NAME = 'Anime-Ultime';
|
||||
const URI = 'http://www.anime-ultime.net/';
|
||||
const CACHE_TIMEOUT = 10800; // 3h
|
||||
const DESCRIPTION = 'Returns the 10 newest releases posted on Anime-Ultime';
|
||||
const PARAMETERS = array( array(
|
||||
'type'=>array(
|
||||
|
@ -115,8 +116,4 @@ class AnimeUltimeBridge extends BridgeAbstract {
|
|||
return 'Latest '.$typeFilter.' - Anime-Ultime Bridge';
|
||||
}
|
||||
|
||||
public function getCacheDuration() {
|
||||
return 3600*3; // 3 hours
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
@ -4,6 +4,7 @@
|
|||
const MAINTAINER = "mitsukarenai";
|
||||
const NAME = "Arte +7";
|
||||
const URI = "http://www.arte.tv/";
|
||||
const CACHE_TIMEOUT = 1800; // 30min
|
||||
const DESCRIPTION = "Returns newest videos from ARTE +7";
|
||||
const PARAMETERS = array(
|
||||
'Catégorie (Français)' => array(
|
||||
|
@ -86,7 +87,4 @@
|
|||
}
|
||||
}
|
||||
|
||||
public function getCacheDuration(){
|
||||
return 1800; // 30 minutes
|
||||
}
|
||||
}
|
||||
|
|
|
@ -4,6 +4,7 @@ class AskfmBridge extends BridgeAbstract{
|
|||
const MAINTAINER = "az5he6ch";
|
||||
const NAME = "Ask.fm Answers";
|
||||
const URI = "http://ask.fm/";
|
||||
const CACHE_TIMEOUT = 300; //5 min
|
||||
const DESCRIPTION = "Returns answers from an Ask.fm user";
|
||||
const PARAMETERS = array(
|
||||
'Ask.fm username'=>array(
|
||||
|
@ -48,9 +49,4 @@ class AskfmBridge extends BridgeAbstract{
|
|||
public function getURI(){
|
||||
return self::URI.urlencode($this->getInput('u')).'/answers/more?page=0';
|
||||
}
|
||||
|
||||
public function getCacheDuration(){
|
||||
return 300; // 5 minutes
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
@ -4,6 +4,7 @@ class BandcampBridge extends BridgeAbstract{
|
|||
const MAINTAINER = "sebsauvage";
|
||||
const NAME = "Bandcamp Tag";
|
||||
const URI = "http://bandcamp.com/";
|
||||
const CACHE_TIMEOUT = 600; // 10min
|
||||
const DESCRIPTION = "New bandcamp release by tag";
|
||||
const PARAMETERS = array( array(
|
||||
'tag'=>array(
|
||||
|
@ -39,8 +40,4 @@ class BandcampBridge extends BridgeAbstract{
|
|||
public function getName(){
|
||||
return $this->getInput('tag') .' - '.'Bandcamp Tag';
|
||||
}
|
||||
|
||||
public function getCacheDuration(){
|
||||
return 600; // 10 minutes
|
||||
}
|
||||
}
|
||||
|
|
|
@ -3,6 +3,7 @@ class BastaBridge extends BridgeAbstract{
|
|||
const MAINTAINER = "qwertygc";
|
||||
const NAME = "Bastamag Bridge";
|
||||
const URI = "http://www.bastamag.net/";
|
||||
const CACHE_TIMEOUT = 7200; // 2h
|
||||
const DESCRIPTION = "Returns the newest articles.";
|
||||
|
||||
public function collectData(){
|
||||
|
@ -27,9 +28,5 @@ class BastaBridge extends BridgeAbstract{
|
|||
}
|
||||
}
|
||||
}
|
||||
|
||||
public function getCacheDuration(){
|
||||
return 3600*2; // 2 hours
|
||||
}
|
||||
}
|
||||
?>
|
||||
|
|
|
@ -4,6 +4,7 @@ class BlaguesDeMerdeBridge extends BridgeAbstract{
|
|||
const MAINTAINER = "superbaillot.net";
|
||||
const NAME = "Blagues De Merde";
|
||||
const URI = "http://www.blaguesdemerde.fr/";
|
||||
const CACHE_TIMEOUT = 7200; // 2h
|
||||
const DESCRIPTION = "Blagues De Merde";
|
||||
|
||||
|
||||
|
@ -28,9 +29,5 @@ class BlaguesDeMerdeBridge extends BridgeAbstract{
|
|||
}
|
||||
}
|
||||
}
|
||||
|
||||
public function getCacheDuration(){
|
||||
return 7200; // 2h hours
|
||||
}
|
||||
}
|
||||
?>
|
||||
|
|
|
@ -3,6 +3,7 @@ class CADBridge extends FeedExpander {
|
|||
const MAINTAINER = "nyutag";
|
||||
const NAME = "CAD Bridge";
|
||||
const URI = "http://www.cad-comic.com/";
|
||||
const CACHE_TIMEOUT = 7200; //2h
|
||||
const DESCRIPTION = "Returns the newest articles.";
|
||||
|
||||
public function collectData(){
|
||||
|
@ -41,9 +42,5 @@ class CADBridge extends FeedExpander {
|
|||
return 'Daily comic not released yet';
|
||||
return '<img src="'.$img.'"/>';
|
||||
}
|
||||
|
||||
public function getCacheDuration(){
|
||||
return 3600*2; // 2 hours
|
||||
}
|
||||
}
|
||||
?>
|
||||
|
|
|
@ -4,6 +4,7 @@ class CNETBridge extends BridgeAbstract {
|
|||
const MAINTAINER = 'ORelio';
|
||||
const NAME = 'CNET News';
|
||||
const URI = 'http://www.cnet.com/';
|
||||
const CACHE_TIMEOUT = 1800; // 30min
|
||||
const DESCRIPTION = 'Returns the newest articles. <br /> You may specify a topic found in some section URLs, else all topics are selected.';
|
||||
|
||||
const PARAMETERS = array( array(
|
||||
|
@ -72,8 +73,4 @@ class CNETBridge extends BridgeAbstract {
|
|||
$topic=$this->getInput('topic');
|
||||
return 'CNET News Bridge'.(empty($topic) ? '' : ' - '.$topic);
|
||||
}
|
||||
|
||||
public function getCacheDuration() {
|
||||
return 1800; // 30 minutes
|
||||
}
|
||||
}
|
||||
|
|
|
@ -3,6 +3,7 @@ class CastorusBridge extends BridgeAbstract {
|
|||
const MAINTAINER = "logmanoriginal";
|
||||
const NAME = "Castorus Bridge";
|
||||
const URI = 'http://www.castorus.com';
|
||||
const CACHE_TIMEOUT = 600; // 10min
|
||||
const DESCRIPTION = "Returns the latest changes";
|
||||
|
||||
const PARAMETERS = array(
|
||||
|
@ -107,8 +108,4 @@ class CastorusBridge extends BridgeAbstract {
|
|||
$this->items[] = $item;
|
||||
}
|
||||
}
|
||||
|
||||
public function getCacheDuration(){
|
||||
return 600; // 10 minutes
|
||||
}
|
||||
}
|
||||
|
|
|
@ -4,6 +4,7 @@ class CollegeDeFranceBridge extends BridgeAbstract{
|
|||
const MAINTAINER = "pit-fgfjiudghdf";
|
||||
const NAME = "CollegeDeFrance";
|
||||
const URI = "http://www.college-de-france.fr/";
|
||||
const CACHE_TIMEOUT = 10800; // 3h
|
||||
const DESCRIPTION = "Returns the latest audio and video from CollegeDeFrance";
|
||||
|
||||
public function collectData(){
|
||||
|
@ -66,8 +67,4 @@ class CollegeDeFranceBridge extends BridgeAbstract{
|
|||
$this->items[] = $item;
|
||||
}
|
||||
}
|
||||
|
||||
public function getCacheDuration(){
|
||||
return 3600*3; // 3 hours
|
||||
}
|
||||
}
|
||||
|
|
|
@ -4,6 +4,7 @@ class CopieDoubleBridge extends BridgeAbstract{
|
|||
const MAINTAINER = "superbaillot.net";
|
||||
const NAME = "CopieDouble";
|
||||
const URI = "http://www.copie-double.com/";
|
||||
const CACHE_TIMEOUT = 14400; // 4h
|
||||
const DESCRIPTION = "CopieDouble";
|
||||
|
||||
public function collectData(){
|
||||
|
@ -35,8 +36,4 @@ class CopieDoubleBridge extends BridgeAbstract{
|
|||
}
|
||||
}
|
||||
}
|
||||
|
||||
public function getCacheDuration(){
|
||||
return 14400; // 4 hours
|
||||
}
|
||||
}
|
||||
|
|
|
@ -4,6 +4,7 @@ class CourrierInternationalBridge extends BridgeAbstract{
|
|||
const MAINTAINER = "teromene";
|
||||
const NAME = "Courrier International Bridge";
|
||||
const URI = "http://CourrierInternational.com/";
|
||||
const CACHE_TIMEOUT = 300; // 5 min
|
||||
const DESCRIPTION = "Courrier International bridge";
|
||||
|
||||
public function collectData(){
|
||||
|
@ -52,10 +53,6 @@ class CourrierInternationalBridge extends BridgeAbstract{
|
|||
|
||||
|
||||
}
|
||||
|
||||
public function getCacheDuration(){
|
||||
return 300; // 5 minutes
|
||||
}
|
||||
}
|
||||
|
||||
?>
|
||||
|
|
|
@ -4,6 +4,7 @@ class CpasbienBridge extends BridgeAbstract {
|
|||
const MAINTAINER = "lagaisse";
|
||||
const NAME = "Cpasbien Bridge";
|
||||
const URI = "http://www.cpasbien.io";
|
||||
const CACHE_TIMEOUT = 86400; // 24h
|
||||
const DESCRIPTION = "Returns latest torrents from a request query";
|
||||
|
||||
const PARAMETERS = array( array(
|
||||
|
@ -49,8 +50,4 @@ class CpasbienBridge extends BridgeAbstract {
|
|||
public function getName(){
|
||||
return $this->getInput('q').' : '.self::NAME;
|
||||
}
|
||||
|
||||
public function getCacheDuration(){
|
||||
return 60*60*24; // 24 hours
|
||||
}
|
||||
}
|
||||
|
|
|
@ -4,6 +4,7 @@ class CryptomeBridge extends BridgeAbstract{
|
|||
const MAINTAINER = "BoboTiG";
|
||||
const NAME = "Cryptome";
|
||||
const URI = "https://cryptome.org/";
|
||||
const CACHE_TIMEOUT = 21600; //6h
|
||||
const DESCRIPTION = "Returns the N most recent documents.";
|
||||
|
||||
const PARAMETERS = array( array(
|
||||
|
@ -35,8 +36,4 @@ class CryptomeBridge extends BridgeAbstract{
|
|||
break;
|
||||
}
|
||||
}
|
||||
|
||||
public function getCacheDuration(){
|
||||
return 21600; // 6 hours
|
||||
}
|
||||
}
|
||||
|
|
|
@ -4,6 +4,7 @@ class DailymotionBridge extends BridgeAbstract{
|
|||
const MAINTAINER = "mitsukarenai";
|
||||
const NAME = "Dailymotion Bridge";
|
||||
const URI = "https://www.dailymotion.com/";
|
||||
const CACHE_TIMEOUT = 10800; // 3h
|
||||
const DESCRIPTION = "Returns the 5 newest videos by username/playlist or search";
|
||||
|
||||
const PARAMETERS = array (
|
||||
|
@ -110,8 +111,4 @@ class DailymotionBridge extends BridgeAbstract{
|
|||
}
|
||||
return $uri;
|
||||
}
|
||||
|
||||
public function getCacheDuration(){
|
||||
return 3600*3; // 3 hours
|
||||
}
|
||||
}
|
||||
|
|
|
@ -4,6 +4,7 @@ class DanbooruBridge extends BridgeAbstract{
|
|||
const MAINTAINER = "mitsukarenai";
|
||||
const NAME = "Danbooru";
|
||||
const URI = "http://donmai.us/";
|
||||
const CACHE_TIMEOUT = 1800; // 30min
|
||||
const DESCRIPTION = "Returns images from given page";
|
||||
|
||||
const PARAMETERS = array(
|
||||
|
@ -47,8 +48,4 @@ class DanbooruBridge extends BridgeAbstract{
|
|||
$this->items[] = $this->getItemFromElement($element);
|
||||
}
|
||||
}
|
||||
|
||||
public function getCacheDuration(){
|
||||
return 1800; // 30 minutes
|
||||
}
|
||||
}
|
||||
|
|
|
@ -4,6 +4,7 @@ class DansTonChatBridge extends BridgeAbstract{
|
|||
const MAINTAINER = "Astalaseven";
|
||||
const NAME = "DansTonChat Bridge";
|
||||
const URI = "http://danstonchat.com/";
|
||||
const CACHE_TIMEOUT = 21600; //6h
|
||||
const DESCRIPTION = "Returns latest quotes from DansTonChat.";
|
||||
|
||||
public function collectData(){
|
||||
|
@ -19,8 +20,4 @@ class DansTonChatBridge extends BridgeAbstract{
|
|||
$this->items[] = $item;
|
||||
}
|
||||
}
|
||||
|
||||
public function getCacheDuration(){
|
||||
return 21600; // 6 hours
|
||||
}
|
||||
}
|
||||
|
|
|
@ -4,6 +4,7 @@ class DauphineLibereBridge extends FeedExpander {
|
|||
const MAINTAINER = "qwertygc";
|
||||
const NAME = "Dauphine Bridge";
|
||||
const URI = "http://www.ledauphine.com/";
|
||||
const CACHE_TIMEOUT = 7200; // 2h
|
||||
const DESCRIPTION = "Returns the newest articles.";
|
||||
|
||||
const PARAMETERS = array( array(
|
||||
|
@ -52,9 +53,5 @@ class DauphineLibereBridge extends FeedExpander {
|
|||
$text = preg_replace('@<script[^>]*?>.*?</script>@si', '', $text);
|
||||
return $text;
|
||||
}
|
||||
|
||||
public function getCacheDuration(){
|
||||
return 3600*2; // 2 hours
|
||||
}
|
||||
}
|
||||
?>
|
||||
|
|
|
@ -46,8 +46,4 @@ class DemoBridge extends BridgeAbstract{
|
|||
$this->items[] = $item;
|
||||
|
||||
}
|
||||
|
||||
public function getCacheDuration(){
|
||||
return 00; // 1 hour
|
||||
}
|
||||
}
|
||||
|
|
|
@ -4,6 +4,7 @@ class DeveloppezDotComBridge extends FeedExpander {
|
|||
const MAINTAINER = "polopollo";
|
||||
const NAME = "Developpez.com Actus (FR)";
|
||||
const URI = "http://www.developpez.com/";
|
||||
const CACHE_TIMEOUT = 1800; // 30min
|
||||
const DESCRIPTION = "Returns the 15 newest posts from DeveloppezDotCom (full text).";
|
||||
|
||||
public function collectData(){
|
||||
|
@ -47,8 +48,4 @@ class DeveloppezDotComBridge extends FeedExpander {
|
|||
$text = utf8_encode($text);
|
||||
return trim($text);
|
||||
}
|
||||
|
||||
public function getCacheDuration(){
|
||||
return 1800; // 30min
|
||||
}
|
||||
}
|
||||
|
|
|
@ -4,6 +4,7 @@ class DilbertBridge extends BridgeAbstract {
|
|||
const MAINTAINER = 'kranack';
|
||||
const NAME = 'Dilbert Daily Strip';
|
||||
const URI = 'http://dilbert.com';
|
||||
const CACHE_TIMEOUT = 21600; // 6h
|
||||
const DESCRIPTION = 'The Unofficial Dilbert Daily Comic Strip';
|
||||
|
||||
public function collectData(){
|
||||
|
@ -31,9 +32,5 @@ class DilbertBridge extends BridgeAbstract {
|
|||
$this->items[] = $item;
|
||||
}
|
||||
}
|
||||
|
||||
public function getCacheDuration() {
|
||||
return 21600; // 6 hours
|
||||
}
|
||||
}
|
||||
?>
|
||||
|
|
|
@ -4,6 +4,7 @@ class DuckDuckGoBridge extends BridgeAbstract{
|
|||
const MAINTAINER = "Astalaseven";
|
||||
const NAME = "DuckDuckGo";
|
||||
const URI = "https://duckduckgo.com/";
|
||||
const CACHE_TIMEOUT = 21600; // 6h
|
||||
const DESCRIPTION = "Returns most recent results from DuckDuckGo.";
|
||||
|
||||
const PARAMETERS = array( array(
|
||||
|
@ -24,8 +25,4 @@ class DuckDuckGoBridge extends BridgeAbstract{
|
|||
$this->items[] = $item;
|
||||
}
|
||||
}
|
||||
|
||||
public function getCacheDuration(){
|
||||
return 21600; // 6 hours
|
||||
}
|
||||
}
|
||||
|
|
|
@ -4,6 +4,7 @@ class EliteDangerousGalnetBridge extends BridgeAbstract
|
|||
const MAINTAINER = "corenting";
|
||||
const NAME = "Elite: Dangerous Galnet";
|
||||
const URI = "https://community.elitedangerous.com/galnet/";
|
||||
const CACHE_TIMEOUT = 7200; // 2h
|
||||
const DESCRIPTION = "Returns the latest page of news from Galnet";
|
||||
|
||||
public function collectData()
|
||||
|
@ -31,9 +32,4 @@ class EliteDangerousGalnetBridge extends BridgeAbstract
|
|||
$this->items[] = $item;
|
||||
}
|
||||
}
|
||||
|
||||
public function getCacheDuration()
|
||||
{
|
||||
return 3600 * 2; // 2 hours
|
||||
}
|
||||
}
|
||||
|
|
|
@ -3,6 +3,7 @@ class ElsevierBridge extends BridgeAbstract{
|
|||
const MAINTAINER = 'Pierre Mazière';
|
||||
const NAME = 'Elsevier journals recent articles';
|
||||
const URI = 'http://www.journals.elsevier.com/';
|
||||
const CACHE_TIMEOUT = 43200; //12h
|
||||
const DESCRIPTION = 'Returns the recent articles published in Elsevier journals';
|
||||
|
||||
const PARAMETERS = array( array(
|
||||
|
@ -69,9 +70,5 @@ class ElsevierBridge extends BridgeAbstract{
|
|||
$this->items[] = $item;
|
||||
}
|
||||
}
|
||||
|
||||
public function getCacheDuration(){
|
||||
return 43200; // 12h
|
||||
}
|
||||
}
|
||||
?>
|
||||
|
|
|
@ -4,6 +4,7 @@ class EstCeQuonMetEnProdBridge extends BridgeAbstract {
|
|||
const MAINTAINER = 'ORelio';
|
||||
const NAME = 'Est-ce qu\'on met en prod aujourd\'hui ?';
|
||||
const URI = 'https://www.estcequonmetenprodaujourdhui.info/';
|
||||
const CACHE_TIMEOUT = 21600; // 6h
|
||||
const DESCRIPTION = 'Should we put a website in production today? (French)';
|
||||
|
||||
public function collectData(){
|
||||
|
@ -25,9 +26,5 @@ class EstCeQuonMetEnProdBridge extends BridgeAbstract {
|
|||
$item['content'] = str_replace('src="/', 'src="'.$this->getURI(), trim(ExtractFromDelimiters($html->outertext, '<body role="document">', '<br /><br />')));
|
||||
$this->items[] = $item;
|
||||
}
|
||||
|
||||
public function getCacheDuration() {
|
||||
return 21600; // 6 hours
|
||||
}
|
||||
}
|
||||
?>
|
||||
|
|
|
@ -4,6 +4,7 @@ class FacebookBridge extends BridgeAbstract{
|
|||
const MAINTAINER = "teromene";
|
||||
const NAME = "Facebook";
|
||||
const URI = "https://www.facebook.com/";
|
||||
const CACHE_TIMEOUT = 300; // 5min
|
||||
const DESCRIPTION = "Input a page title or a profile log. For a profile log, please insert the parameter as follow : myExamplePage/132621766841117";
|
||||
|
||||
const PARAMETERS =array( array(
|
||||
|
@ -206,8 +207,4 @@ class FacebookBridge extends BridgeAbstract{
|
|||
public function getName() {
|
||||
return (isset($this->authorName) ? $this->authorName.' - ' : '').'Facebook Bridge';
|
||||
}
|
||||
|
||||
public function getCacheDuration() {
|
||||
return 300; // 5 minutes
|
||||
}
|
||||
}
|
||||
|
|
|
@ -4,6 +4,7 @@ class FierPandaBridge extends BridgeAbstract {
|
|||
const MAINTAINER = "snroki";
|
||||
const NAME = "Fier Panda Bridge";
|
||||
const URI = "http://www.fier-panda.fr/";
|
||||
const CACHE_TIMEOUT = 21600; // 6h
|
||||
const DESCRIPTION = "Returns latest articles from Fier Panda.";
|
||||
|
||||
public function collectData(){
|
||||
|
@ -19,8 +20,4 @@ class FierPandaBridge extends BridgeAbstract {
|
|||
$this->items[] = $item;
|
||||
}
|
||||
}
|
||||
|
||||
public function getCacheDuration(){
|
||||
return 21600; // 6 hours
|
||||
}
|
||||
}
|
||||
|
|
|
@ -4,6 +4,7 @@ class FlickrExploreBridge extends BridgeAbstract{
|
|||
const MAINTAINER = "sebsauvage";
|
||||
const NAME = "Flickr Explore";
|
||||
const URI = "https://www.flickr.com/";
|
||||
const CACHE_TIMEOUT = 21600; // 6
|
||||
const DESCRIPTION = "Returns the latest interesting images from Flickr";
|
||||
|
||||
public function collectData(){
|
||||
|
@ -38,8 +39,4 @@ class FlickrExploreBridge extends BridgeAbstract{
|
|||
$this->items[] = $item;
|
||||
}
|
||||
}
|
||||
|
||||
public function getCacheDuration(){
|
||||
return 21600; // 6 hours
|
||||
}
|
||||
}
|
||||
|
|
|
@ -4,6 +4,7 @@ class FlickrTagBridge extends BridgeAbstract{
|
|||
const MAINTAINER = "erwang";
|
||||
const NAME = "Flickr TagUser";
|
||||
const URI = "http://www.flickr.com/";
|
||||
const CACHE_TIMEOUT = 21600; //6h
|
||||
const DESCRIPTION = "Returns the tagged or user images from Flickr";
|
||||
|
||||
const PARAMETERS = array(
|
||||
|
@ -43,9 +44,5 @@ class FlickrTagBridge extends BridgeAbstract{
|
|||
$this->items[] = $item;
|
||||
}
|
||||
}
|
||||
|
||||
public function getCacheDuration(){
|
||||
return 21600; // 6 hours
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -4,6 +4,7 @@ class FourchanBridge extends BridgeAbstract{
|
|||
const MAINTAINER = "mitsukarenai";
|
||||
const NAME = "4chan";
|
||||
const URI = "https://boards.4chan.org/";
|
||||
const CACHE_TIMEOUT = 300; // 5min
|
||||
const DESCRIPTION = "Returns posts from the specified thread";
|
||||
|
||||
const PARAMETERS = array( array(
|
||||
|
@ -64,8 +65,4 @@ class FourchanBridge extends BridgeAbstract{
|
|||
}
|
||||
$this->items = array_reverse($this->items);
|
||||
}
|
||||
|
||||
public function getCacheDuration(){
|
||||
return 300; // 5min
|
||||
}
|
||||
}
|
||||
|
|
|
@ -121,9 +121,4 @@ class GBAtempBridge extends BridgeAbstract {
|
|||
);
|
||||
return 'GBAtemp '.$type.' Bridge';
|
||||
}
|
||||
|
||||
public function getCacheDuration() {
|
||||
return ($this->filter === 'Forum') ? 300 : 3600; // 5 minutes / 1 hour
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
@ -6,6 +6,7 @@ class GiphyBridge extends BridgeAbstract{
|
|||
const MAINTAINER = "kraoc";
|
||||
const NAME = "Giphy Bridge";
|
||||
const URI = "http://giphy.com/";
|
||||
const CACHE_TIMEOUT = 300; //5min
|
||||
const DESCRIPTION = "Bridge for giphy.com";
|
||||
|
||||
const PARAMETERS = array( array(
|
||||
|
@ -67,8 +68,4 @@ class GiphyBridge extends BridgeAbstract{
|
|||
}
|
||||
}
|
||||
}
|
||||
|
||||
public function getCacheDuration(){
|
||||
return 300; // 5 minutes
|
||||
}
|
||||
}
|
||||
|
|
|
@ -4,6 +4,7 @@ class GithubIssueBridge extends BridgeAbstract{
|
|||
const MAINTAINER = 'Pierre Mazière';
|
||||
const NAME = 'Github Issue';
|
||||
const URI = 'https://github.com/';
|
||||
const CACHE_TIMEOUT = 600; // 10min
|
||||
const DESCRIPTION = 'Returns the issues or comments of an issue of a github project';
|
||||
|
||||
const PARAMETERS=array(
|
||||
|
@ -152,7 +153,7 @@ class GithubIssueBridge extends BridgeAbstract{
|
|||
|
||||
if($this->getInput('c')){
|
||||
$uri=static::URI.$this->getInput('u').'/'.$this->getInput('p').'/issues/'.$issueNbr;
|
||||
$issue=$this->getSimpleHTMLDOMCached($uri,1800);
|
||||
$issue=$this->getSimpleHTMLDOMCached($uri,static::CACHE_TIMEOUT);
|
||||
if($issue){
|
||||
$this->items=array_merge($this->items,$this->extractIssueComments($issue));
|
||||
continue;
|
||||
|
@ -186,8 +187,4 @@ class GithubIssueBridge extends BridgeAbstract{
|
|||
$item['title']=preg_replace('/\s+/',' ',$item['title']);
|
||||
});
|
||||
}
|
||||
|
||||
public function getCacheDuration(){
|
||||
return 600; // ten minutes
|
||||
}
|
||||
}
|
||||
|
|
|
@ -4,6 +4,7 @@ class GizmodoBridge extends FeedExpander {
|
|||
const MAINTAINER = "polopollo";
|
||||
const NAME = "Gizmodo";
|
||||
const URI = "http://gizmodo.com/";
|
||||
const CACHE_TIMEOUT = 1800; // 30min
|
||||
const DESCRIPTION = "Returns the newest posts from Gizmodo (full text).";
|
||||
|
||||
protected function parseItem($item){
|
||||
|
@ -28,8 +29,4 @@ class GizmodoBridge extends FeedExpander {
|
|||
public function collectData(){
|
||||
$this->collectExpandableDatas('http://feeds.gawker.com/gizmodo/full');
|
||||
}
|
||||
|
||||
public function getCacheDuration(){
|
||||
return 1800; // 30min
|
||||
}
|
||||
}
|
||||
|
|
|
@ -7,6 +7,7 @@ class GooglePlusPostBridge extends BridgeAbstract
|
|||
const MAINTAINER = "Grummfy";
|
||||
const NAME = "Google Plus Post Bridge";
|
||||
const URI = "https://plus.google.com/";
|
||||
const CACHE_TIMEOUT = 600; //10min
|
||||
const DESCRIPTION = "Returns user public post (without API).";
|
||||
|
||||
const PARAMETERS = array( array(
|
||||
|
@ -109,9 +110,4 @@ class GooglePlusPostBridge extends BridgeAbstract
|
|||
{
|
||||
return $this->_url ?: self::URI;
|
||||
}
|
||||
|
||||
public function getCacheDuration()
|
||||
{
|
||||
return 1; // 600; // 10 minutes
|
||||
}
|
||||
}
|
||||
|
|
|
@ -12,6 +12,7 @@ class GoogleSearchBridge extends BridgeAbstract{
|
|||
const MAINTAINER = "sebsauvage";
|
||||
const NAME = "Google search";
|
||||
const URI = "https://www.google.com/";
|
||||
const CACHE_TIMEOUT = 1800; // 30min
|
||||
const DESCRIPTION = "Returns most recent results from Google search.";
|
||||
|
||||
const PARAMETERS = array( array(
|
||||
|
@ -50,8 +51,4 @@ class GoogleSearchBridge extends BridgeAbstract{
|
|||
public function getName(){
|
||||
return $this->getInput('q') .' - Google search';
|
||||
}
|
||||
|
||||
public function getCacheDuration(){
|
||||
return 1800; // 30 minutes
|
||||
}
|
||||
}
|
||||
|
|
|
@ -3,6 +3,7 @@ class HDWallpapersBridge extends BridgeAbstract {
|
|||
const MAINTAINER = "nel50n";
|
||||
const NAME = "HD Wallpapers Bridge";
|
||||
const URI = "http://www.hdwallpapers.in/";
|
||||
const CACHE_TIMEOUT = 43200; //12h
|
||||
const DESCRIPTION = "Returns the latests wallpapers from HDWallpapers";
|
||||
|
||||
const PARAMETERS = array( array(
|
||||
|
@ -58,8 +59,4 @@ class HDWallpapersBridge extends BridgeAbstract {
|
|||
public function getName(){
|
||||
return 'HDWallpapers - '.str_replace(['__', '_'], [' & ', ' '], $this->getInput('c')).' ['.$this->getInput('r').']';
|
||||
}
|
||||
|
||||
public function getCacheDuration(){
|
||||
return 43200; // 12 hours
|
||||
}
|
||||
}
|
||||
|
|
|
@ -4,6 +4,7 @@ class HentaiHavenBridge extends BridgeAbstract{
|
|||
const MAINTAINER = "albirew";
|
||||
const NAME = "Hentai Haven";
|
||||
const URI = "http://hentaihaven.org/";
|
||||
const CACHE_TIMEOUT = 21600; // 6h
|
||||
const DESCRIPTION = "Returns releases from Hentai Haven";
|
||||
|
||||
public function collectData(){
|
||||
|
@ -19,8 +20,4 @@ class HentaiHavenBridge extends BridgeAbstract{
|
|||
$this->items[] = $item;
|
||||
}
|
||||
}
|
||||
|
||||
public function getCacheDuration(){
|
||||
return 21600; // 6 hours
|
||||
}
|
||||
}
|
||||
|
|
|
@ -4,6 +4,7 @@ class IdenticaBridge extends BridgeAbstract{
|
|||
const MAINTAINER = "mitsukarenai";
|
||||
const NAME = "Identica Bridge";
|
||||
const URI = "https://identi.ca/";
|
||||
const CACHE_TIMEOUT = 300; // 5min
|
||||
const DESCRIPTION = "Returns user timelines";
|
||||
|
||||
const PARAMETERS = array( array(
|
||||
|
@ -34,8 +35,4 @@ class IdenticaBridge extends BridgeAbstract{
|
|||
public function getURI(){
|
||||
return self::URI.urlencode($this->getInput('u'));
|
||||
}
|
||||
|
||||
public function getCacheDuration(){
|
||||
return 300; // 5 minutes
|
||||
}
|
||||
}
|
||||
|
|
|
@ -3,6 +3,7 @@ class IsoHuntBridge extends BridgeAbstract{
|
|||
const MAINTAINER = 'logmanoriginal';
|
||||
const NAME = 'isoHunt Bridge';
|
||||
const URI = 'https://isohunt.to/';
|
||||
const CACHE_TIMEOUT = 300; //5min
|
||||
const DESCRIPTION = 'Returns the latest results by category or search result';
|
||||
|
||||
const PARAMETERS = array(
|
||||
|
@ -199,10 +200,6 @@ class IsoHuntBridge extends BridgeAbstract{
|
|||
}
|
||||
}
|
||||
|
||||
public function getCacheDuration(){
|
||||
return 300; // 5 minutes
|
||||
}
|
||||
|
||||
#region Helper functions for "Movie Torrents"
|
||||
|
||||
private function get_movie_torrents($html){
|
||||
|
|
|
@ -4,6 +4,7 @@ class JapanExpoBridge extends BridgeAbstract {
|
|||
const MAINTAINER = 'Ginko';
|
||||
const NAME = 'Japan Expo Actualités';
|
||||
const URI = 'http://www.japan-expo-paris.com/fr/actualites';
|
||||
const CACHE_TIMEOUT = 14400; // 4h
|
||||
const DESCRIPTION = 'Returns most recent entries from Japan Expo actualités.';
|
||||
const PARAMETERS = array( array(
|
||||
'mode'=>array(
|
||||
|
@ -85,8 +86,4 @@ class JapanExpoBridge extends BridgeAbstract {
|
|||
$count++;
|
||||
}
|
||||
}
|
||||
|
||||
public function getCacheDuration(){
|
||||
return 14400; // 4 hours
|
||||
}
|
||||
}
|
||||
|
|
|
@ -3,6 +3,7 @@ class KununuBridge extends BridgeAbstract {
|
|||
const MAINTAINER = "logmanoriginal";
|
||||
const NAME = "Kununu Bridge";
|
||||
const URI = "https://www.kununu.com/";
|
||||
const CACHE_TIMEOUT = 86400; // 24h
|
||||
const DESCRIPTION = "Returns the latest reviews for a company and site of your choice.";
|
||||
|
||||
const PARAMETERS = array(
|
||||
|
@ -101,10 +102,6 @@ class KununuBridge extends BridgeAbstract {
|
|||
}
|
||||
}
|
||||
|
||||
public function getCacheDuration(){
|
||||
return 86400; // 1 day
|
||||
}
|
||||
|
||||
/**
|
||||
* Fixes relative URLs in the given text
|
||||
*/
|
||||
|
|
|
@ -3,6 +3,7 @@ class LWNprevBridge extends BridgeAbstract{
|
|||
const MAINTAINER = 'Pierre Mazière';
|
||||
const NAME = 'LWN Free Weekly Edition';
|
||||
const URI = 'https://lwn.net/';
|
||||
const CACHE_TIMEOUT = 604800; // 1 week
|
||||
const DESCRIPTION = 'LWN Free Weekly Edition available one week late';
|
||||
|
||||
function getURI(){
|
||||
|
@ -140,8 +141,4 @@ class LWNprevBridge extends BridgeAbstract{
|
|||
$this->items[]=$item;
|
||||
}
|
||||
}
|
||||
|
||||
public function getCacheDuration(){
|
||||
return 604800; // one week
|
||||
}
|
||||
}
|
||||
|
|
|
@ -4,6 +4,7 @@ class LeMondeInformatiqueBridge extends FeedExpander {
|
|||
const MAINTAINER = "ORelio";
|
||||
const NAME = "Le Monde Informatique";
|
||||
const URI = "http://www.lemondeinformatique.fr/";
|
||||
const CACHE_TIMEOUT = 1800; // 30min
|
||||
const DESCRIPTION = "Returns the newest articles.";
|
||||
|
||||
public function collectData(){
|
||||
|
@ -38,8 +39,4 @@ class LeMondeInformatiqueBridge extends FeedExpander {
|
|||
$article_html = $this->StripWithDelimiters($article_html, '<h1 class="cleanprint-title"', '</h1>');
|
||||
return $article_html;
|
||||
}
|
||||
|
||||
public function getCacheDuration() {
|
||||
return 1800; // 30 minutes
|
||||
}
|
||||
}
|
||||
|
|
|
@ -4,6 +4,7 @@ class LesJoiesDuCodeBridge extends BridgeAbstract{
|
|||
const MAINTAINER = "superbaillot.net";
|
||||
const NAME = "Les Joies Du Code";
|
||||
const URI = "http://lesjoiesducode.fr/";
|
||||
const CACHE_TIMEOUT = 7200; // 2h
|
||||
const DESCRIPTION = "LesJoiesDuCode";
|
||||
|
||||
public function collectData(){
|
||||
|
@ -43,8 +44,4 @@ class LesJoiesDuCodeBridge extends BridgeAbstract{
|
|||
$this->items[] = $item;
|
||||
}
|
||||
}
|
||||
|
||||
public function getCacheDuration(){
|
||||
return 7200; // 2h hours
|
||||
}
|
||||
}
|
||||
|
|
|
@ -4,6 +4,7 @@ class LinkedInCompanyBridge extends BridgeAbstract{
|
|||
const MAINTAINER = "regisenguehard";
|
||||
const NAME = "LinkedIn Company";
|
||||
const URI = "https://www.linkedin.com/";
|
||||
const CACHE_TIMEOUT = 21600; //6
|
||||
const DESCRIPTION = "Returns most recent actus from Company on LinkedIn. (https://www.linkedin.com/company/<strong style=\"font-weight:bold;\">apple</strong>)";
|
||||
|
||||
const PARAMETERS = array( array(
|
||||
|
@ -32,8 +33,4 @@ class LinkedInCompanyBridge extends BridgeAbstract{
|
|||
}
|
||||
}
|
||||
}
|
||||
|
||||
public function getCacheDuration(){
|
||||
return 21600; // 6 hours
|
||||
}
|
||||
}
|
||||
|
|
|
@ -4,6 +4,7 @@ class MangareaderBridge extends BridgeAbstract {
|
|||
const MAINTAINER = "logmanoriginal";
|
||||
const NAME = "Mangareader Bridge";
|
||||
const URI = "http://www.mangareader.net/";
|
||||
const CACHE_TIMEOUT = 10800; // 3h
|
||||
const DESCRIPTION = "Returns the latest updates, popular mangas or manga updates (new chapters)";
|
||||
|
||||
const PARAMETERS = array(
|
||||
|
@ -148,12 +149,12 @@ class MangareaderBridge extends BridgeAbstract {
|
|||
if($item['content'] <> ""){
|
||||
$item['content'] .= "<br>";
|
||||
}
|
||||
$item['content'] .=
|
||||
"<a href='"
|
||||
. self::URI
|
||||
. htmlspecialchars($chapter->getAttribute('href'))
|
||||
. "'>"
|
||||
. htmlspecialchars($chapter->nodeValue)
|
||||
$item['content'] .=
|
||||
"<a href='"
|
||||
. self::URI
|
||||
. htmlspecialchars($chapter->getAttribute('href'))
|
||||
. "'>"
|
||||
. htmlspecialchars($chapter->nodeValue)
|
||||
. "</a>";
|
||||
}
|
||||
|
||||
|
@ -246,9 +247,5 @@ EOD;
|
|||
public function getName(){
|
||||
return (!empty($this->request) ? $this->request . ' - ' : '') . 'Mangareader Bridge';
|
||||
}
|
||||
|
||||
public function getCacheDuration(){
|
||||
return 10800; // 3 hours
|
||||
}
|
||||
}
|
||||
?>
|
||||
|
|
|
@ -3,6 +3,7 @@ class MoebooruBridge extends BridgeAbstract{
|
|||
|
||||
const NAME = "Moebooru";
|
||||
const URI = "https://moe.dev.myconan.net/";
|
||||
const CACHE_TIMEOUT = 1800; // 30min
|
||||
const DESCRIPTION = "Returns images from given page";
|
||||
|
||||
const PARAMETERS = array( array(
|
||||
|
@ -42,8 +43,4 @@ class MoebooruBridge extends BridgeAbstract{
|
|||
$this->items[] = $item;
|
||||
}
|
||||
}
|
||||
|
||||
public function getCacheDuration(){
|
||||
return 1800; // 30 minutes
|
||||
}
|
||||
}
|
||||
|
|
|
@ -4,6 +4,7 @@ class MondeDiploBridge extends BridgeAbstract{
|
|||
const MAINTAINER = "Pitchoule";
|
||||
const NAME = 'Monde Diplomatique';
|
||||
const URI = 'http://www.monde-diplomatique.fr/';
|
||||
const CACHE_TIMEOUT = 21600; //6h
|
||||
const DESCRIPTION = "Returns most recent results from MondeDiplo.";
|
||||
|
||||
public function collectData(){
|
||||
|
@ -19,8 +20,4 @@ class MondeDiploBridge extends BridgeAbstract{
|
|||
$this->items[] = $item;
|
||||
}
|
||||
}
|
||||
|
||||
public function getCacheDuration(){
|
||||
return 21600; // 6 hours
|
||||
}
|
||||
}
|
||||
|
|
|
@ -4,6 +4,7 @@ class NasaApodBridge extends BridgeAbstract{
|
|||
const MAINTAINER = "corenting";
|
||||
const NAME = "NASA APOD Bridge";
|
||||
const URI = "http://apod.nasa.gov/apod/";
|
||||
const CACHE_TIMEOUT = 43200; // 12h
|
||||
const DESCRIPTION = "Returns the 3 latest NASA APOD pictures and explanations";
|
||||
|
||||
public function collectData(){
|
||||
|
@ -39,8 +40,4 @@ class NasaApodBridge extends BridgeAbstract{
|
|||
$this->items[] = $item;
|
||||
}
|
||||
}
|
||||
|
||||
public function getCacheDuration(){
|
||||
return 3600*12; // 12 hours
|
||||
}
|
||||
}
|
||||
|
|
|
@ -4,6 +4,7 @@ class NovelUpdatesBridge extends BridgeAbstract{
|
|||
const MAINTAINER = "albirew";
|
||||
const NAME = "Novel Updates";
|
||||
const URI = "http://www.novelupdates.com/";
|
||||
const CACHE_TIMEOUT = 21600; // 6h
|
||||
const DESCRIPTION = "Returns releases from Novel Updates";
|
||||
const PARAMETERS = array( array(
|
||||
'n'=>array(
|
||||
|
@ -48,8 +49,4 @@ class NovelUpdatesBridge extends BridgeAbstract{
|
|||
public function getName(){
|
||||
return $this->seriesTitle. ' - ' . static::NAME;
|
||||
}
|
||||
|
||||
public function getCacheDuration(){
|
||||
return 21600; // 6 hours
|
||||
}
|
||||
}
|
||||
|
|
|
@ -4,6 +4,7 @@ class OpenClassroomsBridge extends BridgeAbstract{
|
|||
const MAINTAINER = "sebsauvage";
|
||||
const NAME = "OpenClassrooms Bridge";
|
||||
const URI = "https://openclassrooms.com/";
|
||||
const CACHE_TIMEOUT = 21600; // 6h
|
||||
const DESCRIPTION = "Returns latest tutorials from OpenClassrooms.";
|
||||
|
||||
const PARAMETERS = array( array(
|
||||
|
@ -42,8 +43,4 @@ class OpenClassroomsBridge extends BridgeAbstract{
|
|||
$this->items[] = $item;
|
||||
}
|
||||
}
|
||||
|
||||
public function getCacheDuration(){
|
||||
return 21600; // 6 hours
|
||||
}
|
||||
}
|
||||
|
|
|
@ -4,6 +4,7 @@ class ParuVenduImmoBridge extends BridgeAbstract
|
|||
const MAINTAINER = "polo2ro";
|
||||
const NAME = "Paru Vendu Immobilier";
|
||||
const URI = "http://www.paruvendu.fr";
|
||||
const CACHE_TIMEOUT = 10800; // 3h
|
||||
const DESCRIPTION = "Returns the ads from the first page of search result.";
|
||||
|
||||
|
||||
|
@ -92,8 +93,4 @@ class ParuVenduImmoBridge extends BridgeAbstract
|
|||
}
|
||||
return 'Paru Vendu Immobilier'.$request;
|
||||
}
|
||||
|
||||
public function getCacheDuration(){
|
||||
return 10800; // 3 hours
|
||||
}
|
||||
}
|
||||
|
|
|
@ -4,6 +4,7 @@ class PickyWallpapersBridge extends BridgeAbstract {
|
|||
const MAINTAINER = "nel50n";
|
||||
const NAME = "PickyWallpapers Bridge";
|
||||
const URI = "http://www.pickywallpapers.com/";
|
||||
const CACHE_TIMEOUT = 43200; // 12h
|
||||
const DESCRIPTION = "Returns the latests wallpapers from PickyWallpapers";
|
||||
|
||||
const PARAMETERS = array( array(
|
||||
|
@ -69,8 +70,4 @@ class PickyWallpapersBridge extends BridgeAbstract {
|
|||
.($subcategory? ' > '.$subcategory : '')
|
||||
.' ['.$this->getInput('r').']';
|
||||
}
|
||||
|
||||
public function getCacheDuration(){
|
||||
return 43200; // 12 hours
|
||||
}
|
||||
}
|
||||
|
|
|
@ -28,8 +28,4 @@ class PlanetLibreBridge extends BridgeAbstract{
|
|||
}
|
||||
}
|
||||
}
|
||||
|
||||
public function getCacheDuration(){
|
||||
return 3600*2; // 1 hour
|
||||
}
|
||||
}
|
||||
|
|
|
@ -2,6 +2,7 @@
|
|||
class RTBFBridge extends BridgeAbstract {
|
||||
const NAME = "RTBF Bridge";
|
||||
const URI = "http://www.rtbf.be/auvio/emissions/";
|
||||
const CACHE_TIMEOUT = 21600; //6h
|
||||
const DESCRIPTION = "Returns the newest RTBF videos by series ID";
|
||||
const MAINTAINER = "Frenzie";
|
||||
|
||||
|
@ -46,8 +47,4 @@ class RTBFBridge extends BridgeAbstract {
|
|||
public function getName(){
|
||||
return $this->getInput('c') .' - RTBF Bridge';
|
||||
}
|
||||
|
||||
public function getCacheDuration(){
|
||||
return 21600; // 6 hours
|
||||
}
|
||||
}
|
||||
|
|
|
@ -4,6 +4,7 @@ class Releases3DSBridge extends BridgeAbstract {
|
|||
const MAINTAINER = "ORelio";
|
||||
const NAME = "3DS Scene Releases";
|
||||
const URI = "http://www.3dsdb.com/";
|
||||
const CACHE_TIMEOUT = 10800; // 3h
|
||||
const DESCRIPTION = "Returns the newest scene releases.";
|
||||
|
||||
public function collectData(){
|
||||
|
@ -116,8 +117,4 @@ class Releases3DSBridge extends BridgeAbstract {
|
|||
$limit++;
|
||||
}
|
||||
}
|
||||
|
||||
public function getCacheDuration() {
|
||||
return 10800; //3 hours
|
||||
}
|
||||
}
|
||||
|
|
|
@ -4,6 +4,7 @@ class ScmbBridge extends BridgeAbstract{
|
|||
const MAINTAINER = "Astalaseven";
|
||||
const NAME = "Se Coucher Moins Bête Bridge";
|
||||
const URI = "http://secouchermoinsbete.fr/";
|
||||
const CACHE_TIMEOUT = 21600; // 6h
|
||||
const DESCRIPTION = "Returns the newest anecdotes.";
|
||||
|
||||
public function collectData(){
|
||||
|
@ -33,8 +34,4 @@ class ScmbBridge extends BridgeAbstract{
|
|||
$this->items[] = $item;
|
||||
}
|
||||
}
|
||||
|
||||
public function getCacheDuration(){
|
||||
return 21600; // 6 hours
|
||||
}
|
||||
}
|
||||
|
|
|
@ -4,6 +4,7 @@ class ScoopItBridge extends BridgeAbstract{
|
|||
const MAINTAINER = "Pitchoule";
|
||||
const NAME = "ScoopIt";
|
||||
const URI = "http://www.scoop.it/";
|
||||
const CACHE_TIMEOUT = 21600; // 6h
|
||||
const DESCRIPTION = "Returns most recent results from ScoopIt.";
|
||||
|
||||
const PARAMETERS = array( array(
|
||||
|
@ -28,9 +29,5 @@ class ScoopItBridge extends BridgeAbstract{
|
|||
$this->items[] = $item;
|
||||
}
|
||||
}
|
||||
|
||||
public function getCacheDuration(){
|
||||
return 21600; // 6 hours
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -4,6 +4,7 @@ class SensCritiqueBridge extends BridgeAbstract {
|
|||
const MAINTAINER = "kranack";
|
||||
const NAME = "Sens Critique";
|
||||
const URI = "http://www.senscritique.com/";
|
||||
const CACHE_TIMEOUT = 21600; // 6h
|
||||
const DESCRIPTION = "Sens Critique news";
|
||||
|
||||
const PARAMETERS = array( array(
|
||||
|
@ -74,9 +75,4 @@ class SensCritiqueBridge extends BridgeAbstract {
|
|||
$this->items[] = $item;
|
||||
}
|
||||
}
|
||||
|
||||
public function getCacheDuration(){
|
||||
return 21600; // 6 hours
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
@ -4,6 +4,7 @@ class SexactuBridge extends BridgeAbstract{
|
|||
const MAINTAINER = "Riduidel";
|
||||
const NAME = "Sexactu";
|
||||
const URI = "https://www.gqmagazine.fr";
|
||||
const CACHE_TIMEOUT = 7200; // 2h
|
||||
const DESCRIPTION = "Sexactu via rss-bridge";
|
||||
|
||||
public function collectData(){
|
||||
|
@ -56,10 +57,6 @@ $replace = array('January', 'February', 'March', 'April', 'May', 'June', 'July',
|
|||
return self::URI.'/sexactu';
|
||||
}
|
||||
|
||||
public function getCacheDuration(){
|
||||
return 7200; // 2h hours
|
||||
}
|
||||
|
||||
private function correctCase($str) {
|
||||
$sentences=explode('.', mb_strtolower($str, "UTF-8"));
|
||||
$str="";
|
||||
|
|
|
@ -4,6 +4,7 @@ class SoundCloudBridge extends BridgeAbstract{
|
|||
const MAINTAINER = "kranack";
|
||||
const NAME = "Soundcloud Bridge";
|
||||
const URI = "https://soundcloud.com/";
|
||||
const CACHE_TIMEOUT = 600; // 10min
|
||||
const DESCRIPTION = "Returns 10 newest music from user profile";
|
||||
|
||||
const PARAMETERS = array( array(
|
||||
|
@ -46,8 +47,4 @@ class SoundCloudBridge extends BridgeAbstract{
|
|||
public function getName(){
|
||||
return self::NAME .' - '. $this->getInput('u');
|
||||
}
|
||||
|
||||
public function getCacheDuration(){
|
||||
return 600; // 10 minutes
|
||||
}
|
||||
}
|
||||
|
|
|
@ -3,6 +3,7 @@ class StripeAPIChangeLogBridge extends BridgeAbstract{
|
|||
const MAINTAINER = 'Pierre Mazière';
|
||||
const NAME = 'Stripe API Changelog';
|
||||
const URI = 'https://stripe.com/docs/upgrades';
|
||||
const CACHE_TIMEOUT = 86400; // 24h
|
||||
const DESCRIPTION = 'Returns the changes made to the stripe.com API';
|
||||
|
||||
public function collectData(){
|
||||
|
@ -20,8 +21,4 @@ class StripeAPIChangeLogBridge extends BridgeAbstract{
|
|||
$this->items[]=$item;
|
||||
}
|
||||
}
|
||||
|
||||
public function getCacheDuration(){
|
||||
return 86400; // one day
|
||||
}
|
||||
}
|
||||
|
|
|
@ -4,6 +4,7 @@ class SuperbWallpapersBridge extends BridgeAbstract {
|
|||
const MAINTAINER = "nel50n";
|
||||
const NAME = "Superb Wallpapers Bridge";
|
||||
const URI = "http://www.superbwallpapers.com/";
|
||||
const CACHE_TIMEOUT = 43200; // 12h
|
||||
const DESCRIPTION = "Returns the latests wallpapers from SuperbWallpapers";
|
||||
|
||||
const PARAMETERS = array( array(
|
||||
|
@ -62,8 +63,4 @@ class SuperbWallpapersBridge extends BridgeAbstract {
|
|||
public function getName(){
|
||||
return self::NAME .'- '.$this->getInput('c').' ['.$this->getInput('r').']';
|
||||
}
|
||||
|
||||
public function getCacheDuration(){
|
||||
return 43200; // 12 hours
|
||||
}
|
||||
}
|
||||
|
|
|
@ -4,6 +4,7 @@ class TagBoardBridge extends BridgeAbstract{
|
|||
const MAINTAINER = "Pitchoule";
|
||||
const NAME = "TagBoard";
|
||||
const URI = "http://www.TagBoard.com/";
|
||||
const CACHE_TIMEOUT = 21600; // 6h
|
||||
const DESCRIPTION = "Returns most recent results from TagBoard.";
|
||||
|
||||
const PARAMETERS = array( array(
|
||||
|
@ -37,9 +38,5 @@ class TagBoardBridge extends BridgeAbstract{
|
|||
public function getName(){
|
||||
return 'tagboard - ' .$this->getInput('u');
|
||||
}
|
||||
|
||||
public function getCacheDuration(){
|
||||
return 21600; // 6 hours
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -4,6 +4,7 @@ class TheCodingLoveBridge extends BridgeAbstract{
|
|||
const MAINTAINER = "superbaillot.net";
|
||||
const NAME = "The Coding Love";
|
||||
const URI = "http://thecodinglove.com/";
|
||||
const CACHE_TIMEOUT = 7200; // 2h
|
||||
const DESCRIPTION = "The Coding Love";
|
||||
|
||||
public function collectData(){
|
||||
|
@ -44,8 +45,4 @@ class TheCodingLoveBridge extends BridgeAbstract{
|
|||
$this->items[] = $item;
|
||||
}
|
||||
}
|
||||
|
||||
public function getCacheDuration(){
|
||||
return 7200; // 2h hours
|
||||
}
|
||||
}
|
||||
|
|
|
@ -4,6 +4,7 @@ class TheOatmealBridge extends FeedExpander{
|
|||
const MAINTAINER = "Riduidel";
|
||||
const NAME = "The Oatmeal";
|
||||
const URI = "http://theoatmeal.com/";
|
||||
const CACHE_TIMEOUT = 7200; // 2h
|
||||
const DESCRIPTION = "Un petit site de dessins assez rigolos";
|
||||
|
||||
public function collectData(){
|
||||
|
@ -23,8 +24,4 @@ class TheOatmealBridge extends FeedExpander{
|
|||
|
||||
return $item;
|
||||
}
|
||||
|
||||
public function getCacheDuration(){
|
||||
return 7200; // 2h hours
|
||||
}
|
||||
}
|
||||
|
|
|
@ -6,6 +6,7 @@ class TwitchApiBridge extends BridgeAbstract{
|
|||
const MAINTAINER = "logmanoriginal";
|
||||
const NAME = "Twitch API Bridge";
|
||||
const URI = "http://www.twitch.tv";
|
||||
const CACHE_TIMEOUT = 10800; // 3h
|
||||
const DESCRIPTION = "Returns the newest broadcasts or highlights by channel name using the Twitch API (v3)";
|
||||
|
||||
const PARAMETERS = array(
|
||||
|
@ -105,9 +106,5 @@ class TwitchApiBridge extends BridgeAbstract{
|
|||
public function getName(){
|
||||
return $this->getInput('channel') . ' - Twitch API Bridge';
|
||||
}
|
||||
|
||||
public function getCacheDuration(){
|
||||
return 10800; // 3 hours
|
||||
}
|
||||
}
|
||||
?>
|
||||
|
|
|
@ -2,6 +2,7 @@
|
|||
class TwitterBridge extends BridgeAbstract{
|
||||
const NAME='Twitter Bridge';
|
||||
const URI='https://twitter.com/';
|
||||
const CACHE_TIMEOUT = 300; // 5min
|
||||
const DESCRIPTION='returns tweets';
|
||||
const PARAMETERS=array(
|
||||
'global'=>array(
|
||||
|
@ -135,8 +136,4 @@ EOD;
|
|||
$this->items[] = $item;
|
||||
}
|
||||
}
|
||||
|
||||
public function getCacheDuration(){
|
||||
return 300; // 5 minutes
|
||||
}
|
||||
}
|
||||
|
|
|
@ -4,6 +4,7 @@ class UnsplashBridge extends BridgeAbstract {
|
|||
const MAINTAINER = "nel50n";
|
||||
const NAME = "Unsplash Bridge";
|
||||
const URI = "http://unsplash.com/";
|
||||
const CACHE_TIMEOUT = 43200; // 12h
|
||||
const DESCRIPTION = "Returns the latests photos from Unsplash";
|
||||
|
||||
const PARAMETERS = array( array(
|
||||
|
@ -60,8 +61,4 @@ class UnsplashBridge extends BridgeAbstract {
|
|||
}
|
||||
}
|
||||
}
|
||||
|
||||
public function getCacheDuration(){
|
||||
return 43200; // 12 hours
|
||||
}
|
||||
}
|
||||
|
|
|
@ -4,6 +4,7 @@ class ViadeoCompanyBridge extends BridgeAbstract{
|
|||
const MAINTAINER = "regisenguehard";
|
||||
const NAME = "Viadeo Company";
|
||||
const URI = "https://www.viadeo.com/";
|
||||
const CACHE_TIMEOUT = 21600; // 6h
|
||||
const DESCRIPTION = "Returns most recent actus from Company on Viadeo. (http://www.viadeo.com/fr/company/<strong style=\"font-weight:bold;\">apple</strong>)";
|
||||
|
||||
const PARAMETERS = array( array(
|
||||
|
@ -32,8 +33,4 @@ class ViadeoCompanyBridge extends BridgeAbstract{
|
|||
}
|
||||
}
|
||||
}
|
||||
|
||||
public function getCacheDuration(){
|
||||
return 21600; // 6 hours
|
||||
}
|
||||
}
|
||||
|
|
|
@ -38,8 +38,4 @@ class VineBridge extends BridgeAbstract {
|
|||
}
|
||||
|
||||
}
|
||||
|
||||
public function getCacheDuration(){
|
||||
return 10; //seconds
|
||||
}
|
||||
}
|
||||
|
|
|
@ -5,6 +5,7 @@ class VkBridge extends BridgeAbstract {
|
|||
const MAINTAINER = "ahiles3005";
|
||||
const NAME = "VK.com";
|
||||
const URI = "http://vk.com/";
|
||||
const CACHE_TIMEOUT = 300; // 5min
|
||||
const DESCRIPTION = "Working with open pages";
|
||||
const PARAMETERS=array( array(
|
||||
'u'=>array(
|
||||
|
@ -45,9 +46,4 @@ class VkBridge extends BridgeAbstract {
|
|||
// var_dump($item['date']);
|
||||
}
|
||||
}
|
||||
|
||||
public function getCacheDuration() {
|
||||
return 300; // 5 minutes
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
@ -4,6 +4,7 @@ class WallpaperStopBridge extends BridgeAbstract {
|
|||
const MAINTAINER = "nel50n";
|
||||
const NAME = "WallpaperStop Bridge";
|
||||
const URI = "http://www.wallpaperstop.com";
|
||||
const CACHE_TIMEOUT = 43200; // 12h
|
||||
const DESCRIPTION = "Returns the latests wallpapers from WallpaperStop";
|
||||
|
||||
const PARAMETERS = array( array(
|
||||
|
@ -66,8 +67,4 @@ class WallpaperStopBridge extends BridgeAbstract {
|
|||
$subcategory=$this->getInput('s');
|
||||
return 'WallpaperStop - '.$this->getInput('c').(!empty($subcategory) ? ' > '.$subcategory : '').' ['.$this->getInput('r').']';
|
||||
}
|
||||
|
||||
public function getCacheDuration(){
|
||||
return 43200; // 12 hours
|
||||
}
|
||||
}
|
||||
|
|
|
@ -4,6 +4,7 @@ class WhydBridge extends BridgeAbstract{
|
|||
const MAINTAINER = "kranack";
|
||||
const NAME = "Whyd Bridge";
|
||||
const URI = "http://www.whyd.com/";
|
||||
const CACHE_TIMEOUT = 600; // 10min
|
||||
const DESCRIPTION = "Returns 10 newest music from user profile";
|
||||
|
||||
const PARAMETERS = array( array(
|
||||
|
@ -52,10 +53,6 @@ class WhydBridge extends BridgeAbstract{
|
|||
public function getName(){
|
||||
return (!empty($this->userName) ? $this->userName .' - ' : '') .'Whyd Bridge';
|
||||
}
|
||||
|
||||
public function getCacheDuration(){
|
||||
return 600; // 10 minutes
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
|
|
@ -3,6 +3,7 @@ class WordPressBridge extends FeedExpander {
|
|||
const MAINTAINER = "aledeg";
|
||||
const NAME = "Wordpress Bridge";
|
||||
const URI = "https://wordpress.org/";
|
||||
const CACHE_TIMEOUT = 10800; // 3h
|
||||
const DESCRIPTION = "Returns the newest full posts of a Wordpress powered website";
|
||||
|
||||
const PARAMETERS = array( array(
|
||||
|
@ -69,8 +70,4 @@ class WordPressBridge extends FeedExpander {
|
|||
$this->collectExpandableDatas($this->getURI().'/feed/atom/');
|
||||
|
||||
}
|
||||
|
||||
public function getCacheDuration() {
|
||||
return 3600*3; // 3 hours
|
||||
}
|
||||
}
|
||||
|
|
|
@ -10,6 +10,7 @@ class YoutubeBridge extends BridgeAbstract {
|
|||
|
||||
const NAME = 'YouTube Bridge';
|
||||
const URI = 'https://www.youtube.com/';
|
||||
const CACHE_TIMEOUT = 10800; // 3h
|
||||
const DESCRIPTION = 'Returns the 10 newest videos by username/channel/playlist or search';
|
||||
const MAINTAINER = 'mitsukarenai';
|
||||
|
||||
|
@ -149,8 +150,4 @@ class YoutubeBridge extends BridgeAbstract {
|
|||
public function getName(){
|
||||
return (!empty($this->request) ? $this->request .' - ' : '') .'YouTube Bridge';
|
||||
}
|
||||
|
||||
public function getCacheDuration(){
|
||||
return 10800; // 3 hours
|
||||
}
|
||||
}
|
||||
|
|
|
@ -6,6 +6,7 @@ abstract class BridgeAbstract implements BridgeInterface {
|
|||
const URI = '';
|
||||
const DESCRIPTION = 'No description provided';
|
||||
const MAINTAINER = 'No maintainer';
|
||||
const CACHE_TIMEOUT = 3600;
|
||||
const PARAMETERS = array();
|
||||
|
||||
public $useProxy = true;
|
||||
|
@ -252,7 +253,7 @@ abstract class BridgeAbstract implements BridgeInterface {
|
|||
if(!is_null($this->cache)){
|
||||
$this->cache->prepare($inputs);
|
||||
$time = $this->cache->getTime();
|
||||
if($time !== false && (time() - $this->getCacheDuration() < $time)){
|
||||
if($time !== false && (time() - static::CACHE_TIMEOUT < $time)){
|
||||
$this->items = $this->cache->loadData();
|
||||
return;
|
||||
}
|
||||
|
@ -306,10 +307,6 @@ abstract class BridgeAbstract implements BridgeInterface {
|
|||
return static::URI;
|
||||
}
|
||||
|
||||
public function getCacheDuration(){
|
||||
return 3600;
|
||||
}
|
||||
|
||||
public function setCache(\CacheAbstract $cache){
|
||||
$this->cache = $cache;
|
||||
}
|
||||
|
|
|
@ -1,7 +1,6 @@
|
|||
<?php
|
||||
interface BridgeInterface {
|
||||
public function collectData();
|
||||
public function getCacheDuration();
|
||||
public function getName();
|
||||
public function getURI();
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue