pokepurple/addons/twitcher/generated/twitch_game_analytics.gd
Mario Steele c11a4ebbc2 Initial Commit
Initial commit of Code Base.
2025-06-12 14:31:14 -05:00

93 lines
No EOL
2.6 KiB
GDScript
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

@tool
extends TwitchData
# CLASS GOT AUTOGENERATED DON'T CHANGE MANUALLY. CHANGES CAN BE OVERWRITTEN EASILY.
##
## #/components/schemas/GameAnalytics
class_name TwitchGameAnalytics
## An ID that identifies the game that the report was generated for.
@export var game_id: String:
set(val):
game_id = val
track_data(&"game_id", val)
## The URL that you use to download the report. The URL is valid for 5 minutes.
@export var URL: String:
set(val):
URL = val
track_data(&"URL", val)
## The type of report.
@export var type: String:
set(val):
type = val
track_data(&"type", val)
## The reporting windows start and end dates, in RFC3339 format.
@export var date_range: DateRange:
set(val):
date_range = val
track_data(&"date_range", val)
var response: BufferedHTTPClient.ResponseData
## Constructor with all required fields.
static func create(_game_id: String, _URL: String, _type: String, _date_range: DateRange) -> TwitchGameAnalytics:
var twitch_game_analytics: TwitchGameAnalytics = TwitchGameAnalytics.new()
twitch_game_analytics.game_id = _game_id
twitch_game_analytics.URL = _URL
twitch_game_analytics.type = _type
twitch_game_analytics.date_range = _date_range
return twitch_game_analytics
static func from_json(d: Dictionary) -> TwitchGameAnalytics:
var result: TwitchGameAnalytics = TwitchGameAnalytics.new()
if d.get("game_id", null) != null:
result.game_id = d["game_id"]
if d.get("URL", null) != null:
result.URL = d["URL"]
if d.get("type", null) != null:
result.type = d["type"]
if d.get("date_range", null) != null:
result.date_range = DateRange.from_json(d["date_range"])
return result
## The reporting windows start and end dates, in RFC3339 format.
## #/components/schemas/GameAnalytics/DateRange
class DateRange extends TwitchData:
## The reporting windows start date.
@export var started_at: String:
set(val):
started_at = val
track_data(&"started_at", val)
## The reporting windows end date.
@export var ended_at: String:
set(val):
ended_at = val
track_data(&"ended_at", val)
## Constructor with all required fields.
static func create(_started_at: String, _ended_at: String) -> DateRange:
var date_range: DateRange = DateRange.new()
date_range.started_at = _started_at
date_range.ended_at = _ended_at
return date_range
static func from_json(d: Dictionary) -> DateRange:
var result: DateRange = DateRange.new()
if d.get("started_at", null) != null:
result.started_at = d["started_at"]
if d.get("ended_at", null) != null:
result.ended_at = d["ended_at"]
return result