Changed api response "result" to "data"

This commit is contained in:
2018-11-07 16:05:21 +00:00
parent e2330974f6
commit 6c7376f2e8
27 changed files with 227 additions and 270 deletions

View File

@@ -48,8 +48,8 @@ namespace raven_integration
Util.ValidateDataReturnResponseOk(a);
long lTestPngAttachmentId = a.ObjectResponse["result"][0]["id"].Value<long>();
long lTestZipAttachmentId = a.ObjectResponse["result"][1]["id"].Value<long>();
long lTestPngAttachmentId = a.ObjectResponse["data"][0]["id"].Value<long>();
long lTestZipAttachmentId = a.ObjectResponse["data"][1]["id"].Value<long>();
//saw negative values on a db issue that I corrected (I think)
//Keeping these in case it arises again, if it does, see log, it's a db error with async issue of some kind
@@ -61,14 +61,14 @@ namespace raven_integration
//Get the inventoryfull account download token
// {
// "result": {
// "data": {
// "dlkey": "w7iE1cXF8kOxo8eomd1r8A",
// "expires": "2018-04-25T23:45:39.05665"
// }
// }
a = await Util.GetAsync("Attachment/DownloadToken", await Util.GetTokenAsync("InventoryFull"));
Util.ValidateDataReturnResponseOk(a);
string downloadToken = a.ObjectResponse["result"]["dlkey"].Value<string>();
string downloadToken = a.ObjectResponse["data"]["dlkey"].Value<string>();
//now get the file https://rockfish.ayanova.com/api/rfcaseblob/download/248?dlkey=9O2eDAAlZ0Wknj19SBK2iA
var dlresponse = await Util.DownloadFileAsync("Attachment/Download/" + lTestZipAttachmentId.ToString() + "?dlkey=" + downloadToken, await Util.GetTokenAsync("InventoryFull"));