feat: enhance API functionality with new request handling and export methods

This commit is contained in:
fzzin
2025-03-30 04:18:28 +02:00
parent f55b5579ad
commit fe4e6690d4
4 changed files with 125 additions and 88 deletions

View File

@@ -1,8 +1,28 @@
// import { assert } from "jsr:@std/assert";
// import { dropRule, refresh } from "@root/plugins/rule34/api.ts";
import { assert } from "jsr:@std/assert";
import * as api from "@root/plugins/rule34/api.ts"
// Deno.test("Test Drop", async () => {
// await refresh();
// const link = await dropRule();
// assert(link !== "", "Empty String was dropped!");
// });
Deno.test("Post Comment", async () => {
const response = await api.getPostComments(1213);
assert(response !== undefined)
});
Deno.test("Get Tag by ID", async () => {
const response = await api.getTagByID(1);
assert(response !== undefined)
});
Deno.test("Get Post Comments", async () => {
const response = await api.getPostComments(1);
assert(response !== undefined)
});
Deno.test("Get Tag by ID 1", async () => {
const response = await api.getTagByID(1);
assert(response !== undefined)
});
Deno.test("Get Tag List", async () => {
const response = await api.getTagList(6);
assert(response !== undefined)
});