public TwitchStream(JToken jToken) { this.Id = jToken.Value <string>("_id"); this.Game = jToken.Value <string>("game"); this.Viewers = jToken.Value <int>("viewers"); this.VideoHeight = jToken.Value <int>("video_height"); this.AverageFps = jToken.Value <int>("average_fps"); this.Delay = jToken.Value <int>("delay"); this.CreatedAt = jToken.Value <DateTime>("created_at"); this.IsPlaylist = jToken.Value <bool>("is_playlist"); this.Preview = jToken.ReadIfExist("preview", t => new TwitchImageSet(t)); this.Channel = jToken.ReadIfExist("channel", t => new TwitchChannel(t)); }
public TwitchUserSubscription(JToken jToken) : base(jToken) { this.Channel = jToken.ReadIfExist("channel", t => new TwitchChannel(t)); }