Added CL104

This commit is contained in:
ttenden 2024-06-28 11:27:24 +02:00
parent 752b538780
commit da82c232e3
2 changed files with 18 additions and 1 deletions

View File

@ -1,5 +1,5 @@
{ {
"codeLists": [ "CL022", "CL127", "CL263", "CL265", "CL405", "CL251", "CL042" ] "codeLists": [ "CL022", "CL127", "CL263", "CL265", "CL405", "CL251", "CL104" ]
//"codeLists": [ "CL263", "CL265"] //"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\ //"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\
} }

View File

@ -13,8 +13,10 @@ namespace FarmmapsDownloadCL.Models
this.dictCl = new Dictionary<string, List<string>>(); this.dictCl = new Dictionary<string, List<string>>();
//Add here once you have defined a new CLxxxitem below //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") //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 //then below create a new CLxxxitem with fieldnames as you see them in the just downloaded new codelist
this.dictCl.Add("CL022", new List<string> { "vnd.farmmaps.itemtype.codelist.cl022", "CL022item" }); this.dictCl.Add("CL022", new List<string> { "vnd.farmmaps.itemtype.codelist.cl022", "CL022item" });
this.dictCl.Add("CL104", new List<string> { "vnd.farmmaps.itemtype.codelist.cl104", "CL104item" });
this.dictCl.Add("CL127", new List<string> { "vnd.farmmaps.itemtype.codelist.cl127", "CL127item" }); this.dictCl.Add("CL127", new List<string> { "vnd.farmmaps.itemtype.codelist.cl127", "CL127item" });
this.dictCl.Add("CL251", new List<string> { "vnd.farmmaps.itemtype.codelist.cl251", "CL251item" }); this.dictCl.Add("CL251", new List<string> { "vnd.farmmaps.itemtype.codelist.cl251", "CL251item" });
this.dictCl.Add("CL263", new List<string> { "vnd.farmmaps.itemtype.codelist.cl263", "CL263item" }); this.dictCl.Add("CL263", new List<string> { "vnd.farmmaps.itemtype.codelist.cl263", "CL263item" });
@ -47,6 +49,21 @@ namespace FarmmapsDownloadCL.Models
public string description { get; set; } 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 class CL127item
{ {
public CL127item() public CL127item()