Initial pass of fetching and using application news, server events, server ping display now shows unit (ms) instead of just the number- also helps with confusing it for player count

This commit is contained in:
2026-09-09 23:38:40 -05:00
parent 0693733179
commit b0fefb9f7f
9 changed files with 146 additions and 32 deletions

View File

@@ -0,0 +1,17 @@
module W3DHubLauncher
class Worker
class Api
class ServerEvent
attr_reader :title, :image_uri, :app_id, :start_time, :end_time, :timestamp
def initialize(data)
@title = data["title"]
@image_uri = data["image"]
@app_id = data["server"]
@start_time = Time.parse(data["starttime"], in: "UTC").localtime
@end_time = Time.parse(data["endtime"], in: "UTC").localtime
@timestamp = Time.parse(data["dateTime"], in: "UTC").localtime
end
end
end
end
end