@tool extends TwitchData # CLASS GOT AUTOGENERATED DON'T CHANGE MANUALLY. CHANGES CAN BE OVERWRITTEN EASILY. ## ## #/components/schemas/Clip class_name TwitchClip ## An ID that uniquely identifies the clip. @export var id: String: set(val): id = val track_data(&"id", val) ## A URL to the clip. @export var url: String: set(val): url = val track_data(&"url", val) ## A URL that you can use in an iframe to embed the clip (see [Embedding Video and Clips](https://dev.twitch.tv/docs/embed/video-and-clips/)). @export var embed_url: String: set(val): embed_url = val track_data(&"embed_url", val) ## An ID that identifies the broadcaster that the video was clipped from. @export var broadcaster_id: String: set(val): broadcaster_id = val track_data(&"broadcaster_id", val) ## The broadcaster’s display name. @export var broadcaster_name: String: set(val): broadcaster_name = val track_data(&"broadcaster_name", val) ## An ID that identifies the user that created the clip. @export var creator_id: String: set(val): creator_id = val track_data(&"creator_id", val) ## The user’s display name. @export var creator_name: String: set(val): creator_name = val track_data(&"creator_name", val) ## An ID that identifies the video that the clip came from. This field contains an empty string if the video is not available. @export var video_id: String: set(val): video_id = val track_data(&"video_id", val) ## The ID of the game that was being played when the clip was created. @export var game_id: String: set(val): game_id = val track_data(&"game_id", val) ## The ISO 639-1 two-letter language code that the broadcaster broadcasts in. For example, _en_ for English. The value is _other_ if the broadcaster uses a language that Twitch doesn’t support. @export var language: String: set(val): language = val track_data(&"language", val) ## The title of the clip. @export var title: String: set(val): title = val track_data(&"title", val) ## The number of times the clip has been viewed. @export var view_count: int: set(val): view_count = val track_data(&"view_count", val) ## The date and time of when the clip was created. The date and time is in RFC3339 format. @export var created_at: String: set(val): created_at = val track_data(&"created_at", val) ## A URL to a thumbnail image of the clip. @export var thumbnail_url: String: set(val): thumbnail_url = val track_data(&"thumbnail_url", val) ## The length of the clip, in seconds. Precision is 0.1. @export var duration: float: set(val): duration = val track_data(&"duration", val) ## The zero-based offset, in seconds, to where the clip starts in the video (VOD). Is **null** if the video is not available or hasn’t been created yet from the live stream (see `video_id`). ## ## Note that there’s a delay between when a clip is created during a broadcast and when the offset is set. During the delay period, `vod_offset` is **null**. The delay is indeterminant but is typically minutes long. @export var vod_offset: int: set(val): vod_offset = val track_data(&"vod_offset", val) ## A Boolean value that indicates if the clip is featured or not. @export var is_featured: bool: set(val): is_featured = val track_data(&"is_featured", val) var response: BufferedHTTPClient.ResponseData ## Constructor with all required fields. static func create(_id: String, _url: String, _embed_url: String, _broadcaster_id: String, _broadcaster_name: String, _creator_id: String, _creator_name: String, _video_id: String, _game_id: String, _language: String, _title: String, _view_count: int, _created_at: String, _thumbnail_url: String, _duration: float, _vod_offset: int, _is_featured: bool) -> TwitchClip: var twitch_clip: TwitchClip = TwitchClip.new() twitch_clip.id = _id twitch_clip.url = _url twitch_clip.embed_url = _embed_url twitch_clip.broadcaster_id = _broadcaster_id twitch_clip.broadcaster_name = _broadcaster_name twitch_clip.creator_id = _creator_id twitch_clip.creator_name = _creator_name twitch_clip.video_id = _video_id twitch_clip.game_id = _game_id twitch_clip.language = _language twitch_clip.title = _title twitch_clip.view_count = _view_count twitch_clip.created_at = _created_at twitch_clip.thumbnail_url = _thumbnail_url twitch_clip.duration = _duration twitch_clip.vod_offset = _vod_offset twitch_clip.is_featured = _is_featured return twitch_clip static func from_json(d: Dictionary) -> TwitchClip: var result: TwitchClip = TwitchClip.new() if d.get("id", null) != null: result.id = d["id"] if d.get("url", null) != null: result.url = d["url"] if d.get("embed_url", null) != null: result.embed_url = d["embed_url"] if d.get("broadcaster_id", null) != null: result.broadcaster_id = d["broadcaster_id"] if d.get("broadcaster_name", null) != null: result.broadcaster_name = d["broadcaster_name"] if d.get("creator_id", null) != null: result.creator_id = d["creator_id"] if d.get("creator_name", null) != null: result.creator_name = d["creator_name"] if d.get("video_id", null) != null: result.video_id = d["video_id"] if d.get("game_id", null) != null: result.game_id = d["game_id"] if d.get("language", null) != null: result.language = d["language"] if d.get("title", null) != null: result.title = d["title"] if d.get("view_count", null) != null: result.view_count = d["view_count"] if d.get("created_at", null) != null: result.created_at = d["created_at"] if d.get("thumbnail_url", null) != null: result.thumbnail_url = d["thumbnail_url"] if d.get("duration", null) != null: result.duration = d["duration"] if d.get("vod_offset", null) != null: result.vod_offset = d["vod_offset"] if d.get("is_featured", null) != null: result.is_featured = d["is_featured"] return result