Archived
1
0

#124: Test commit

This commit is contained in:
Michael Gordeev
2018-12-12 21:48:03 +03:00
parent 1105460cae
commit 0e6f847e02
3 changed files with 18 additions and 4 deletions
+14
View File
@@ -26,6 +26,7 @@ using Windows.Networking.Connectivity;
using Windows.UI.Core;
using System.IO;
using Newtonsoft.Json;
using Google.Apis.YouTube.v3;
// The Blank Page item template is documented at https://go.microsoft.com/fwlink/?LinkId=402352&clcid=0x409
@@ -103,7 +104,20 @@ namespace FoxTube
async void GetVideosFromToday()
{
foreach (Subscription i in SecretsVault.Subscriptions)
{
SearchResource.ListRequest request = SecretsVault.NoAuthService.Search.List("snippet");
request.PublishedAfter = DateTime.Now.Subtract(TimeSpan.FromDays(1));
Debug.WriteLine(DateTime.Now.Subtract(TimeSpan.FromDays(1)));
request.ChannelId = i.Snippet.ResourceId.ChannelId;
request.Type = "video";
request.MaxResults = 5;
SearchListResponse response = await request.ExecuteAsync();
foreach (SearchResult result in response.Items)
ToastNotificationManager.CreateToastNotifier().Show(
FoxTube.Background.Notification.GetVideoToast(result.Id.VideoId, result.Snippet.ChannelId, result.Snippet.Title, result.Snippet.ChannelTitle, result.Snippet.Thumbnails.Medium.Url, i.Snippet.Thumbnails.Medium.Url));
}
}
public async void Initialize()