Added Id property to packages.

This commit is contained in:
mmuffins 2018-06-23 10:20:42 +02:00
parent b29805c531
commit 7f7ec055da
2 changed files with 5 additions and 1 deletions

View File

@ -14,6 +14,8 @@ namespace SteamStorefrontAPI.Classes
[JsonProperty("name")]
public string Name { get; set; }
public int SteamPackageId { get; set; }
[JsonProperty("purchase_text")]
public string PurchaseText { get; set; }

View File

@ -53,7 +53,9 @@ namespace SteamStorefrontAPI
var jsonData = JToken.Parse(result).First.First;
if (!bool.Parse(jsonData["success"].ToString())) { return null; }
return jsonData["data"].ToObject<PackageInfo>();
var package = jsonData["data"].ToObject<PackageInfo>();
package.SteamPackageId = PackageId;
return package;
}
}
}