2021-12-14 18:32:47 +00:00
|
|
|
<?php
|
|
|
|
|
|
|
|
declare(strict_types=1);
|
2019-08-07 19:53:59 +00:00
|
|
|
|
2023-01-10 22:44:09 +00:00
|
|
|
namespace Shimmie2;
|
|
|
|
|
2019-08-07 19:53:59 +00:00
|
|
|
class DanbooruApiInfo extends ExtensionInfo
|
|
|
|
{
|
|
|
|
public const KEY = "danbooru_api";
|
|
|
|
|
2021-03-14 23:43:50 +00:00
|
|
|
public string $key = self::KEY;
|
|
|
|
public string $name = "Danbooru Client API";
|
2023-11-11 21:49:12 +00:00
|
|
|
public array $authors = ["JJS" => "jsutinen@gmail.com"];
|
2021-03-14 23:43:50 +00:00
|
|
|
public string $description = "Allow Danbooru apps like Danbooru Uploader for Firefox to communicate with Shimmie";
|
2024-02-10 19:42:28 +00:00
|
|
|
public ExtensionCategory $category = ExtensionCategory::INTEGRATION;
|
2021-03-14 23:43:50 +00:00
|
|
|
public ?string $documentation =
|
2024-08-31 16:05:18 +00:00
|
|
|
"<b>Notes</b>:
|
2019-08-07 19:53:59 +00:00
|
|
|
<br>danbooru API based on documentation from danbooru 1.0 -
|
|
|
|
http://attachr.com/7569
|
|
|
|
<br>I've only been able to test add_post and find_tags because I use the
|
|
|
|
old danbooru firefox extension for firefox 1.5
|
|
|
|
<p>Functions currently implemented:
|
|
|
|
<ul>
|
|
|
|
<li>add_post - title and rating are currently ignored because shimmie does not support them
|
|
|
|
<li>find_posts - sort of works, filename is returned as the original filename and probably won't help when it comes to actually downloading it
|
|
|
|
<li>find_tags - id, name, and after_id all work but the tags parameter is ignored just like danbooru 1.0 ignores it
|
|
|
|
</ul>
|
2023-03-22 23:15:41 +00:00
|
|
|
<br><b>CHANGELOG</b>
|
|
|
|
<br>13-OCT-08 8:00PM CST - JJS
|
|
|
|
<br>Bugfix - Properly escape source attribute
|
|
|
|
<br>
|
|
|
|
<br>17-SEP-08 10:00PM CST - JJS
|
|
|
|
<br>Bugfix for changed page name checker in PageRequestEvent
|
|
|
|
<br>
|
|
|
|
<br>13-APR-08 10:00PM CST - JJS
|
|
|
|
<br>Properly escape the tags returned in find_tags and find_posts - Caught by ATravelingGeek
|
|
|
|
<br>Updated extension info to be a bit more clear about its purpose
|
|
|
|
<br>Deleted add_comment code as it didn't do anything anyway
|
|
|
|
<br>
|
|
|
|
<br>01-MAR-08 7:00PM CST - JJS
|
|
|
|
<br>Rewrote to make it compatible with Shimmie trunk again (r723 at least)
|
|
|
|
<br>It may or may not support the new file handling stuff correctly, I'm only testing with images and the danbooru uploader for firefox
|
|
|
|
<br>
|
|
|
|
<br>21-OCT-07 9:07PM CST - JJS
|
|
|
|
<br>Turns out I actually did need to implement the new parameter names
|
|
|
|
<br>for danbooru api v1.8.1. Now danbooruup should work when used with /api/danbooru/post/create.xml
|
|
|
|
<br>Also correctly redirects the url provided by danbooruup in the event
|
|
|
|
<br>of a duplicate image.
|
|
|
|
<br>
|
|
|
|
<br>19-OCT-07 4:46PM CST - JJS
|
|
|
|
<br>Add compatibility with danbooru api v1.8.1 style urls
|
|
|
|
<br>for find_posts and add_post. NOTE: This does not implement
|
|
|
|
<br>the changes to the parameter names, it is simply a
|
|
|
|
<br>workaround for the latest danbooruup firefox extension.
|
|
|
|
<br>Completely compatibility will probably involve a rewrite with a different URL";
|
2019-08-07 19:53:59 +00:00
|
|
|
}
|