pokepurple/addons/twitcher/generated/twitch_get_custom_reward.gd

72 lines
2.3 KiB
GDScript3
Raw Permalink Normal View History

@tool
extends TwitchData
# CLASS GOT AUTOGENERATED DON'T CHANGE MANUALLY. CHANGES CAN BE OVERWRITTEN EASILY.
class_name TwitchGetCustomReward
##
## #/components/schemas/GetCustomRewardResponse
class Response extends TwitchData:
## A list of custom rewards. The list is in ascending order by `id`. If the broadcaster hasnt created custom rewards, the list is empty.
@export var data: Array[TwitchCustomReward]:
set(val):
data = val
track_data(&"data", val)
var response: BufferedHTTPClient.ResponseData
## Constructor with all required fields.
static func create(_data: Array[TwitchCustomReward]) -> Response:
var response: Response = Response.new()
response.data = _data
return response
static func from_json(d: Dictionary) -> Response:
var result: Response = Response.new()
if d.get("data", null) != null:
for value in d["data"]:
result.data.append(TwitchCustomReward.from_json(value))
return result
## All optional parameters for TwitchAPI.get_custom_reward
## #/components/schemas/GetCustomRewardOpt
class Opt extends TwitchData:
## A list of IDs to filter the rewards by. To specify more than one ID, include this parameter for each reward you want to get. For example, `id=1234&id=5678`. You may specify a maximum of 50 IDs.
##
## Duplicate IDs are ignored. The response contains only the IDs that were found. If none of the IDs were found, the response is 404 Not Found.
@export var id: Array[String]:
set(val):
id = val
track_data(&"id", val)
## A Boolean value that determines whether the response contains only the custom rewards that the app may manage (the app is identified by the ID in the Client-Id header). Set to **true** to get only the custom rewards that the app may manage. The default is **false**.
@export var only_manageable_rewards: bool:
set(val):
only_manageable_rewards = val
track_data(&"only_manageable_rewards", val)
## Constructor with all required fields.
static func create() -> Opt:
var opt: Opt = Opt.new()
return opt
static func from_json(d: Dictionary) -> Opt:
var result: Opt = Opt.new()
if d.get("id", null) != null:
for value in d["id"]:
result.id.append(value)
if d.get("only_manageable_rewards", null) != null:
result.only_manageable_rewards = d["only_manageable_rewards"]
return result