UNPKG

@jkt48connect-corp/sdk

Version:

CLI dan modul untuk mengakses data dari API JKT48Connect, termasuk data member, teater, event, pembayaran, dan lainnya.

28 lines (22 loc) 1.1 kB
const fetchData = require("../utils/fetchData"); async function getLive(apiKey) { const url = `https://api.jkt48connect.my.id/api/live?api_key=${apiKey}`; const response = await fetchData(url); // Mendapatkan data dari API return response; // Mengembalikan respons data langsung } async function getRecentLive(apiKey) { const url = `https://api.jkt48connect.my.id/api/recent?api_key=${apiKey}`; const response = await fetchData(url); // Mendapatkan data dari API return response; // Mengembalikan respons data langsung } async function getIdn(apiKey) { const url = `https://api.jkt48connect.my.id/api/live/idn?api_key=${apiKey}`; const response = await fetchData(url); // Mendapatkan data dari API return response; // Mengembalikan respons data langsung } async function getShowroom(apiKey) { const url = `https://api.jkt48connect.my.id/api/live/showroom?api_key=${apiKey}`; const response = await fetchData(url); // Mendapatkan data dari API return response; // Mengembalikan respons data langsung } module.exports = { getLive, getRecentLive, getShowroom, getIdn };