update libs

This commit is contained in:
Kirill Chikalin
2025-02-13 17:48:12 +03:00
parent e17e7c2786
commit 275dc598c7
816 changed files with 22479 additions and 10792 deletions

View File

@@ -0,0 +1,38 @@
using Newtonsoft.Json;
using Newtonsoft.Json.Linq;
using System;
namespace AssetStoreTools.Api.Responses
{
internal class AssetStoreToolsVersionResponse : AssetStoreResponse
{
public string Version { get; set; }
public AssetStoreToolsVersionResponse() : base() { }
public AssetStoreToolsVersionResponse(Exception e) : base(e) { }
public AssetStoreToolsVersionResponse(string json)
{
try
{
ValidateAssetStoreResponse(json);
ParseVersion(json);
Success = true;
}
catch (Exception e)
{
Success = false;
Exception = e;
}
}
private void ParseVersion(string json)
{
var dict = JsonConvert.DeserializeObject<JObject>(json);
if (!dict.ContainsKey("version"))
throw new Exception("Version was not found");
Version = dict.GetValue("version").ToString();
}
}
}