MiralvaLabs API Dokümantasyonu

Ban, veri ve istatistik servisleri

Hızlı Başlangıç

curl -X GET "https://miralvalabs-api-v1.pages.dev/api/players/status?userId=123" \
 -H "X-API-Key: YOUR_API_KEY"
const res = await fetch('https://miralvalabs-api-v1.pages.dev/api/players/status?userId=123', {
  headers: { 'X-API-Key': 'YOUR_API_KEY' }
});
const data = await res.json();
local HttpService = game:GetService("HttpService")
local response = HttpService:RequestAsync({
 Url = "https://miralvalabs-api-v1.pages.dev/api/players/status?userId=123",
 Method = "GET",
 Headers = { ["X-API-Key"] = "YOUR_API_KEY" }
})

Kimlik Doğrulama

X-API-Key: YOUR_API_KEY

Ban Endpointleri

GET /api/players/status?userId=123


Roblox Lua – Ban Kontrolü (PlayerAdded)
local Players = game:GetService("Players")
local HttpService = game:GetService("HttpService")

local API_URL = "https://miralvalabs-api-v1.pages.dev/api/players/status"
local API_KEY = "YOUR_API_KEY"

local function checkBan(player)
    local response = HttpService:RequestAsync({
        Url = API_URL .. "?userId=" .. player.UserId,
        Method = "GET",
        Headers = { ["X-API-Key"] = API_KEY }
    })

    if not response.Success then return end

    local data = HttpService:JSONDecode(response.Body)
    if data.banned then
        player:Kick("Yasaklandınız. Sebep: " .. (data.banData and data.banData.reason or "Bilinmeyen sebep"))
    end
end

Players.PlayerAdded:Connect(checkBan)

Veri Endpointleri

POST /api/data/save

İstatistikler

GET /api/stats/leaderboard

Hata Kodları

400 Bad Request
401 Unauthorized
404 Not Found
500 Internal Server Error