Skip to content

Commit

Permalink
Emergency Patch
Browse files Browse the repository at this point in the history
  • Loading branch information
FxllenCode authored Mar 14, 2021
1 parent 0bb5c22 commit f9899a7
Showing 1 changed file with 0 additions and 55 deletions.
55 changes: 0 additions & 55 deletions src/ServerScriptService/MainModule.lua
Original file line number Diff line number Diff line change
@@ -1,21 +1,5 @@
local DowntimeService = {}

--[[
▒█▀▀▄ ▒█▀▀▀█ ▒█░░▒█ ▒█▄░▒█ ▀▀█▀▀ ▀█▀ ▒█▀▄▀█ ▒█▀▀▀ ▒█▀▀▀█ ▒█▀▀▀ ▒█▀▀█ ▒█░░▒█ ▀█▀ ▒█▀▀█ ▒█▀▀▀
▒█░▒█ ▒█░░▒█ ▒█▒█▒█ ▒█▒█▒█ ░▒█░░ ▒█░ ▒█▒█▒█ ▒█▀▀▀ ░▀▀▀▄▄ ▒█▀▀▀ ▒█▄▄▀ ░▒█▒█░ ▒█░ ▒█░░░ ▒█▀▀▀
▒█▄▄▀ ▒█▄▄▄█ ▒█▄▀▄█ ▒█░░▀█ ░▒█░░ ▄█▄ ▒█░░▒█ ▒█▄▄▄ ▒█▄▄▄█ ▒█▄▄▄ ▒█░▒█ ░░▀▄▀░ ▄█▄ ▒█▄▄█ ▒█▄▄▄
DowntimeService is a In-game API for interacting with Status+
Read more here: devforum.roblox.com/t/status-plus/1004536
Documentation on how to use DowntimeService: status-plus.github.io/Docs
DowntimeService sends API requests to JSON endpoints on the main site.
The main site checks major ROBLOX endpoints every 5 minutes for outages and slowness.
It then returns "up", "degraded" or "down".
--]]

local HttpService = game:GetService("HttpService")
local sumurl = "https://raw.githubusercontent.com/Status-Plus/StatusPlus/master/history/summary.json"

Expand All @@ -29,18 +13,6 @@ function ReturnTableThroughSlug(slug, data)
end
end

function CheckForTotalOutages(data)
if data then
for i, value in ipairs(data) do
if value["status"] == "down" then
return "down"
elseif value["status"] == "degraded" then
return "degraded"
end
return "up"
end
end
end
function DowntimeService.GetSiteStatus()

local GetStatus = HttpService:GetAsync(sumurl)
Expand Down Expand Up @@ -111,16 +83,6 @@ function DowntimeService.GetCatalogAPIStatus()
return Table.status -- Will return "up", "degraded" or "down"
end

function DowntimeService.GetEconomyAPIStatus()

local GetStatus = HttpService:GetAsync(sumurl)

local Data = HttpService:JSONDecode(GetStatus)
local Table = ReturnTableThroughSlug("economy-api-endpoint", Data)

return Table.status -- Will return "up", "degraded" or "down"
end

function DowntimeService.GetDatastoreAPIStatus()

local GetStatus = HttpService:GetAsync(sumurl)
Expand Down Expand Up @@ -162,16 +124,6 @@ function DowntimeService.GetGameJoinAPIStatus()
return Table.status -- Will return "up", "degraded" or "down"
end

function DowntimeService.GetGameInternationalizationAPIStatus()

local GetStatus = HttpService:GetAsync(sumurl)

local Data = HttpService:JSONDecode(GetStatus)
local Table = ReturnTableThroughSlug("game-internationalization-api-endpoint", Data)

return Table.status -- Will return "up", "degraded" or "down"
end

function DowntimeService.GetGroupsAPIStatus()

local GetStatus = HttpService:GetAsync(sumurl)
Expand Down Expand Up @@ -212,11 +164,4 @@ function DowntimeService.GetThumbnailsAPIStatus()
return Table.status -- Will return "up", "degraded" or "down"
end

function DowntimeService.GetRobloxStatus() -- All sites
local GetStatus = HttpService:GetAsync(sumurl)
local Data = HttpService:JSONDecode(GetStatus)

return CheckForTotalOutages(Data) -- Will return "up", "degraded" or "down"
end

return DowntimeService

0 comments on commit f9899a7

Please sign in to comment.