finalized api answer data structure from api documentation
fixed UpdateMedia method to use correct fields from poi
This commit is contained in:
@@ -110,6 +110,9 @@ namespace RothenburgAR.Updater
|
||||
[JsonProperty("imageId")]
|
||||
public string ImageId { get; set; }
|
||||
|
||||
[JsonProperty("mediaId")]
|
||||
public string MediaId { get; set; }
|
||||
|
||||
[JsonProperty("x")]
|
||||
public double X { get; set; }
|
||||
|
||||
|
||||
@@ -94,8 +94,7 @@ namespace RothenburgAR.Updater
|
||||
}
|
||||
});
|
||||
|
||||
result = result.Substring(0, result.Length - 1);
|
||||
result += "}";
|
||||
result = result.Substring(0, result.Length - 1) + "}";
|
||||
return result;
|
||||
}
|
||||
|
||||
@@ -178,16 +177,9 @@ namespace RothenburgAR.Updater
|
||||
|
||||
private void UpdateMedia(Exhibit exhibit)
|
||||
{
|
||||
//TODO implement feedback: which id is the right one?
|
||||
// ImageId is apparently just the ExhibitId
|
||||
// Exhibit doesn't have media, POI does. so the Exhibit.MediaId doesn't make sense
|
||||
//exhibit.MediaId;
|
||||
//exhibit.Pois[0].ImageId;
|
||||
|
||||
//TODO check existing file for creation/alteration date to see if download is necessary
|
||||
|
||||
var mediaIDs = new List<string> { exhibit.MediaId };
|
||||
//var mediaIDs = exhibit.Pois.Select(p => p.ImageId).ToList();
|
||||
var mediaIDs = exhibit.Pois.Select(p => p.MediaId).ToList();
|
||||
|
||||
foreach (var mediaId in mediaIDs)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user