BooruprojectBridge.php 761 B

12345678910111213141516171819202122232425262728293031323334353637
  1. <?php
  2. require_once('GelbooruBridge.php');
  3. class BooruprojectBridge extends GelbooruBridge {
  4. const MAINTAINER = 'mitsukarenai';
  5. const NAME = 'Booruproject';
  6. const URI = 'http://booru.org/';
  7. const DESCRIPTION = 'Returns images from given page of booruproject';
  8. const PARAMETERS = array(
  9. 'global' => array(
  10. 'p' => array(
  11. 'name' => 'page',
  12. 'type' => 'number'
  13. ),
  14. 't' => array(
  15. 'name' => 'tags'
  16. )
  17. ),
  18. 'Booru subdomain (subdomain.booru.org)' => array(
  19. 'i' => array(
  20. 'name' => 'Subdomain',
  21. 'required' => true
  22. )
  23. )
  24. );
  25. const PIDBYPAGE = 20;
  26. public function getURI(){
  27. return 'http://' . $this->getInput('i') . '.booru.org/';
  28. }
  29. public function getName(){
  30. return static::NAME . ' ' . $this->getInput('i');
  31. }
  32. }