UNPKG

ditzzsenpai-api

Version:

Simple NPM api for your app

12 lines (10 loc) 411 B
const fetch = require("node-fetch"); module.exports = async function (usr) { if (!usr) throw new Error("parameter username tidak boleh kosong!!!"); dt = await fetch( `https://caliph.my.id/api/tiktokuser.php/?usr=${usr.replace(/@/gi, "")}` ); json = await dt.json(); if (dt.status !== 200) throw new Error(json.message); return { status: 200, creator: "Ditzzy", result: json.result }; }.bind();