1.2.0 • Published 3 years ago
haruna-js v1.2.0
Haruna
A node-js battleship that wraps around moebooru-like API.
Supports these websites for now:
const haruna = require("./index");
const haru = new haruna();
haru
.posts(1, "Azur Lane")
.then((data) => console.log(data))
.catch((error) => console.log(error.message));
Functions
Posts
posts(website, keyword, page, limit, order, rating);
Parameters
const baseurl = {
1: "https://konachan.com",
2: "https://yande.re",
};
const types = {
1: "/post.json",
2: "/comments.json",
3: "/note.json",
4: "/artist.json",
5: "/tag.json",
6: "/pool.json",
7: "/forum.json",
};
const orders = {
1: "score",
2: "favorited",
3: "wide",
4: "nonwide",
};
const ratings = {
1: "safe",
2: "questionable",
3: "explicit",
4: "questionableplus",
5: "questionableless",
};