2 Months Ago
Let's not fuck up this branch this time Add TwitchAPI.CreatePoll Add TwitchAPI.EndPoll Add TwitchAPI.CreatePrediction, TwitchAPI.EndPrediction Have lock, cancel and resolve prediction functions, more clear than an enum for each end status Stream.OnChat library method instead of event system CommandAttribute Sandbox.Streaming.StreamClient to Sandbox.Stream Add Sandbox.Stream.IsActive Add channel modify functions to Sandbox.Stream Internal twitchapi Refractor so that TwitchService handles client and api Implement Sandbox.Stream.GetUser internal Stream.Connect and Stream.Disconnect, auto connect to twitch service on loop init Optional channel param in Stream.SendMessage, sends to your own channel if non specified Add Stream.GetUserFollowing and Stream.GetUserFollowers Add Stream.GetBroadcast Add Stream.GetChannel Deserialize poll response Add Stream.CreatePoll, Stream.EndPoll Document all public Sandbox.Stream functions Move stream events under Sandbox.Stream instead of Sandbox.Event Deserialize prediction response Add prediction to api Add summary to all stream events Move IRCMessage to StreamChatMessage constructor Parse any time response data to DateTimeOffset Change channel modify functions to properties Merge BanUser and Timeout user, the only difference is perm ban or timed ban, clarify this in the summary Move get following/followers to StreamUser Optional username param for GetUser Add StreamPoll.End Move prediction lock/cancel/resolve to StreamPrediction internal set StreamPrediction properties internal set StreamPoll properties internal set StreamUser properties internal set StreamChannel properties internal set StreamBroadcast and StreamChatMessage properties internal set StreamUserFollow properties Remove OnChat callback, dealing with chat commands should be dealt with addon level Move Sandbox.Stream to sandbox.engine so multiple connections aren't made for menu, client, server Remove stream connected/disconnect events for now, doesn't make much sense currently Add StreamUser.Channel and StreamUser.Broadcast Add Stream.GetBroadcasts (from game_id) Add Stream.GetGame (from game name) Update Stream.cs Add StreamGame.Broadcasts Init stream service in MenuInterface.Init. Connect/Disconnect stream service in GameLoop Add MenuTools.SetStreamService Save stream service type to cookies Check websocket is valid before trying to join/leave channel Make Stream.Init awaitable so menu can know if it failed Only proceed with irc login if websocket connected, try a reconnect if it fails to connect Add StreamUser.CreateClip Add StreamUser.CreatePrediction Add StreamUser.CreatePrediction Add StreamUser.CreatePoll Add StreamUser.Ban, StreamUser.Unban Keep track of all the chat channels we're in Rename Sandbox.Stream to Sandbox.Streamer Remove automatic connect/disconnect in game loop, move to menu commands AssertMenu in SetStreamService Don't run events in server context Remove debug logs Sandbox.Streamer front to Sandbox.Engine.Streamer to ensure API can only run on menu or client Move StreamChatMessage to Sandbox.Engine, fixes issue with events Missed some asserts Remove websocket copy Move interfaces to their own files Merge pull request #28 from Facepunch/streaming Initial streaming api