128 lines
4.9 KiB
GDScript3
128 lines
4.9 KiB
GDScript3
|
|
@tool
|
|||
|
|
extends TwitchData
|
|||
|
|
|
|||
|
|
# CLASS GOT AUTOGENERATED DON'T CHANGE MANUALLY. CHANGES CAN BE OVERWRITTEN EASILY.
|
|||
|
|
|
|||
|
|
class_name TwitchModifyChannelInformation
|
|||
|
|
|
|||
|
|
|
|||
|
|
|
|||
|
|
##
|
|||
|
|
## #/components/schemas/ModifyChannelInformationBody
|
|||
|
|
class Body extends TwitchData:
|
|||
|
|
|
|||
|
|
## The ID of the game that the user plays. The game is not updated if the ID isn’t a game ID that Twitch recognizes. To unset this field, use “0” or “” (an empty string).
|
|||
|
|
@export var game_id: String:
|
|||
|
|
set(val):
|
|||
|
|
game_id = val
|
|||
|
|
track_data(&"game_id", val)
|
|||
|
|
|
|||
|
|
## The user’s preferred language. Set the value to an ISO 639-1 two-letter language code (for example, _en_ for English). Set to “other” if the user’s preferred language is not a Twitch supported language. The language isn’t updated if the language code isn’t a Twitch supported language.
|
|||
|
|
@export var broadcaster_language: String:
|
|||
|
|
set(val):
|
|||
|
|
broadcaster_language = val
|
|||
|
|
track_data(&"broadcaster_language", val)
|
|||
|
|
|
|||
|
|
## The title of the user’s stream. You may not set this field to an empty string.
|
|||
|
|
@export var title: String:
|
|||
|
|
set(val):
|
|||
|
|
title = val
|
|||
|
|
track_data(&"title", val)
|
|||
|
|
|
|||
|
|
## The number of seconds you want your broadcast buffered before streaming it live. The delay helps ensure fairness during competitive play. Only users with Partner status may set this field. The maximum delay is 900 seconds (15 minutes).
|
|||
|
|
@export var delay: int:
|
|||
|
|
set(val):
|
|||
|
|
delay = val
|
|||
|
|
track_data(&"delay", val)
|
|||
|
|
|
|||
|
|
## A list of channel-defined tags to apply to the channel. To remove all tags from the channel, set tags to an empty array. Tags help identify the content that the channel streams. [Learn More](https://help.twitch.tv/s/article/guide-to-tags)
|
|||
|
|
##
|
|||
|
|
## A channel may specify a maximum of 10 tags. Each tag is limited to a maximum of 25 characters and may not be an empty string or contain spaces or special characters. Tags are case insensitive. For readability, consider using camelCasing or PascalCasing.
|
|||
|
|
@export var tags: Array[String]:
|
|||
|
|
set(val):
|
|||
|
|
tags = val
|
|||
|
|
track_data(&"tags", val)
|
|||
|
|
|
|||
|
|
## List of labels that should be set as the Channel’s CCLs.
|
|||
|
|
@export var content_classification_labels: Array[BodyContentClassificationLabels]:
|
|||
|
|
set(val):
|
|||
|
|
content_classification_labels = val
|
|||
|
|
track_data(&"content_classification_labels", val)
|
|||
|
|
|
|||
|
|
## Boolean flag indicating if the channel has branded content.
|
|||
|
|
@export var is_branded_content: bool:
|
|||
|
|
set(val):
|
|||
|
|
is_branded_content = val
|
|||
|
|
track_data(&"is_branded_content", val)
|
|||
|
|
var response: BufferedHTTPClient.ResponseData
|
|||
|
|
|
|||
|
|
|
|||
|
|
## Constructor with all required fields.
|
|||
|
|
static func create() -> Body:
|
|||
|
|
var body: Body = Body.new()
|
|||
|
|
return body
|
|||
|
|
|
|||
|
|
|
|||
|
|
static func from_json(d: Dictionary) -> Body:
|
|||
|
|
var result: Body = Body.new()
|
|||
|
|
if d.get("game_id", null) != null:
|
|||
|
|
result.game_id = d["game_id"]
|
|||
|
|
if d.get("broadcaster_language", null) != null:
|
|||
|
|
result.broadcaster_language = d["broadcaster_language"]
|
|||
|
|
if d.get("title", null) != null:
|
|||
|
|
result.title = d["title"]
|
|||
|
|
if d.get("delay", null) != null:
|
|||
|
|
result.delay = d["delay"]
|
|||
|
|
if d.get("tags", null) != null:
|
|||
|
|
for value in d["tags"]:
|
|||
|
|
result.tags.append(value)
|
|||
|
|
if d.get("content_classification_labels", null) != null:
|
|||
|
|
for value in d["content_classification_labels"]:
|
|||
|
|
result.content_classification_labels.append(BodyContentClassificationLabels.from_json(value))
|
|||
|
|
if d.get("is_branded_content", null) != null:
|
|||
|
|
result.is_branded_content = d["is_branded_content"]
|
|||
|
|
return result
|
|||
|
|
|
|||
|
|
|
|||
|
|
|
|||
|
|
## List of labels that should be set as the Channel’s CCLs.
|
|||
|
|
## #/components/schemas/ModifyChannelInformationBody/ContentClassificationLabels
|
|||
|
|
class BodyContentClassificationLabels extends TwitchData:
|
|||
|
|
|
|||
|
|
## ID of the [Content Classification Labels](https://help.twitch.tv/s/article/content-classification-labels) that must be added/removed from the channel. Can be one of the following values:
|
|||
|
|
##
|
|||
|
|
## * DebatedSocialIssuesAndPolitics
|
|||
|
|
## * DrugsIntoxication
|
|||
|
|
## * SexualThemes
|
|||
|
|
## * ViolentGraphic
|
|||
|
|
## * Gambling
|
|||
|
|
## * ProfanityVulgarity
|
|||
|
|
@export var id: String:
|
|||
|
|
set(val):
|
|||
|
|
id = val
|
|||
|
|
track_data(&"id", val)
|
|||
|
|
|
|||
|
|
## Boolean flag indicating whether the label should be enabled (true) or disabled for the channel.
|
|||
|
|
@export var is_enabled: bool:
|
|||
|
|
set(val):
|
|||
|
|
is_enabled = val
|
|||
|
|
track_data(&"is_enabled", val)
|
|||
|
|
|
|||
|
|
|
|||
|
|
|
|||
|
|
## Constructor with all required fields.
|
|||
|
|
static func create(_id: String, _is_enabled: bool) -> BodyContentClassificationLabels:
|
|||
|
|
var body_content_classification_labels: BodyContentClassificationLabels = BodyContentClassificationLabels.new()
|
|||
|
|
body_content_classification_labels.id = _id
|
|||
|
|
body_content_classification_labels.is_enabled = _is_enabled
|
|||
|
|
return body_content_classification_labels
|
|||
|
|
|
|||
|
|
|
|||
|
|
static func from_json(d: Dictionary) -> BodyContentClassificationLabels:
|
|||
|
|
var result: BodyContentClassificationLabels = BodyContentClassificationLabels.new()
|
|||
|
|
if d.get("id", null) != null:
|
|||
|
|
result.id = d["id"]
|
|||
|
|
if d.get("is_enabled", null) != null:
|
|||
|
|
result.is_enabled = d["is_enabled"]
|
|||
|
|
return result
|
|||
|
|
|