Initial Commit
Initial commit of Code Base.
This commit is contained in:
parent
293b1213e1
commit
c11a4ebbc2
653 changed files with 36893 additions and 1 deletions
56
addons/twitcher/generated/twitch_game.gd
Normal file
56
addons/twitcher/generated/twitch_game.gd
Normal file
|
|
@ -0,0 +1,56 @@
|
|||
@tool
|
||||
extends TwitchData
|
||||
|
||||
# CLASS GOT AUTOGENERATED DON'T CHANGE MANUALLY. CHANGES CAN BE OVERWRITTEN EASILY.
|
||||
|
||||
##
|
||||
## #/components/schemas/Game
|
||||
class_name TwitchGame
|
||||
|
||||
## An ID that identifies the category or game.
|
||||
@export var id: String:
|
||||
set(val):
|
||||
id = val
|
||||
track_data(&"id", val)
|
||||
|
||||
## The category’s or game’s name.
|
||||
@export var name: String:
|
||||
set(val):
|
||||
name = val
|
||||
track_data(&"name", val)
|
||||
|
||||
## A URL to the category’s or game’s box art. You must replace the `{width}x{height}` placeholder with the size of image you want.
|
||||
@export var box_art_url: String:
|
||||
set(val):
|
||||
box_art_url = val
|
||||
track_data(&"box_art_url", val)
|
||||
|
||||
## The ID that [IGDB](https://www.igdb.com/) uses to identify this game. If the IGDB ID is not available to Twitch, this field is set to an empty string.
|
||||
@export var igdb_id: String:
|
||||
set(val):
|
||||
igdb_id = val
|
||||
track_data(&"igdb_id", val)
|
||||
var response: BufferedHTTPClient.ResponseData
|
||||
|
||||
|
||||
## Constructor with all required fields.
|
||||
static func create(_id: String, _name: String, _box_art_url: String, _igdb_id: String) -> TwitchGame:
|
||||
var twitch_game: TwitchGame = TwitchGame.new()
|
||||
twitch_game.id = _id
|
||||
twitch_game.name = _name
|
||||
twitch_game.box_art_url = _box_art_url
|
||||
twitch_game.igdb_id = _igdb_id
|
||||
return twitch_game
|
||||
|
||||
|
||||
static func from_json(d: Dictionary) -> TwitchGame:
|
||||
var result: TwitchGame = TwitchGame.new()
|
||||
if d.get("id", null) != null:
|
||||
result.id = d["id"]
|
||||
if d.get("name", null) != null:
|
||||
result.name = d["name"]
|
||||
if d.get("box_art_url", null) != null:
|
||||
result.box_art_url = d["box_art_url"]
|
||||
if d.get("igdb_id", null) != null:
|
||||
result.igdb_id = d["igdb_id"]
|
||||
return result
|
||||
Loading…
Add table
Add a link
Reference in a new issue