Пример #1
0
        private static void Tests()
        {
            var thing = new ScrappedSong();

            Web.HttpClientWrapper.Initialize(5);
            List <ScrappedSong> scrapedDict;

            using (StreamReader file = File.OpenText(@"C:\Users\Jared\source\repos\SyncSaberService\SyncSaberService\bin\Debug\ScrapedData\combinedScrappedData.json"))
            {
                JsonSerializer serializer = new JsonSerializer();
                scrapedDict = (List <ScrappedSong>)serializer.Deserialize(file, typeof(List <ScrappedSong>));
            }


            DownloadJob testJob = new DownloadJob(new SongInfo("111-111", "testName", "", "testAuthor"), "temp", "CustomSongs");

            var testTask = testJob.RunJobAsync();

            testTask.Wait();
            var searchTest = BeatSaverReader.Search("6A097D39A5FA94F3B736E6EEF5A519A2", BeatSaverReader.SearchType.hash);
            var testReader = new ScoreSaberReader();
            var sssongs    = testReader.GetSSSongsFromPage(HttpClientWrapper.GetPageText("https://scoresaber.com/api.php?function=get-leaderboards&cat=3&limit=5&page=39&ranked=1"));

            foreach (var sssong in sssongs)
            {
                sssong.PopulateFields();
            }
            var songs = testReader.GetSongsFromFeed(new ScoreSaberFeedSettings(0)
            {
                MaxPages = 10
            });

            SongInfo song = new SongInfo("18750-20381", "test", "testUrl", "testAuthor");

            song.PopulateFields();
            var test  = song["key"];
            var test2 = song["id"];
            var test3 = song["uploaderId"];
        }