private async void SetUstreamElements() { IsLoading = true; var filterList = new Dictionary <string, string> { { "platform", "PS4" }, { "type", "live" }, { "interactive", "true" } }; var liveStreamManager = new LiveStreamManager(); UstreamEntity ustreamList = await liveStreamManager.GetUstreamFeed(0, 80, "compact", filterList, "views", string.Empty, App.UserAccountEntity); if (ustreamList == null) { return; } if (ustreamList.items == null) { return; } foreach (UstreamEntity.Item ustream in ustreamList.items) { var entity = new LiveBroadcastEntity(); entity.ParseFromUstream(ustream); LiveBroadcastCollection.Add(entity); } IsLoading = false; }
private async void SetTwitchElements() { IsLoading = true; var liveStreamManager = new LiveStreamManager(); TwitchEntity twitchList = await liveStreamManager.GetTwitchFeed(0, 80, "PS4", "true", string.Empty, App.UserAccountEntity); if (twitchList == null) { return; } if (twitchList.streams == null) { return; } foreach (TwitchEntity.Stream twitch in twitchList.streams) { var entity = new LiveBroadcastEntity(); entity.ParseFromTwitch(twitch); LiveBroadcastCollection.Add(entity); } IsLoading = false; }
private async void SetNicoDougaElements() { IsLoading = true; var liveStreamManager = new LiveStreamManager(); NicoNicoEntity nicoNicoEntity = await liveStreamManager.GetNicoFeed("onair", "PS4", 0, 80, "view", App.UserAccountEntity); if (nicoNicoEntity == null) { return; } if (nicoNicoEntity.programs == null) { return; } foreach (NicoNicoEntity.Program program in nicoNicoEntity.programs) { var entity = new LiveBroadcastEntity(); entity.ParseFromNicoNico(program); LiveBroadcastCollection.Add(entity); } IsLoading = false; }