public void RequestVideoList() { if (String.IsNullOrEmpty(this.m_channel)) { throw new ArgumentException("Channel name missing"); } String videoURL = "https://api.twitch.tv/kraken/channels/" + this.m_channel + "/videos?limit=" + VIDEO_LIMIT.ToString() + "&broadcasts=" + BROADCAST.ToString().ToLower(); String videoResp = APIRequest(videoURL); this.m_videoLink = JsonConvert.DeserializeObject <TwitchObjects.VideoLinkObject>(videoResp); }
public void NextVideoList() { if (this.m_videoLink == null) { throw new ArgumentException("No video link object found"); } if (String.IsNullOrEmpty(this.m_videoLink._links.next)) { return; } String nextResp = APIRequest(this.m_videoLink._links.next); this.m_videoLink = JsonConvert.DeserializeObject <TwitchObjects.VideoLinkObject>(nextResp); }
public TwitchObject(String ChannelName) { this.m_channel = ChannelName.ToLower(); this.m_access = null; this.m_videoLink = null; }