diff --git a/FarmmapsDownloadCL/DownloadCLInput.json b/FarmmapsDownloadCL/DownloadCLInput.json index ad850fc..77fdea7 100644 --- a/FarmmapsDownloadCL/DownloadCLInput.json +++ b/FarmmapsDownloadCL/DownloadCLInput.json @@ -1,5 +1,5 @@ { - "codeLists": [ "CL022", "CL127", "CL263", "CL265", "CL405", "CL251", "CL042" ] + "codeLists": [ "CL022", "CL127", "CL263", "CL265", "CL405", "CL251", "CL104" ] //"codeLists": [ "CL263", "CL265"] //"DownloadFolder": "Downloads", //"C:\\hugoschrererdir\\kpidir\\", // "Downloads", -> if you just put "Downloads" the program will download to somewhere in ..\FarmMapsApiClient_WURtest\FarmmapsDataDownload\bin\Debug\netcoreapp3.1\Downloads\ } \ No newline at end of file diff --git a/FarmmapsDownloadCL/Models/CodelistsClasses.cs b/FarmmapsDownloadCL/Models/CodelistsClasses.cs index b3d4edc..d10ae8f 100644 --- a/FarmmapsDownloadCL/Models/CodelistsClasses.cs +++ b/FarmmapsDownloadCL/Models/CodelistsClasses.cs @@ -13,8 +13,10 @@ namespace FarmmapsDownloadCL.Models this.dictCl = new Dictionary>(); //Add here once you have defined a new CLxxxitem below //To add a new item, look it up in https://test.farmmaps.eu/swagger/index.html. Download the item you are interested in (like "vnd.farmmaps.itemtype.codelist.cl263") + //do this under Items <- get/api/v1/items, use the it field. Depending on the size of the list retrieving the list can take a few minutes. //then below create a new CLxxxitem with fieldnames as you see them in the just downloaded new codelist this.dictCl.Add("CL022", new List { "vnd.farmmaps.itemtype.codelist.cl022", "CL022item" }); + this.dictCl.Add("CL104", new List { "vnd.farmmaps.itemtype.codelist.cl104", "CL104item" }); this.dictCl.Add("CL127", new List { "vnd.farmmaps.itemtype.codelist.cl127", "CL127item" }); this.dictCl.Add("CL251", new List { "vnd.farmmaps.itemtype.codelist.cl251", "CL251item" }); this.dictCl.Add("CL263", new List { "vnd.farmmaps.itemtype.codelist.cl263", "CL263item" }); @@ -47,6 +49,21 @@ namespace FarmmapsDownloadCL.Models public string description { get; set; } } + public class CL104item + { + public CL104item() + { + this.headers = new string[] { "codelist", "code", "description" }; + this.codelist = "CL104"; + this.about = new string[] { "EDI-crop, coderingslijst groenbemesters" }; + } + + public string[] headers { get; } + public string codelist { get; } + public string[] about { get; } + public string code { get; set; } + public string description { get; set; } + } public class CL127item { public CL127item()