A nodejs wrapper for moebooru-like APIs
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
Rachala Ovin f6873d6e2f final 2 months ago
src final 2 months ago
.gitignore initial 4 months ago
README.md npm listed 3 months ago
package-lock.json 1.2.0 3 months ago
package.json 1.2.0 3 months ago

README.md

Haruna

A node-js battleship that wraps around moebooru-like API.

Supports these websites for now:

konachan
yande.re

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",
};