ecchi-api

1.0.4 • Public • Published

Ecchi

Memberikan gambar henta* dan cosplay secara acak

Example henta*

const ecchi = require("ecchi-api");

ecchi.hentai()
  .then(result => {
    console.log(result);
  });

Example cosplay

const ecchi = require("ecchi-api");

ecchi.cosplay()
  .then(result => {
    console.log(result);
  });

Example donghua

const ecchi = require("ecchi-api");

ecchi.donghua()
  .then(result => {
    console.log(result);
  });

Contoh kode lengkap

Membutuhkan npm express dan readline.

const express = require("express");
const ecchi = require("ecchi-api");
const readline = require("readline").createInterface({
  input : process.stdin,
  output : process.stdout
});

const app = express();

readline.question("Masukan port : ",port => {
  app.listen(port,()=> {
    console.log("Website berjalan di http://localhost:"+port);
  });
  readline.close();
});

app.get("/",async (req,res) => {
  ecchi.hentai().then(data => {
    var web = `<center>
                 <br><br>
                 <h1>Ecchi image</h1><br>
                 <a href="${data.url}"><img src="${data.url}" height="720px"></a><br>
               </center>`;
    res.send(web);
  });
});

app.get("/cosplay",async (req,res) => {
  ecchi.cosplay().then(data => {
    var web = `<center>
                 <br><br>
                 <h1>Ecchi image</h1><br>
                 <a href="${data.url}"><img src="${data.url}" height="720px"></a><br>
               </center>`;
    res.send(web);
  });
});

app.get("/donghua",async (req,res) => {
  ecchi.donghua().then(data => {
    var web = `<center>
                 <br><br>
                 <h1>Ecchi image</h1><br>
                 <a href="${data.url}"><img src="${data.url}" height="720px"></a><br>
               </center>`;
    res.send(web);
  });
});

Readme

Keywords

none

Package Sidebar

Install

npm i ecchi-api

Weekly Downloads

0

Version

1.0.4

License

ISC

Unpacked Size

4.65 kB

Total Files

5

Last publish

Collaborators

  • zeevalya