mirror of
https://github.com/RSS-Bridge/rss-bridge.git
synced 2024-12-24 05:08:20 +03:00
49 lines
1 KiB
PHP
49 lines
1 KiB
PHP
<?php
|
|
require_once('GelbooruBridge.php');
|
|
|
|
class BooruprojectBridge extends GelbooruBridge {
|
|
|
|
const MAINTAINER = 'mitsukarenai';
|
|
const NAME = 'Booruproject';
|
|
const URI = 'https://booru.org/';
|
|
const DESCRIPTION = 'Returns images from given page of booruproject';
|
|
const PARAMETERS = array(
|
|
'global' => array(
|
|
'p' => array(
|
|
'name' => 'page',
|
|
'type' => 'number'
|
|
),
|
|
't' => array(
|
|
'name' => 'tags',
|
|
'required' => true,
|
|
'exampleValue' => 'tagme',
|
|
'title' => 'Use "all" to get all posts'
|
|
)
|
|
),
|
|
'Booru subdomain (subdomain.booru.org)' => array(
|
|
'i' => array(
|
|
'name' => 'Subdomain',
|
|
'required' => true,
|
|
'exampleValue' => 'rm'
|
|
)
|
|
)
|
|
);
|
|
|
|
const PIDBYPAGE = 20;
|
|
|
|
public function getURI(){
|
|
if(!is_null($this->getInput('i'))) {
|
|
return 'https://' . $this->getInput('i') . '.booru.org/';
|
|
}
|
|
|
|
return parent::getURI();
|
|
}
|
|
|
|
public function getName(){
|
|
if(!is_null($this->getInput('i'))) {
|
|
return static::NAME . ' ' . $this->getInput('i');
|
|
}
|
|
|
|
return parent::getName();
|
|
}
|
|
}
|