pokepurple/addons/twitcher/generated/twitch_chatter.gd

48 lines
1.3 KiB
GDScript3
Raw Normal View History

@tool
extends TwitchData
# CLASS GOT AUTOGENERATED DON'T CHANGE MANUALLY. CHANGES CAN BE OVERWRITTEN EASILY.
##
## #/components/schemas/Chatter
class_name TwitchChatter
## The ID of a user thats connected to the broadcasters chat room.
@export var user_id: String:
set(val):
user_id = val
track_data(&"user_id", val)
## The users login name.
@export var user_login: String:
set(val):
user_login = val
track_data(&"user_login", val)
## The users display name.
@export var user_name: String:
set(val):
user_name = val
track_data(&"user_name", val)
var response: BufferedHTTPClient.ResponseData
## Constructor with all required fields.
static func create(_user_id: String, _user_login: String, _user_name: String) -> TwitchChatter:
var twitch_chatter: TwitchChatter = TwitchChatter.new()
twitch_chatter.user_id = _user_id
twitch_chatter.user_login = _user_login
twitch_chatter.user_name = _user_name
return twitch_chatter
static func from_json(d: Dictionary) -> TwitchChatter:
var result: TwitchChatter = TwitchChatter.new()
if d.get("user_id", null) != null:
result.user_id = d["user_id"]
if d.get("user_login", null) != null:
result.user_login = d["user_login"]
if d.get("user_name", null) != null:
result.user_name = d["user_name"]
return result