protected override async void OnNavigatedTo( NavigationEventArgs e )
        {
            base.OnNavigatedTo( e );

            timetable = new NhkTimetable( ApiKey.Token );
            var nowonair = await timetable.GetNowOnAir( NhkArea.東京, NhkService.NHK総合1 );
            TextTitle.Text = nowonair.nowonair_list.g1.present.title;
            TextStartTime.Text = nowonair.nowonair_list.g1.present.start_time.ToString();
            TextEndTime.Text = nowonair.nowonair_list.g1.present.end_time.ToString();
            TextArea.Text = nowonair.nowonair_list.g1.present.area.name;
        }
Пример #2
0
 static void Main( string[] args )
 {
     try {
         var timetable = new NhkTimetable( ConfigurationManager.AppSettings["Token"] );
         var nowonair = timetable.GetNowOnAir( NhkArea.東京, NhkService.NHK総合1 ).Result;
         Console.WriteLine( nowonair.nowonair_list.g1.present.title );
         Console.WriteLine( nowonair.nowonair_list.g1.present.start_time.ToString() );
         Console.WriteLine( nowonair.nowonair_list.g1.present.end_time.ToString() );
         Console.WriteLine( nowonair.nowonair_list.g1.present.area.name );
     }
     catch ( Exception ex ) {
         Console.WriteLine(ex.Message);
     }
 }