1
0
mirror of https://github.com/RSS-Bridge/rss-bridge.git synced 2025-08-12 19:44:12 +02:00

[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

@@ -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) {