0.0.14 • Published 3 years ago

realbooru v0.0.14

Weekly downloads
-
License
MIT
Repository
github
Last release
3 years ago

realbooru

An Node.js® Modules for interacting with the Realbooru.com API easily

Synchronous

const rBooru = require("realbooru");
let wrapper = new rBooru();

wrapper.getR(1, 1, "bondage").then((data) => {
  console.log(data);
});

[
  {
    directory: 721,
    hash: 'ba65269dc8b129ea1ada390bc7739ca2',
    height: 2000,
    id: 754726,
    image: 'ba65269dc8b129ea1ada390bc7739ca2.jpeg',
    change: 1613222030,
    owner: 'jthec',
    parent_id: 0,
    rating: 'explicit',
    sample: 1,
    sample_height: 1275,
    sample_width: 850,
    score: null,
    tags: 'bondage breasts cosplay handcuffs looking_at_the_viewer navel nipples nude pink_hair pubic_hair pussy solo',
    width: 1333
  }
]

Async

const rBooru = require("realbooru");
let wrapper = new rBooru();

async function yourstuff() {
  await wrapper.getR(20, 1, "bondage score:>10").then((data) => {
    // return with data
  });
}

// do with your async stuff here

Random

const rBooru = require("realbooru");
let wrapper = new rBooru();

async function random() {
  await wrapper.getR(20, 1, "bondage").then((data) => {
    console.log(data[Math.floor(Math.random() * data.length)]);
  });
}

random()

Docs:

.getR(limit, pid, tags)

limit: The limit of posts, max is 100
pid: The page number you want
tags: The tags you want to use

Tags scoring is work too eg: .getR(limit, page, "bondage score:>10")
Further read more at: https://realbooru.com/index.php?page=help&topic=dapi

0.0.14

3 years ago

0.0.13

3 years ago

0.0.12

3 years ago

0.0.11

3 years ago

0.0.9

3 years ago

0.0.5

3 years ago

0.0.4

3 years ago

0.0.3

3 years ago

0.0.2

3 years ago

0.0.1

3 years ago