@tool extends TwitchData # CLASS GOT AUTOGENERATED DON'T CHANGE MANUALLY. CHANGES CAN BE OVERWRITTEN EASILY. ## ## #/components/schemas/ChatBadge class_name TwitchChatBadge ## An ID that identifies this set of chat badges. For example, Bits or Subscriber. @export var set_id: String: set(val): set_id = val track_data(&"set_id", val) ## The list of chat badges in this set. @export var versions: Array[Versions]: set(val): versions = val track_data(&"versions", val) var response: BufferedHTTPClient.ResponseData ## Constructor with all required fields. static func create(_set_id: String, _versions: Array[Versions]) -> TwitchChatBadge: var twitch_chat_badge: TwitchChatBadge = TwitchChatBadge.new() twitch_chat_badge.set_id = _set_id twitch_chat_badge.versions = _versions return twitch_chat_badge static func from_json(d: Dictionary) -> TwitchChatBadge: var result: TwitchChatBadge = TwitchChatBadge.new() if d.get("set_id", null) != null: result.set_id = d["set_id"] if d.get("versions", null) != null: for value in d["versions"]: result.versions.append(Versions.from_json(value)) return result ## The list of chat badges in this set. ## #/components/schemas/ChatBadge/Versions class Versions extends TwitchData: ## An ID that identifies this version of the badge. The ID can be any value. For example, for Bits, the ID is the Bits tier level, but for World of Warcraft, it could be Alliance or Horde. @export var id: String: set(val): id = val track_data(&"id", val) ## A URL to the small version (18px x 18px) of the badge. @export var image_url_1x: String: set(val): image_url_1x = val track_data(&"image_url_1x", val) ## A URL to the medium version (36px x 36px) of the badge. @export var image_url_2x: String: set(val): image_url_2x = val track_data(&"image_url_2x", val) ## A URL to the large version (72px x 72px) of the badge. @export var image_url_4x: String: set(val): image_url_4x = val track_data(&"image_url_4x", val) ## The title of the badge. @export var title: String: set(val): title = val track_data(&"title", val) ## The description of the badge. @export var description: String: set(val): description = val track_data(&"description", val) ## The action to take when clicking on the badge. Set to `null` if no action is specified. @export var click_action: String: set(val): click_action = val track_data(&"click_action", val) ## The URL to navigate to when clicking on the badge. Set to `null` if no URL is specified. @export var click_url: String: set(val): click_url = val track_data(&"click_url", val) ## Constructor with all required fields. static func create(_id: String, _image_url_1x: String, _image_url_2x: String, _image_url_4x: String, _title: String, _description: String, _click_action: String, _click_url: String) -> Versions: var versions: Versions = Versions.new() versions.id = _id versions.image_url_1x = _image_url_1x versions.image_url_2x = _image_url_2x versions.image_url_4x = _image_url_4x versions.title = _title versions.description = _description versions.click_action = _click_action versions.click_url = _click_url return versions static func from_json(d: Dictionary) -> Versions: var result: Versions = Versions.new() if d.get("id", null) != null: result.id = d["id"] if d.get("image_url_1x", null) != null: result.image_url_1x = d["image_url_1x"] if d.get("image_url_2x", null) != null: result.image_url_2x = d["image_url_2x"] if d.get("image_url_4x", null) != null: result.image_url_4x = d["image_url_4x"] if d.get("title", null) != null: result.title = d["title"] if d.get("description", null) != null: result.description = d["description"] if d.get("click_action", null) != null: result.click_action = d["click_action"] if d.get("click_url", null) != null: result.click_url = d["click_url"] return result