mirror of
https://github.com/Facepunch/sbox-public.git
synced 2026-08-01 16:28:36 -04:00
Engine: reworks Twitch IRC parsing/client + Streamer event surface (viewers roster, chat/sub/gift/raid messages) and removes older/broken Twitch API features. Menu/Editor: adds service linking/stream-connect UI (new Services modal; pause/game modal + editor title button) gated by a project setting. Services/utilities: introduces helper APIs for linking/listing services; adds unit tests for the IRC parser and subscription tier parsing.
43 lines
1.2 KiB
C#
43 lines
1.2 KiB
C#
using Sandbox.Twitch;
|
|
|
|
namespace Sandbox;
|
|
|
|
public static partial class Streamer
|
|
{
|
|
internal struct Broadcast
|
|
{
|
|
internal Broadcast( TwitchAPI.StreamResponse stream )
|
|
{
|
|
Id = stream.Id;
|
|
UserId = stream.UserId;
|
|
Username = stream.UserLogin;
|
|
DisplayName = stream.UserName;
|
|
GameId = stream.GameId;
|
|
GameName = stream.GameName;
|
|
Type = stream.Type;
|
|
Title = stream.Title;
|
|
ViewerCount = stream.ViewerCount;
|
|
StartedAt = stream.StartedAt;
|
|
Language = stream.Language;
|
|
ThumbnailUrl = stream.ThumbnailUrl;
|
|
TagIds = stream.TagIds;
|
|
IsMature = stream.IsMature;
|
|
}
|
|
|
|
public string Id { get; internal set; }
|
|
public string UserId { get; internal set; }
|
|
public string Username { get; internal set; }
|
|
public string DisplayName { get; internal set; }
|
|
public string GameId { get; internal set; }
|
|
public string GameName { get; internal set; }
|
|
public string Type { get; internal set; }
|
|
public string Title { get; internal set; }
|
|
public int ViewerCount { get; internal set; }
|
|
public DateTimeOffset StartedAt { get; internal set; }
|
|
public string Language { get; internal set; }
|
|
public string ThumbnailUrl { get; internal set; }
|
|
public string[] TagIds { get; internal set; }
|
|
public bool IsMature { get; internal set; }
|
|
}
|
|
}
|