From e6181c24124d97f2fbc932b8a68311e625463156 Mon Sep 17 00:00:00 2001 From: uzvkl Date: Tue, 11 Jun 2019 23:05:52 +0200 Subject: Move dsa related stuff to subfolder --- dsa/DSALib/Auxiliary/WeaponImporter.cs | 175 +++++++++++++++++++++++++++++++++ 1 file changed, 175 insertions(+) create mode 100644 dsa/DSALib/Auxiliary/WeaponImporter.cs (limited to 'dsa/DSALib/Auxiliary/WeaponImporter.cs') diff --git a/dsa/DSALib/Auxiliary/WeaponImporter.cs b/dsa/DSALib/Auxiliary/WeaponImporter.cs new file mode 100644 index 0000000..61eb33e --- /dev/null +++ b/dsa/DSALib/Auxiliary/WeaponImporter.cs @@ -0,0 +1,175 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Net.Http; +using System.Text.RegularExpressions; +using System.Threading.Tasks; +using DSALib.FireBase; +using DSALib.Models.Database.Dsa; + +namespace DSALib.Auxiliary +{ + public class WeaponImporter + { + private readonly List Range = new List(); + private readonly List Weapons = new List(); + + public async Task DownloadWeapons() + { + var client = new HttpClient(); + + + for (var i = 1; i <= 25; i++) + { + var responseString = + await client.GetStringAsync("http://diarium.eu/dsa4-forge/ajax/categoryChanged/" + i); + + var talentRegex = new Regex(@"(?<=