Skip to content

Commit 72e8e05

Browse files
authored
Merge pull request #44 from Amino-NET-Group/patch/fix-current-json-issues
fixed #43
2 parents 06eca13 + c4b2fbe commit 72e8e05

File tree

4 files changed

+5
-5
lines changed

4 files changed

+5
-5
lines changed

Amino.NET/Client.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1856,7 +1856,7 @@ public Objects.FromCode get_from_code(string aminoUrl)
18561856
var response = client.ExecuteGet(request);
18571857
if ((int)response.StatusCode != 200) { throw new Exception(response.Content); }
18581858
if (Debug) { Trace.WriteLine(response.Content); }
1859-
return System.Text.Json.JsonSerializer.Deserialize<FromCode>(JsonDocument.Parse(response.Content).RootElement.GetRawText());
1859+
return System.Text.Json.JsonSerializer.Deserialize<FromCode>(JsonDocument.Parse(response.Content).RootElement.GetProperty("linkInfoV2").GetRawText());
18601860
}
18611861

18621862
/// <summary>
@@ -1889,7 +1889,7 @@ public Objects.FromCode get_from_id(string objectId, Amino.Types.Object_Types ty
18891889
var response = client.ExecutePost(request);
18901890
if ((int)response.StatusCode != 200) { throw new Exception(response.Content); }
18911891
if (Debug) { Trace.WriteLine(response.Content); }
1892-
return System.Text.Json.JsonSerializer.Deserialize<FromCode>(JsonDocument.Parse(response.Content).RootElement.GetRawText());
1892+
return System.Text.Json.JsonSerializer.Deserialize<FromCode>(JsonDocument.Parse(response.Content).RootElement.GetProperty("linkInfoV2").GetRawText());
18931893
}
18941894

18951895
/// <summary>

Amino.NET/Objects/LastChatMessageSummary.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ public class LastChatMessageSummary
66
{
77
[JsonPropertyName("uid")] public string UserId { get; set; }
88
[JsonPropertyName("isHidden")] public bool? IsHidden { get; set; }
9-
[JsonPropertyName("mediaType")] public string MediaType { get; set; }
9+
[JsonPropertyName("mediaType")] public int? MediaType { get; set; }
1010
[JsonPropertyName("content")] public string Content { get; set; }
1111
[JsonPropertyName("messageId")] public string MessageId { get; set; }
1212
[JsonPropertyName("createdTime")] public string CreatedTime { get; set; }

Amino.NET/Objects/WalletInfo.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ public class WalletInfo
1010
[JsonPropertyName("adsEnabled")]public bool? AdsEnabled { get; set; }
1111
[JsonPropertyName("adsVideoStats")]public string AdsVideoStats { get; set; }
1212
[JsonPropertyName("adsFlag")]public string AdsFlag { get; set; }
13-
[JsonPropertyName("totalCoins")]public int? TotalCoins { get; set; }
13+
[JsonPropertyName("totalCoins")]public float? TotalCoins { get; set; }
1414
[JsonPropertyName("businessCoinsEnabled")]public bool? BusinessCoinsEnabled { get; set; }
1515
[JsonPropertyName("totalBusinessCoins")]public int? TotalBusinessCoins { get; set; }
1616
[JsonPropertyName("totalBusinessCoinsFloat")]public float? TotalBusinessCoinsFloat { get; set; }

Amino.NET/SubClient.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -873,7 +873,7 @@ public Task send_activity_time()
873873
int optInAdsFlags = 2147483647;
874874
int tzf = helpers.TzFilter();
875875
data.Add("userActiveTimeChunkList", timeData);
876-
data.Add("OptInAdsFlags", optInAdsFlags);
876+
data.Add("optInAdsFlags", optInAdsFlags);
877877
data.Add("timestamp", (long)(DateTime.UtcNow.Subtract(new DateTime(1970, 1, 1))).TotalMilliseconds);
878878
data.Add("timezone", tzf);
879879

0 commit comments

Comments
 (0)